dgifford/array-access-trait
最新稳定版本:v2.0
Composer 安装命令:
composer require dgifford/array-access-trait
包简介
Trait providing methods to implement array access using a container variable.
关键字:
README 文档
README
Adds the basic methods for accessing properties of an object using array notation.
For example:
$foo = new Foo;
$foo['bar'] = 'bar';
echo $foo['bar']; // 'bar'
unset( $foo['bar'] );
var_dump( isset($foo['bar']) ); // 'false'
Properties created in this way are stored in a private array called 'container'.
Any class that uses this trait must implement the ArrayAccess interface, see http://php.net/manual/en/class.arrayaccess.php.
For example:
class Foo implements \ArrayAccess
{
}
Changelog
- v2.0 PHP 8 Compatibility
- v1.0 Initial release
统计信息
- 总下载量: 4.56k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2016-09-15