2017 © Pedro Peláez
 

library camel

Tiny library to handle words case transformation. Originally from https://github.com/MattKetmo/camel

image

allansun/camel

Tiny library to handle words case transformation. Originally from https://github.com/MattKetmo/camel

  • Monday, December 7, 2015
  • by allansun
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Camel

Build status... Code quality... License MIT Packagist, (*1)

Tiny library to handle words case transformation., (*2)

The main idea is to split the given word into several words and assemble them in another format., (*3)

Example: camelCase => [camel, Case] => camel_case, (*4)

Installation

composer require mattketmo/camel

Usage

<?php

require __DIR__.'/vendor/autoload.php';

use Camel\CaseTransformer;
use Camel\Format;

$transformer1 = new CaseTransformer(new Format\SnakeCase, new Format\CamelCase);
$transformer2 = new CaseTransformer(new Format\CamelCase, new Format\ScreamingSnakeCase);

echo $transformer1->transform('hello_world'); // helloWorld
echo $transformer2->transform('helloWorld');  // HELLO_WORLD

Supported formats

  • camelCase
  • StudlyCaps
  • snake_case
  • SCREAMING_SNAKE_CASE
  • spinal-case

Unit Tests

Install phpunit via Composer:, (*5)

composer install

Once installed, run the following command:, (*6)

vendor/bin/phpunit

License

Camel is released under the MIT License. See the bundled LICENSE file for details., (*7)

The Versions

07/12 2015

dev-master

9999999-dev

Tiny library to handle words case transformation. Originally from https://github.com/MattKetmo/camel

  Sources   Download

MIT

The Development Requires

transform case camelcase snakecase lowercase

13/05 2015

v1.1.0

1.1.0.0

Tiny library to handle words case transformation

  Sources   Download

MIT

The Development Requires

transform case camelcase snakecase lowercase

14/09 2014

v1.0.0

1.0.0.0

Tiny library to handle words case transformation

  Sources   Download

MIT

transform case camelcase snakecase lowercase