fiko/no-object
最新稳定版本:2.0.0
Composer 安装命令:
composer require fiko/no-object
包简介
Not Only Object will return NULL instead of error for undefined property.
README 文档
README
It's an object that will return what it's value (only if it has value), but returns NULL if no property or no method found on this object. In an ordinary object you will get an error when calling an undefined property or method, that is why this repo was created, to resolve that problem.
How to Use?
Composer
use Fiko\NoObject\NoObject; $data = new NoObject([ "first" => "The first array value.", "last" => "The last array value." ]); // print all object properties print_r($data); // Example of calling undefined property echo $data->wrong; // Example of calling defined property echo $data->first;
Via Composer
Please see example/composer.php example
Manually
Please see example/manual.php example
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-09