定制 phprise/common 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-30