phprise/common
最新稳定版本:v2.0.0
Composer 安装命令:
composer require phprise/common
包简介
Common objects to general usage
README 文档
README
Common objects for general usage in PHP projects, specifically Value Objects and Contracts.
Installation
composer require phprise/common
Usage
Value Objects
StringObject
A wrapper for string manipulation implementing Stringable and specific contract interfaces (Camelable, Snakeable, Pascalable, Kebabable, Titleable, Upperable, Lowerable).
use Phprise\Common\ValueObject\StringObject; $str = new StringObject('hello_world'); echo $str->toCamel(); // helloWorld echo $str->toPascal(); // HelloWorld echo $str->toKebab(); // hello-world echo $str->toTitle(); // Hello World echo $str->toUpper(); // HELLO_WORLD
ArrayObject
An extension of the native ArrayObject with extra utilities.
use Phprise\Common\ValueObject\ArrayObject; $arr = new ArrayObject(['old_key' => 'value']); // Replace a key while keeping the value $arr->replaceKey('old_key', 'new_key'); echo $arr['new_key']; // value
Philosophy
Please read PHILOSOPHY.md to learn more about our philosophy.
License
MIT License
Contributing
Check CONTRIBUTING.md to learn more about our contributing guidelines.
Code of Conduct
Check CODE_OF_CONDUCT.md to learn more about our code of conduct.
Security
Check SECURITY.md to learn more about our security policy.
Changelog
Check CHANGELOG.md for more information.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-30