Download the PHP package laravelfy/optional without Composer
On this page you can find all versions of the php package laravelfy/optional. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download laravelfy/optional
More information about laravelfy/optional
Files in laravelfy/optional
Download laravelfy/optional
More information about laravelfy/optional
Files in laravelfy/optional
Vendor laravelfy
Package optional
Short Description Optional, inspired by laravel's optional object
License MIT
Package optional
Short Description Optional, inspired by laravel's optional object
License MIT
Please rate this library. Is it a good library?
Informations about the package optional
Laravelfy Optional
一个由 laravel optional 启发的扩展
使用
原理
- 当尝试获取 optional2 返回对象的属性时,不论取得与否,均返回一个新的 optional2 对象,保证链式操作不报错。
- 当尝试调用 optional2 返回的对象的方法时,不论执行成功与否,均返回新的 optional2 对象(成功的话对象的 storage 为执行结果)。
已知问题
- [ ] 不要在将 optional2 应用于
if
等条件判断。因为 optional2 返回的是个递归对象,无法替代 bool。 - [ ] 不要讲 optional2 直接使用于数字运算。
License
MIT
All versions of optional with dependencies
PHP Build Version
Package Version
Requires
php Version
>5.4
The package laravelfy/optional contains the following files
Loading the files please wait ....