avro/case-bundle
最新稳定版本:v0.1.2
Composer 安装命令:
composer require avro/case-bundle
包简介
Symfony2 Case Converter Bundle
README 文档
README
Convert strings or an array of strings to different case formats.
Supports: camelCase, PascalCase, Title Case, and underscore_case.
Installation
This bundle is listed on packagist.
Simply add it to your apps composer.json file
"avro/case-bundle": "0.1.2"
Enable the bundle in the kernel:
// app/AppKernel.php new Avro\CaseBundle\AvroCaseBundle
Configuration
avro_case: use_twig: false #disable the twig extension (true by default)
Usage
$converter = $this->container->get('avro_case.converter'); $camelCaseFormat = $converter->toCamelCase($str); $pascalCaseFormat = $converter->toPascalCase($str); $titleCaseFormat = $converter->toTitleCase($str); $underscoreCaseFormat = $converter->toUnderscoreCase($str);
The following filters are also available if you use Twig
{{ var | camel }}
{{ var | pascal }}
{{ var | title }}
{{ var | underscore }}
统计信息
- 总下载量: 102.26k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-12-16