Download .zip |
Info | Example | Screenshots | View files (10) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2017-04-12 (15 hours ago) | Not enough user ratings | Total: 172 This week: 14 | All time: 8,137 This week: 61 |
Version | License | PHP version | Categories | |||
serialiazable 1.0.4 | The PHP License | 5 | PHP 5, Language |
Description | Author | |||
This class can perform automatic serialization of objects with getters. Innovation Award
|
this helps to serialize php object
to use it call the static method called serilaizable which will take in the obect as parameter. see example below
$user = new User();
$user->setFirstname("Theophilus");
$user->setLastname("Omoregbee");
$user->setStates(array(new State("Edo state", "ED"), new State("Lagos State", "LG")));
$user->setCountry(new Country("Nigeria","NG"));
$user->setRoles(array("ADMIN","DB MANAGER"));
$user->setEmail("theo4u@ymail.com");
$user->setPassword("1111");
//lets serialize our object now
echo json_encode(SerializeMe::serialize($user));
which will lead to this output
{"firstname":"Theophilus","lastname":"Omoregbee","states":[{"name":"Edo state","code":"ED"},{"name":"Lagos State","code":"LG"}],"country":{"name":"Nigeria","code":"NG"},"dateCreated":1477351778,"roles":["ADMIN","DB MANAGER"],"email":"theo4u@ymail.com","password":"b59c67bf196a4758191e42f76670ceba"}
Allow contributions to make it faster and re-usable
Screenshots | ||
Files |
File | Role | Description | ||
---|---|---|---|---|
.idea (3 files, 1 directory) | ||||
composer.json | Data | Auxiliary data | ||
example.php | Example | Example script | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation | ||
serializable.png | Data | Auxiliary data | ||
Serialize.php | Class | Class source |
Files | / | .idea |
File | Role | Description | ||
---|---|---|---|---|
copyright (1 file) | ||||
modules.xml | Data | Auxiliary data | ||
php-serializable.iml | Data | Auxiliary data | ||
vcs.xml | Data | Auxiliary data |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
90% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.