/** * Get index for slide * * @param \PhpOffice\PhpPresentation\Slide $slide * @return int * @throws \Exception */ public function getIndex(Slide $slide) { $index = null; foreach ($this->slideCollection as $key => $value) { if ($value->getHashCode() == $slide->getHashCode()) { $index = $key; break; } } return $index; }