buffered()); } /** * Unserializes the passed string and rebuilds the Collection instance * * @param string $collection The serialized collection * @return void */ public function unserialize($collection) { $this->__construct(unserialize($collection)); } /** * Throws an exception. * * Issuing a count on a Collection can have many side effects, some making the * Collection unusable after the count operation. * * @return void * @throws \LogicException */ public function count() { throw new LogicException('You cannot issue a count on a Collection.'); } /** * Returns an array that can be used to describe the internal state of this * object. * * @return array */ public function __debugInfo() { return [ 'count' => iterator_count($this), ]; } }