|Classes of Mahesh S||>||PHP Property Preprocessor||>||README.md||>||Download|
Property Value Pre-processor for PHP
This is a simple yet powerful trait which allows one to easily pre-process the properties before they are returned from the objects of classes which use it.
The preferred way to install this extension is to click here which will download the package as a zip file. Instructions on how to use it is explained below.
How to use
From the downloaded zip, place the file PreProcessorTrait.php in your project's 'traits' folder(please create one if it does not exist). In your classes, you can use the trait as below:
Suppose you have an object
You can get the minified data by calling like this:
From this point on, any class using the
Like this, you can add whatever methods in PreProcessorTrait and it can be used in any object in which this trait is used in the very same way explained above. For more use cases and examples, click here