sophokles / dataobject
Sophokles Data Object Library
1.0.0
2024-04-16 05:38 UTC
Requires
- php: >=8.1, <8.9
Requires (Dev)
- phpunit/phpunit: ^11.0
README
Sophokles library to generate from any array a data object
Installation
- Include as composer dependency using
composer require sophokles/dataobject
- Run
composer install
to generate the vendor class autoloader - The classes from
Sophokles.dataobject
can now be used in your composer project
Usage Examples
Small usage examples have been included in the examples/ folder. The examples are PHP scripts which shows how the object classes work.
- Define a custom model class object extending AbstractDataObject
- Create a new object from your model class, use your data array in the constructor
- Access to the data on your object by getters and setters