Download the PHP package spatie/or-else without Composer
On this page you can find all versions of the php package spatie/or-else. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download spatie/or-else
More information about spatie/or-else
Files in spatie/or-else
Package or-else
Short Description A trait to add orElse functions to a class
License MIT
Homepage https://github.com/spatie/or-else
Informations about the package or-else
or-else
This package adds an orElse
-trait to your project.
Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Install
You can install the package via composer:
Postcardware
You're free to use this package (it's MIT-licensed), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.
The best postcards will get published on the open source page on our website.
Usage
When implementing the OrElse
-trait to a class, all methods of the class will have a OrElse
-variant.
That variant has an extra parameter that will be returned if the original function returns null
or false
.
Consider this simple class that implements the orElse
-trait.
The trait dynamically adds a willReturnOrElse
-method.
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
Contributing
Please see CONTRIBUTING for details.
Security
If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.
Credits
- Freek Van der Herten
- Edd Mann
- All Contributors
About Spatie
Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
License
The MIT License (MIT). Please see License File for more information.