承接 phprise/common-value-object 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

phprise/common-value-object

最新稳定版本:v1.0.0

Composer 安装命令:

composer require phprise/common-value-object

包简介

Extended PHP types with common value objects applying OTAKU philosophy

README 文档

README

Extended PHP types with common value objects applying OTAKU philosophy.

Installation

composer require phprise/common-value-object

Usage

ArrayObject

ArrayObject extends the native PHP ArrayObject but strictly adheres to the project's philosophy, providing utility methods for key replacement and strict type handling.

use Phprise\Common\ValueObject\ArrayObject;

$data = new ArrayObject(['old_key' => 'value']);

// Replace a key
$data->replaceKey('old_key', 'new_key');

echo $data['new_key']; // Outputs: value

StringObject

StringObject is an immutable wrapper around strings, providing expressive methods for text manipulation and case conversion.

use Phprise\Common\ValueObject\StringObject;

$string = new StringObject('hello world');

echo $string->toCamel();  // helloWorld
echo $string->toSnake();  // hello_world
echo $string->toKebab();  // hello-world
echo $string->toPascal(); // HelloWorld
echo $string->toTitle();  // Hello World
echo $string->toUpper();  // HELLO WORLD

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.

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-07