public function copy() { $copied = clone $this; $slideCount = count($this->slideCollection); for ($i = 0; $i < $slideCount; ++$i) { $this->slideCollection[$i] = $this->slideCollection[$i]->copy(); $this->slideCollection[$i]->rebindParent($this); } return $copied; }
/** * Test copy presentation */ public function testCopy() { $object = new PhpPresentation(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PhpPresentation', $object->copy()); }