PHP Classes

Recursive reference serialize: Serialize objects with cyclic references

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 32%Total: 345 All time: 7,039 This week: 660Up
Version License PHP version Categories
recursive-serialize 1.0The PHP License5.1PHP 5, Data types, Language
Description 

Author

This class can be used to serialize objects with cyclic references.

It can take an object value and generate a string that represents the information contained in the object.

The class can also do the opposite, i.e. process a string with an object representation and recreate the original object value.

The class takes care of cyclic object references, i.e. objects that reference other objects and those objects contain references back to the original objects.

It uses object keys to represent object values and detect cyclic references.

Innovation Award
PHP Programming Innovation award nominee
May 2009
Number 3


Prize: One book of choice by Manning
PHP serialize function can generate a string that may represent complex data structures, including those that may contain object references.

However, it cannot handle the situation of objects that reference each other in a cycle.

This class provides a practical workaround that can serialize and unserialize objects with cyclic references.

Manuel Lemos
Picture of nghia nguyen
Name: nghia nguyen <contact>
Classes: 1 package by
Country: Viet Nam Viet Nam
Age: 41
All time rank: 371419 in Viet Nam Viet Nam
Week rank: 170 Up2 in Viet Nam Viet Nam Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (6)  
File Role Description
Accessible without login Plain text file post-serialize-by-manager.php Example post serialize by manager helper
Accessible without login Plain text file serialize-example.php Example serialize example
Accessible without login Plain text file serialize-object-by-manager.php Example serialize object by manager helper
Plain text file SerializeManager.php Class Serialize Manager
Plain text file TSClass1.php Class TSClass1 implement demo
Accessible without login Plain text file unserialize-object-by-manager.php Example unserialize object by manager helper

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:345
This week:0
All time:7,039
This week:660Up
 User Ratings  
 
 All time
Utility:41%StarStarStar
Consistency:58%StarStarStar
Documentation:-
Examples:58%StarStarStar
Tests:-
Videos:-
Overall:32%StarStar
Rank:4248