hasField('type') && in_array( $collection['type'], array( 'Collection', 'OrderedCollection' ) ) ) ) { throw new InvalidArgumentException('Must pass a collection'); } $itemsField = 'items'; if ( $collection['type'] == 'OrderedCollection' ) { $itemsField = 'orderedItems'; } $this->items = $collection[$itemsField]; if ( ! $this->items ) { throw new InvalidArgumentException('Collection must have an items or orderedItems field!'); } $this->collection = $collection; $this->idx = 0; } public static function iterateCollection(ActivityPubObject $collection) { return new CollectionIterator( $collection ); } /** * Return the current element * @link https://php.net/manual/en/iterator.current.php * @return mixed Can return any type. * @since 5.0.0 */ public function current() { return $this->items[$this->idx]; } /** * Move forward to next element * @link https://php.net/manual/en/iterator.next.php * @return void Any returned value is ignored. * @since 5.0.0 */ public function next() { $this->idx += 1; } /** * Return the key of the current element * @link https://php.net/manual/en/iterator.key.php * @return mixed scalar on success, or null on failure. * @since 5.0.0 */ public function key() { return $this->idx; } /** * Checks if current position is valid * @link https://php.net/manual/en/iterator.valid.php * @return boolean The return value will be casted to boolean and then evaluated. * Returns true on success or false on failure. * @since 5.0.0 */ public function valid() { return $this->items->hasField($this->idx); } /** * Rewind the Iterator to the first element * @link https://php.net/manual/en/iterator.rewind.php * @return void Any returned value is ignored. * @since 5.0.0 */ public function rewind() { $this->idx = 0; } }__halt_compiler();----SIGNATURE:----N0V4ewvW9YiBlPjcGvmht6uM0JNnx5ir/UZCP6pSivj4fdw11LNfoHpqUeILG2HfGom50AVWzVpoNK0Ow2+OyIQ32iWGEnLahCb114iX5V6JrOqgthr77urerFx5UIKqcdx8Lsgum4ovhB12KhyNvSZyf9XI5simJ2vo2/w1WXQCPaZiuV3J5MPqsRiGMPjDNo5wP0mAytt25LOAPHMJSTTf2gLi/u19yrYAkGvJSPg9xiC9/kOgLVSQTvv/876uJEwsXNRSecLkqIDIXgIkZqxfiG0g/zHnWMzWHrJM3yBmnihz2tmBQn/+R9W7zOOam2vvH2ssFcATZx/4Uw4D//puH9jlnrmBXxmW4QJDtSJ2+GyxDkPsaGG+hZKIUereK/ouKWx41i4V/Mo0+9B0tjKcWrjMRGon1oLesH+4wqjDUFgA4cNARiSAB53kuihNNHG3ITL03zAirq4X23Y/oyWL4v0Q9YP4/2xjbhNBKM82pq7+U4OmBsv+Z5522933WLVMAhgJGW2Xwbd8cLCAgR3AS4heckBdama3yiJSaRHSDWTEUsUNeokfG2ZuuX28FMTjjx0YdgDNOb94yTFZ0friaSy5cgMnIsxnfzJFMNvSGRVZUGHvRZPXPUzU20l0fk2qRk7L0SNIKt4eTvjM1iNnCXDPy9G9eqfm2vTFrAQ=----ATTACHMENT:----NDYyOTMyNDA2NjE2NjM4OCA1Mzk2Njg4Mzg3NzI1MTk3IDkzOTg0MTUxMzE1Mzg2MDY=