/** * Get index for slide * * @param PHPPowerPoint_Slide $slide * @return Slide index * @throws Exception */ public function getIndex(PHPPowerPoint_Slide $slide) { foreach ($this->_slideCollection as $key => $value) { if ($value->getHashCode() == $slide->getHashCode()) { return $key; } } }
/** * Get hash code * * @return string Hash code */ public function getHashCode() { return md5($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 PHPPowerPoint_Slide $slide * @return Slide index * @throws Exception */ public function getIndex(PHPPowerPoint_Slide $slide) { $index = null; foreach ($this->_slideCollection as $key => $value) { if ($value->getHashCode() == $slide->getHashCode()) { $index = $key; break; } } return $index; }