Skip to content

luotianyil/iflow_container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Php Version

iflow container

遵循 PSR-11 规范的容器组件

安装

composer require iflow/container

使用

use iflow\Container\Container;

$container = Container::getInstance();

// 新建对象
$container -> make('class', $args, call: function ($object) { return $object });

// 将已实例化的对象写入容器
$container -> register('class', $obj);

// 获取容器对象
$container -> get('class');

// 验证当前容器是否存在改对象
$container -> has('class');

// 删除容器内对象
$container -> delete('class');

功能

  • 容器 (PSR-11)
  • 自定义注解模块

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages