/** * Get hash code * * @return string Hash code */ public function getHashCode() { return md5((is_object($this->slide) ? $this->slide->getHashCode() : '') . $this->offsetX . $this->offsetY . $this->width . $this->height . $this->rotation . $this->getFill()->getHashCode() . $this->shadow->getHashCode() . (is_null($this->hyperlink) ? '' : $this->hyperlink->getHashCode()) . __CLASS__); }
/** * Get index for slide * * @param \PhpOffice\PhpPowerpoint\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; }