Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Zend_Pdf_Destination_Explicit Class Reference
Inheritance diagram for Zend_Pdf_Destination_Explicit:
Zend_Pdf_Destination Zend_Pdf_Target Zend_Pdf_Destination_Fit Zend_Pdf_Destination_FitBoundingBox Zend_Pdf_Destination_FitBoundingBoxHorizontally Zend_Pdf_Destination_FitBoundingBoxVertically Zend_Pdf_Destination_FitHorizontally Zend_Pdf_Destination_FitRectangle Zend_Pdf_Destination_FitVertically Zend_Pdf_Destination_Unknown Zend_Pdf_Destination_Zoom

Public Member Functions

 __construct (Zend_Pdf_Element $destinationArray)
 
 isRemote ()
 
 getResource ()
 
- Public Member Functions inherited from Zend_Pdf_Target
 getResource ()
 

Protected Attributes

 $_destinationArray
 
 $_isRemote
 

Additional Inherited Members

- Static Public Member Functions inherited from Zend_Pdf_Destination
static load (Zend_Pdf_Element $resource)
 
- Static Public Member Functions inherited from Zend_Pdf_Target
static load (Zend_Pdf_Element $resource)
 

Detailed Description

Definition at line 39 of file Explicit.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Zend_Pdf_Element  $destinationArray)

Explicit destination object constructor

Parameters
Zend_Pdf_Element$destinationArray
Exceptions
Zend_Pdf_Exception

Definition at line 61 of file Explicit.php.

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()) {
88  $this->_isRemote = true;
89  break;
90 
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  }
const TYPE_NUMERIC
Definition: Element.php:33
const TYPE_ARRAY
Definition: Element.php:36
const TYPE_DICTIONARY
Definition: Element.php:37

Member Function Documentation

◆ getResource()

getResource ( )

Get resource

Definition at line 118 of file Explicit.php.

119  {
121  }

◆ isRemote()

isRemote ( )

Returns true if it's a remote destination

Returns
boolean

Definition at line 107 of file Explicit.php.

108  {
109  return $this->_isRemote;
110  }

Field Documentation

◆ $_destinationArray

$_destinationArray
protected

Definition at line 46 of file Explicit.php.

◆ $_isRemote

$_isRemote
protected

Definition at line 53 of file Explicit.php.


The documentation for this class was generated from the following file: