Object/Element/CacheCollection.php
public function serialize()
    {
        $dateTime = new \DateTime();
        $dateTime->setTimestamp($dateTime->getTimestamp() + $this->timestampOffset);
        
        foreach ($this->elements as $element) {
            if ($element instanceof CacheElement) {
                $element->setTimeOver($dateTime);
            }
        }
        
        return serialize(array(
            "id" => $this->id,
            "elements" => $this->elements
        ));
    }
public function serialize()
    {
        $dateTime = new \DateTime();
        $dateTime->setTimestamp($dateTime->getTimestamp() + $this->timestampOffset);
        
        foreach ($this->elements as $element) {
            if ($element instanceof CacheElement) {
                $element->setTimeOver($dateTime);
            }
        }
        
        return serialize(array(
            "id" => $this->id,
            "elements" => $this->elements
        ));
    }
Serialize

Serialize the current
instance

@see Serializable::serialize()