Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
zendframework1
library
Zend
Pdf
Target.php
Go to the documentation of this file.
1
<?php
32
abstract
class
Zend_Pdf_Target
33
{
41
public
static
function
load
(
Zend_Pdf_Element
$resource
) {
42
#require_once 'Zend/Pdf/Element.php';
43
if
(
$resource
->getType() ==
Zend_Pdf_Element::TYPE_DICTIONARY
) {
44
if
((
$resource
->Type ===
null
||
$resource
->Type->value ==
'Action'
) &&
$resource
->S !==
null
) {
45
// It's a well-formed action, load it
46
#require_once 'Zend/Pdf/Action.php';
47
return
Zend_Pdf_Action::load
(
$resource
);
48
}
else
if
(
$resource
->D !==
null
) {
49
// It's a destination
50
$resource
=
$resource
->D;
51
}
else
{
52
#require_once 'Zend/Pdf/Exception.php';
53
throw
new
Zend_Pdf_Exception
(
'Wrong resource type.'
);
54
}
55
}
56
57
if
(
$resource
->getType() ==
Zend_Pdf_Element::TYPE_ARRAY
||
58
$resource
->getType() ==
Zend_Pdf_Element::TYPE_NAME
||
59
$resource
->getType() ==
Zend_Pdf_Element::TYPE_STRING
) {
60
// Resource is an array, just treat it as an explicit destination array
61
#require_once 'Zend/Pdf/Destination.php';
62
return
Zend_Pdf_Destination::load
(
$resource
);
63
}
else
{
64
#require_once 'Zend/Pdf/Exception.php';
65
throw
new
Zend_Pdf_Exception
(
'Wrong resource type.'
);
66
}
67
}
68
75
abstract
public
function
getResource
();
76
}
Zend_Pdf_Target
Definition:
Target.php:32
Zend_Pdf_Element\TYPE_NAME
const TYPE_NAME
Definition:
Element.php:35
Zend_Pdf_Element\TYPE_ARRAY
const TYPE_ARRAY
Definition:
Element.php:36
Zend_Pdf_Target\getResource
getResource()
$resource
$resource
Definition:
bulk.php:12
Zend_Pdf_Element\TYPE_DICTIONARY
const TYPE_DICTIONARY
Definition:
Element.php:37
Zend_Pdf_Element
Definition:
Element.php:30
Zend_Pdf_Element\TYPE_STRING
const TYPE_STRING
Definition:
Element.php:34
Zend_Pdf_Target\load
static load(Zend_Pdf_Element $resource)
Definition:
Target.php:41
Zend_Pdf_Exception
Definition:
Exception.php:51
Zend_Pdf_Destination\load
static load(Zend_Pdf_Element $resource)
Definition:
Destination.php:49
Zend_Pdf_Action\load
static load(Zend_Pdf_Element $dictionary, SplObjectStorage $processedActions=null)
Definition:
Action.php:115