Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Static Public Member Functions
Zend_Pdf_Target Class Reference
Inheritance diagram for Zend_Pdf_Target:
Zend_Pdf_Action Zend_Pdf_Destination Zend_Pdf_Action_GoTo Zend_Pdf_Action_GoTo3DView Zend_Pdf_Action_GoToE Zend_Pdf_Action_GoToR Zend_Pdf_Action_Hide Zend_Pdf_Action_ImportData Zend_Pdf_Action_JavaScript Zend_Pdf_Action_Launch Zend_Pdf_Action_Movie Zend_Pdf_Action_Named Zend_Pdf_Action_Rendition Zend_Pdf_Action_ResetForm Zend_Pdf_Action_SetOCGState Zend_Pdf_Action_Sound Zend_Pdf_Action_SubmitForm Zend_Pdf_Action_Thread Zend_Pdf_Action_Trans Zend_Pdf_Action_Unknown Zend_Pdf_Action_URI Zend_Pdf_Destination_Explicit Zend_Pdf_Destination_Named

Public Member Functions

 getResource ()
 

Static Public Member Functions

static load (Zend_Pdf_Element $resource)
 

Detailed Description

Definition at line 32 of file Target.php.

Member Function Documentation

◆ getResource()

getResource ( )
abstract

Get resource

◆ load()

static load ( Zend_Pdf_Element  $resource)
static

Parse resource and return it as an Action or Explicit Destination

$param Zend_Pdf_Element $resource

Returns
Zend_Pdf_Destination|
Exceptions
Zend_Pdf_Exception

Definition at line 41 of file Target.php.

41  {
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';
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 ||
60  // Resource is an array, just treat it as an explicit destination array
61  #require_once 'Zend/Pdf/Destination.php';
63  } else {
64  #require_once 'Zend/Pdf/Exception.php';
65  throw new Zend_Pdf_Exception( 'Wrong resource type.' );
66  }
67  }
const TYPE_NAME
Definition: Element.php:35
const TYPE_ARRAY
Definition: Element.php:36
$resource
Definition: bulk.php:12
const TYPE_DICTIONARY
Definition: Element.php:37
const TYPE_STRING
Definition: Element.php:34
static load(Zend_Pdf_Element $resource)
Definition: Destination.php:49
static load(Zend_Pdf_Element $dictionary, SplObjectStorage $processedActions=null)
Definition: Action.php:115

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