本文整理汇总了PHP中Zend_Pdf_ElementFactory::registerObject方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Pdf_ElementFactory::registerObject方法的具体用法?PHP Zend_Pdf_ElementFactory::registerObject怎么用?PHP Zend_Pdf_ElementFactory::registerObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Pdf_ElementFactory
的用法示例。
在下文中一共展示了Zend_Pdf_ElementFactory::registerObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _dereference
/**
* Dereference.
* Take inderect object, take $value member of this object (must be Zend_Pdf_Element),
* take reference to the $value member of this object and assign it to
* $value member of current PDF Reference object
* $obj can be null
*
* @throws Zend_Pdf_Exception
*/
private function _dereference()
{
$obj = $this->_context->getParser()->getObject($this->_context->getRefTable()->getOffset($this->_objNum . ' ' . $this->_genNum . ' R'), $this->_context);
if ($obj === null) {
$this->_ref = new Zend_Pdf_Element_Null();
return;
}
if ($obj->toString() != $this->_objNum . ' ' . $this->_genNum . ' R') {
throw new Zend_Pdf_Exception('Incorrect reference to the object');
}
$this->_ref = $obj;
$this->setParentObject($obj);
$this->_factory->registerObject($this);
}
示例2: __construct
/**
* Object constructor
*
* @param Zend_Pdf_Element $val
* @param integer $objNum
* @param integer $genNum
* @param Zend_Pdf_ElementFactory $factory
* @throws Zend_Pdf_Exception
*/
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.');
}
if (!(is_integer($objNum) && $objNum > 0)) {
throw new Zend_Pdf_Exception('Object number must be positive integer.');
}
if (!(is_integer($genNum) && $genNum >= 0)) {
throw new Zend_Pdf_Exception('Generation number must be non-negative integer.');
}
$this->_value = $val;
$this->_objNum = $objNum;
$this->_genNum = $genNum;
$this->_factory = $factory;
$factory->registerObject($this);
}
示例3: __construct
/**
* Object constructor
*
* @param Zend_Pdf_Element $val
* @param integer $objNum
* @param integer $genNum
* @param Zend_Pdf_ElementFactory $factory
* @throws Zend_Pdf_Exception
*/
public function __construct(Zend_Pdf_Element $val, $objNum, $genNum, Zend_Pdf_ElementFactory $factory)
{
if ($val instanceof self) {
require_once PHP_LIBRARY_PATH . 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception('Object number must not be an instance of Zend_Pdf_Element_Object.');
}
if (!(is_integer($objNum) && $objNum > 0)) {
require_once PHP_LIBRARY_PATH . 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception('Object number must be positive integer.');
}
if (!(is_integer($genNum) && $genNum >= 0)) {
require_once PHP_LIBRARY_PATH . 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception('Generation number must be non-negative integer.');
}
$this->_value = $val;
$this->_objNum = $objNum;
$this->_genNum = $genNum;
$this->_factory = $factory;
$this->setParentObject($this);
$factory->registerObject($this, $objNum . ' ' . $genNum);
}