/** * Get hash code * * @return string Hash code */ public function getHashCode() { return md5($this->text . (is_null($this->hyperlink) ? '' : $this->hyperlink->getHashCode()) . __CLASS__); }
public function testIsInternal() { $object = new Hyperlink(); $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\Hyperlink', $object->setSlideNumber()); $this->assertTrue($object->isInternal()); $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\Hyperlink', $object->setUrl('http://www.github.com')); $this->assertFalse($object->isInternal()); }
/** * 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__); }