import v1.1.0_RC2 | 2009-09-20
This commit is contained in:
@ -14,8 +14,9 @@
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Pdf
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Object.php 17182 2009-07-27 13:54:11Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
@ -31,7 +32,7 @@ require_once 'Zend/Pdf/ElementFactory.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Pdf
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Pdf_Element_Object extends Zend_Pdf_Element
|
||||
@ -76,7 +77,7 @@ class Zend_Pdf_Element_Object extends Zend_Pdf_Element
|
||||
public function __construct(Zend_Pdf_Element $val, $objNum, $genNum, Zend_Pdf_ElementFactory $factory)
|
||||
{
|
||||
if ($val instanceof self) {
|
||||
throw new Zend_Pdf_Exception('Object number must not be instance of Zend_Pdf_Element_Object.');
|
||||
throw new Zend_Pdf_Exception('Object number must not be an instance of Zend_Pdf_Element_Object.');
|
||||
}
|
||||
|
||||
if ( !(is_integer($objNum) && $objNum > 0) ) {
|
||||
@ -92,7 +93,9 @@ class Zend_Pdf_Element_Object extends Zend_Pdf_Element
|
||||
$this->_genNum = $genNum;
|
||||
$this->_factory = $factory;
|
||||
|
||||
$factory->registerObject($this);
|
||||
$this->setParentObject($this);
|
||||
|
||||
$factory->registerObject($this, $objNum . ' ' . $genNum);
|
||||
}
|
||||
|
||||
|
||||
@ -205,20 +208,7 @@ class Zend_Pdf_Element_Object extends Zend_Pdf_Element
|
||||
*/
|
||||
public function __call($method, $args)
|
||||
{
|
||||
switch (count($args)) {
|
||||
case 0:
|
||||
return $this->_value->$method();
|
||||
case 1:
|
||||
return $this->_value->$method($args[0]);
|
||||
case 2:
|
||||
return $this->_value->$method($args[0], $args[1]);
|
||||
case 3:
|
||||
return $this->_value->$method($args[0], $args[1], $args[2]);
|
||||
case 4:
|
||||
return $this->_value->$method($args[0], $args[1], $args[2], $args[3]);
|
||||
default:
|
||||
throw new Zend_Pdf_Exception('Unsupported number of arguments');
|
||||
}
|
||||
return call_user_func_array(array($this->_value, $method), $args);
|
||||
}
|
||||
|
||||
|
||||
@ -230,6 +220,16 @@ class Zend_Pdf_Element_Object extends Zend_Pdf_Element
|
||||
$this->_factory->markAsModified($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return object, which can be used to identify object and its references identity
|
||||
*
|
||||
* @return Zend_Pdf_Element_Object
|
||||
*/
|
||||
public function getObject()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up resources, used by object
|
||||
*/
|
||||
|
Reference in New Issue
Block a user