Download the PHP package gregoriohc/byname without Composer
On this page you can find all versions of the php package gregoriohc/byname. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gregoriohc/byname
More information about gregoriohc/byname
Files in gregoriohc/byname
Package byname
Short Description PHP trait for bynaming (nicknaming) classes/objects
License MIT
Homepage https://github.com/gregoriohc/byname
Informations about the package byname
byname
PHP trait for bynaming (nicknaming) classes/objects.
Install
Via Composer
Usage
By default, the class byname is the class basename (without namespace).
Removing prefix and/or suffix
You can remove some characters from the beginning (prefix) or the end (suffix) of the byname overriding the bynamePrefix
and bynameSuffix
methods and returning the string to remove or the number of characters.
A more complex example, mixing this with inheritance:
Custom byname
You can set a custom byname overriding the bynameValue
method.
Case
Yu can also get the name in three diferent cases:
Testing
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email gregoriohc@gmail.com instead of using the issue tracker.
Socialware
You're free to use this package, but if it makes it to your production environment I highly appreciate you sharing it on any social network.
Credits
- Gregorio Hernández Caso
- All Contributors
License
The MIT License (MIT). Please see License File for more information.