allansun/camel
Composer 安装命令:
composer require allansun/camel
包简介
Tiny library to handle words case transformation. Originally from https://github.com/MattKetmo/camel
README 文档
README
Tiny library to handle words case transformation.
The main idea is to split the given word into several words and assemble them in another format.
Example: camelCase => [camel, Case] => camel_case
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
camelCaseStudlyCapssnake_caseSCREAMING_SNAKE_CASEspinal-case
Unit Tests
Install phpunit via Composer:
composer install
Once installed, run the following command:
vendor/bin/phpunit
License
Camel is released under the MIT License. See the bundled LICENSE file for details.
统计信息
- 总下载量: 32
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-12-07