dbeurive/registry
Composer 安装命令:
composer require dbeurive/registry
包简介
This package contains a basic implementation for a registry.
关键字:
README 文档
README
This package implements a simple registry.
Installation
From the command line:
composer require dbeurive/tree
From your composer.json file:
{
"require": {
"dbeurive/tree": "1.0.*"
}
}
API documentation
The detailed documentation of the API can be extracted from the code by using PhpDocumentor.
The file phpdoc.xml contains the required configuration for PhpDocumentor.
To generate the API documentation, just move into the root directory of this package and run PhpDocumentor from this location.
Note:
Since all the PHP code is documented using PhpDoc annotations, you should be able to exploit the auto completion feature from your favourite IDE. If you are using Eclipse, NetBeans or PhPStorm, you probably won’t need to consult the generated API documentation.
Synopsis
Register an entry:
$value = 10; dbeurive\Registry\Registry::register('YourEntry', $value);
Register an entry and declare it as constant:
$value = 10; dbeurive\Registry\Registry::register('YourEntry', $value, true);
Get the value of a registered entry:
dbeurive\Registry\Registry::get('YourEntry');
Change the value of a registered entry:
$newValue = 20; dbeurive\Registry\Registry::set('YourEntry', $newValue);
Test if an entry is registered:
if (dbeurive\Registry\Registry::isRegistered('YourEntry')) { ... }
Test if an entry is declared as constant:
if (dbeurive\Registry\Registry::isConstant('YourEntry')) { ... }
Examples
Unit tests are good examples.
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-29