本文整理汇总了PHP中Zend_Pdf_Resource::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Pdf_Resource::__construct方法的具体用法?PHP Zend_Pdf_Resource::__construct怎么用?PHP Zend_Pdf_Resource::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Pdf_Resource
的用法示例。
在下文中一共展示了Zend_Pdf_Resource::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Object constructor.
*/
public function __construct()
{
parent::__construct('');
$this->_resource->dictionary->Type = new Zend_Pdf_Element_Name('XObject');
$this->_resource->dictionary->Subtype = new Zend_Pdf_Element_Name('Image');
}
示例2: __construct
/**
* Object constructor.
*
* @param Zend_Pdf_Element_Object_Stream|string $contentStreamObject
* @throws Zend_Pdf_Exception
*/
public function __construct($contentStreamObject = '')
{
if ($contentStreamObject !== null && !$contentStreamObject instanceof Zend_Pdf_Element_Object_Stream && !is_string($contentStreamObject)) {
require_once PHP_LIBRARY_PATH . 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception('Content stream parameter must be a string or stream object');
}
parent::__construct($contentStreamObject);
}
示例3: __construct
/**
* Object constructor.
*
* @param Zend_Pdf_Element_Object $extGStateObject
* @throws Zend_Pdf_Exception
*/
public function __construct(Zend_Pdf_Element_Object $extGStateObject = null)
{
if ($extGStateObject == null) {
// Create new Graphics State object
require_once 'Zend/Pdf/ElementFactory.php';
$factory = Zend_Pdf_ElementFactory::createFactory(1);
$gsDictionary = new Zend_Pdf_Element_Dictionary();
$gsDictionary->Type = new Zend_Pdf_Element_Name('ExtGState');
$extGStateObject = $factory->newObject($gsDictionary);
}
if ($extGStateObject->getType() != Zend_Pdf_Element::TYPE_DICTIONARY) {
require_once 'Zend/Pdf/Exception.php';
throw new Zend_Pdf_Exception('Graphics state PDF object must be a dictionary');
}
parent::__construct($gsDictionary);
}
示例4: __construct
/**
* Object constructor.
*
*/
public function __construct()
{
parent::__construct(new Zend_Pdf_Element_Dictionary());
$this->_resource->Type = new Zend_Pdf_Element_Name('Font');
}
示例5: __construct
/**
* Object constructor.
*
* The $embeddingOptions parameter allows you to set certain flags related
* to font embedding. You may combine options by OR-ing them together. See
* the EMBED_ constants defined in {@link Zend_Pdf_Font} for the list of
* available options and their descriptions.
*
* @param integer $embeddingOptions (optional) Options for font embedding.
* Only used for certain font types.
*/
public function __construct($embeddingOptions = 0)
{
parent::__construct(new Zend_Pdf_Element_Dictionary());
$this->_resource->Type = new Zend_Pdf_Element_Name('Font');
$this->_embeddingOptions = $embeddingOptions;
}