承接 vpg/titon.common 相关项目开发

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

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

vpg/titon.common

最新稳定版本:v1.4

Composer 安装命令:

composer require vpg/titon.common

包简介

The Titon common package provides global functionality like class traits and augmentation as well as dependency and configuration management.

README 文档

README

Provides common functionality for external packages, such as dependency management through registries and containers, global configuration with a static configuration management layer, and a base class for all modular abstract classes to inherit.

On top of those features, the common package provides multiple traits that allow horizontal inheritance of powerful patterns that solve basic use cases, like caching within class instances, class configurations, class dependencies, and more. Classes can be further enhanced through augmentations, which are self contained inner classes.

For example, we can inherit common class functionality like serialization, configuration, and more.

class Object extends Titon\Common\Base { use Titon\Common\Attachable, \\ Provides lazy-loaded inner class dependencies Titon\Common\Cacheable, \\ Provides memoization (method caching) Titon\Common\Instanceable; \\ Provides multiton instance support }

We can also lazy-load dependencies through the registry.

use Titon\Common\Registry; Registry::register('foo.bar', function() { return new Foo\Bar(); }); $foobar = Registry::get('foo.bar'); $foobar = Registry::factory('Foo\Bar'); // by namespace

And finally, configuration management has never been easier.

use Titon\Common\Config; Config::set('foo.bar', 'baz'); $baz = Config::get('foo.bar');

Features

  • Base - Primary base class
  • Traits - Horizontal inheritance
  • Augments - Class functionality encapsulation
  • Registry - Static dependency container
  • Container - Dependency container
  • Config - Configuration management

Dependencies

  • Utility
  • Io (optional for Config)

Requirements

  • PHP 5.4.0

统计信息

  • 总下载量: 12.39k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固