diff -r 000000000000 -r 4eba9c11703f web/Zend/Pdf/Destination/Named.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Pdf/Destination/Named.php Mon Dec 13 18:29:26 2010 +0100 @@ -0,0 +1,101 @@ +getType() != Zend_Pdf_Element::TYPE_NAME && $resource->getType() != Zend_Pdf_Element::TYPE_STRING) { + require_once 'Zend/Pdf/Exception.php'; + throw new Zend_Pdf_Exception('Named destination resource must be a PDF name or a PDF string.'); + } + + $this->_nameElement = $resource; + } + + /** + * Create named destination object + * + * @param string $name + * @return Zend_Pdf_Destination_Named + */ + public static function create($name) + { + return new Zend_Pdf_Destination_Named(new Zend_Pdf_Element_String($name)); + } + + /** + * Get name + * + * @return Zend_Pdf_Element + */ + public function getName() + { + return $this->_nameElement->value; + } + + /** + * Get resource + * + * @internal + * @return Zend_Pdf_Element + */ + public function getResource() + { + return $this->_nameElement; + } +}