sophokles / dataobject
Sophokles Data Object Library
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/sophokles/dataobject
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 installto generate the vendor class autoloader
- The classes from Sophokles.dataobjectcan 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