Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization.
The plugin will add data types that will allow you to store serialized data in your database.
- CakePHP 3.0+
Check the official documentation on how to use data types:
- http://book.cakephp.org/3.0/en/orm/saving-data.html#saving-complex-types
- http://book.cakephp.org/3.0/en/orm/database-basics.html#adding-custom-database-types
The following types are included in this plugin:
- Json (using json_decode and json_encode)
- Serialize (using serialize and unserialize)
Please notice this security warning from the official php documentation when using the Serialize data type:
Do not pass untrusted user input to unserialize(). Unserialization can result in code being loaded and executed due to object instantiation and autoloading, and a malicious user may be able to exploit this. Use a safe, standard data interchange format such as JSON (via json_decode() and json_encode()) if you need to pass serialized data to the user.
For support and feature request, please visit the Support Site.
- The master branch holds the
STABLE
latest version of the plugin. - The develop branch is
UNSTABLE
and used to test new features before releasing them. - Only hot fixes are accepted against the master branch.
Please feel free to contribute to the plugin with new issues, requests, unit tests and code fixes or new features. If you want to contribute some code, create a feature branch from develop, and send us your pull request. Unit tests for new features and issues detected are mandatory to keep quality high.
- Pull requests must be send to the
develop
branch. - Contributions must follow the PSR2 coding standard recommendation.
- Unit tests are required.
Copyright 2013 - 2016 Florian Krämer
Licensed under the MIT License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.