Download the PHP package jameslevi/objectify without Composer
On this page you can find all versions of the php package jameslevi/objectify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jameslevi/objectify
More information about jameslevi/objectify
Files in jameslevi/objectify
Package objectify
Short Description Is a simple data to object wrapper library in PHP.
License MIT
Informations about the package objectify
Objectify
Is a simple data to object wrapper library in PHP.
Installation
-
You can install via composer.
-
If not using any framework, include the composer autoload mechanism at the upper section of your code.
- Import the objectify class.
Getting Started
-
Instantiate a new objectify class.
- You can access each data using get method.
You can also retrieve data as an object property.
- You can also update values of each data.
You can also set value as an object property.
-
You can add new data using add method.
-
You can also check if data object contains keyword.
-
You can remove data from the data object.
-
You can return all data object keys.
-
To retrieve the object data, just use the toArray method.
- You can also return JSON formatted data.
Extend Objectify
-
You can extend objectify to an entity. For this example let's use car as an entity.
-
Now let's instantiate a new car object.
-
We can now manipulate car object data.
- Now let's echo the driver of our car.
Muted Data Object
Adding, updating or deleting of data is disabled when data object is muted.
Cloning Data Object
You can create multiple copies of data object using clone method.
Contribution
For issues, concerns and suggestions, you can email James Crisostomo via [email protected].
License
This package is an open-sourced software licensed under MIT License.