micropackage / casegnostic
Casegnostic - access properties and methods both snake_case and camelCase
Installs: 5 612
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 1
Requires
- php: >=7.4
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-27 18:52:53 UTC
README
🧬 About Casegnostic
Package that simplifies transition from one coding standard to other, namely from snake_case to camelCase or vice-versa.
When you're about to break compatibility by changing method name from something_important() to somethingImportant() you can simply attach the trait.
use Micropackage\Casegnostic\Casegnostic; class Example { use Casegnostic; public function somethingImportant() { return true; } } $x = new Example(); // That works as expected: $x->somethingImportant(); // But that works too! 🤯 $x->something_important();
💾 Installation
composer require micropackage/casegnostic
🕹 Usage
Simply attach the trait to your class.
use Micropackage\Casegnostic\Casegnostic; class Example { use Casegnostic; }
📦 About the Micropackage project
Micropackages - as the name suggests - are micro packages with a tiny bit of reusable code, helpful particularly in WordPress development.
The aim is to have multiple packages which can be put together to create something bigger by defining only the structure.
Micropackages are maintained by BracketSpace.
📖 Changelog
📃 License
GNU General Public License (GPL) v3.0. See the LICENSE file for more information.