lithium\data\Collection::serialize PHP Method

serialize() public method

Note: because of the limitations outlined below custom handlers are ignored with serialized objects. Pulls all results to entirely populate _data and closes the object freeing the associated result resource. This allows for skipping the _result property which may hold unserializable PDOStatements. Properties that hold anonymous functions are also skipped. Some of these can almost be reconstructed (_handlers) others cannot (_methodFilters).
public serialize ( ) : string
return string Serialized properties of the object.
    public function serialize()
    {
        $this->offsetGet(null);
        static::__destruct();
        $vars = get_object_vars($this);
        unset($vars['_result']);
        unset($vars['_handlers']);
        unset($vars['_methodFilters']);
        return serialize($vars);
    }