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
Destination
Explicit.php
Go to the documentation of this file.
1
<?php
25
#require_once 'Zend/Pdf/Element.php';
26
27
29
#require_once 'Zend/Pdf/Destination.php';
30
39
abstract
class
Zend_Pdf_Destination_Explicit
extends
Zend_Pdf_Destination
40
{
46
protected
$_destinationArray
;
47
53
protected
$_isRemote
;
54
61
public
function
__construct
(
Zend_Pdf_Element
$destinationArray)
62
{
63
if
($destinationArray->
getType
() !=
Zend_Pdf_Element::TYPE_ARRAY
) {
64
#require_once 'Zend/Pdf/Exception.php';
65
throw
new
Zend_Pdf_Exception
(
'Explicit destination resource Array must be a direct or an indirect array object.'
);
66
}
67
68
$this->_destinationArray = $destinationArray;
69
70
switch
(count($this->_destinationArray->items)) {
71
case
0:
72
#require_once 'Zend/Pdf/Exception.php';
73
throw
new
Zend_Pdf_Exception
(
'Destination array must contain a page reference.'
);
74
break
;
75
76
case
1:
77
#require_once 'Zend/Pdf/Exception.php';
78
throw
new
Zend_Pdf_Exception
(
'Destination array must contain a destination type name.'
);
79
break
;
80
81
default
:
82
// Do nothing
83
break
;
84
}
85
86
switch
($this->_destinationArray->items[0]->getType()) {
87
case
Zend_Pdf_Element::TYPE_NUMERIC
:
88
$this->_isRemote =
true
;
89
break
;
90
91
case
Zend_Pdf_Element::TYPE_DICTIONARY
:
92
$this->_isRemote =
false
;
93
break
;
94
95
default
:
96
#require_once 'Zend/Pdf/Exception.php';
97
throw
new
Zend_Pdf_Exception
(
'Destination target must be a page number or page dictionary object.'
);
98
break
;
99
}
100
}
101
107
public
function
isRemote
()
108
{
109
return
$this->_isRemote
;
110
}
111
118
public
function
getResource
()
119
{
120
return
$this->_destinationArray
;
121
}
122
}
Zend_Pdf_Element\getType
getType()
Zend_Pdf_Element\TYPE_NUMERIC
const TYPE_NUMERIC
Definition:
Element.php:33
Zend_Pdf_Element\TYPE_ARRAY
const TYPE_ARRAY
Definition:
Element.php:36
Zend_Pdf_Destination_Explicit
Definition:
Explicit.php:39
Zend_Pdf_Destination_Explicit\$_destinationArray
$_destinationArray
Definition:
Explicit.php:46
Zend_Pdf_Element\TYPE_DICTIONARY
const TYPE_DICTIONARY
Definition:
Element.php:37
Zend_Pdf_Element
Definition:
Element.php:30
Zend_Pdf_Destination_Explicit\$_isRemote
$_isRemote
Definition:
Explicit.php:53
Zend_Pdf_Destination_Explicit\getResource
getResource()
Definition:
Explicit.php:118
Zend_Pdf_Destination
Definition:
Destination.php:40
Zend_Pdf_Destination_Explicit\__construct
__construct(Zend_Pdf_Element $destinationArray)
Definition:
Explicit.php:61
Zend_Pdf_Exception
Definition:
Exception.php:51
Zend_Pdf_Destination_Explicit\isRemote
isRemote()
Definition:
Explicit.php:107