2017 © Pedro Peláez
 

library caseformat

A PHP case formatting tool inspired by Google Guava's CaseFormat.

image

jlinn/caseformat

A PHP case formatting tool inspired by Google Guava's CaseFormat.

  • Friday, February 21, 2014
  • by jlinn
  • Repository
  • 1 Watchers
  • 1 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

caseformat

Build Status, (*1)

A PHP case formatting tool inspired by Google Guava's CaseFormat., (*2)

Installation Using Composer

Assuming composer.phar is located in your project's root directory, run the following command:, (*3)

php composer.phar require jlinn/caseformat:~1.0

Usage

The following case formats are supported:, (*4)

Format Example
LOWER_HYPHEN foo-bar
LOWER_UNDERSCORE foo_bar
LOWER_CAMEL fooBar
LOWER_SPACE foo bar
UPPER_CAMEL FooBar
UPPER_UNDERSCORE FOO_BAR
UPPER_SPACE FOO BAR

Conversion from LOWER_UNDERSCORE to UPPER_CAMEL, for example, is done like so:, (*5)

use CaseFormat\CaseFormat;

$converted = CaseFormat::LOWER_UNDERSCORE("test_string")->to(CaseFormat::UPPER_CAMEL);

In the example above, the value of $converted would be "TestString"., (*6)

The Versions

21/02 2014

dev-master

9999999-dev

A PHP case formatting tool inspired by Google Guava's CaseFormat.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

caseformat

21/02 2014

1.0.0

1.0.0.0

A PHP case formatting tool inspired by Google Guava's CaseFormat.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

caseformat