/** * Defined by \SplObjectStorage * * Add photoSet entity * * @param \Sirprize\Flickr\PhotoSet\Entity $photoSet * @throws \Sirprize\Flickr\Exception * @return \Sirprize\Flickr\PhotoSet\Collection */ public function attach($photoSet, $data = null) { if (!$photoSet instanceof \Sirprize\Flickr\PhotoSet\Entity) { throw new \Sirprize\Flickr\Exception('expecting an instance of \\Sirprize\\Flickr\\PhotoSet\\Entity'); } parent::attach($photoSet); return $this; }
/** * Defined by \SplObjectStorage * * Add collection entity * * @param \Sirprize\Flickr\Collection\Entity $collection * @throws \Sirprize\Flickr\Exception * @return \Sirprize\Flickr\Collection\Collection */ public function attach($collection, $data = null) { if (!$collection instanceof \Sirprize\Flickr\Collection\Entity) { throw new \Sirprize\Flickr\Exception('expecting an instance of \\Sirprize\\Flickr\\Collection\\Entity'); } parent::attach($collection); return $this; }