Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Static Public Member Functions | Protected Attributes
Zend_Pdf_Action_GoTo Class Reference
Inheritance diagram for Zend_Pdf_Action_GoTo:
Zend_Pdf_Action Zend_Pdf_Target

Public Member Functions

 __construct (Zend_Pdf_Element $dictionary, SplObjectStorage $processedActions)
 
 setDestination (Zend_Pdf_Destination $destination)
 
 getDestination ()
 
- Public Member Functions inherited from Zend_Pdf_Action
 __construct (Zend_Pdf_Element $dictionary, SplObjectStorage $processedActions)
 
 getResource ()
 
 dumpAction (Zend_Pdf_ElementFactory_Interface $factory, SplObjectStorage $processedActions=null)
 
 current ()
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 
 getChildren ()
 
 hasChildren ()
 
 count ()
 
- Public Member Functions inherited from Zend_Pdf_Target
 getResource ()
 

Static Public Member Functions

static create ($destination)
 
- Static Public Member Functions inherited from Zend_Pdf_Action
static load (Zend_Pdf_Element $dictionary, SplObjectStorage $processedActions=null)
 
- Static Public Member Functions inherited from Zend_Pdf_Target
static load (Zend_Pdf_Element $resource)
 

Protected Attributes

 $_destination
 
- Protected Attributes inherited from Zend_Pdf_Action
 $_actionDictionary
 
 $_originalNextList
 

Additional Inherited Members

- Data Fields inherited from Zend_Pdf_Action
 $next = array()
 

Detailed Description

Definition at line 41 of file GoTo.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Zend_Pdf_Element  $dictionary,
SplObjectStorage  $processedActions 
)

Object constructor

Parameters
Zend_Pdf_Element_Dictionary$dictionary
SplObjectStorage$processedActionslist of already processed action dictionaries, used to avoid cyclic references

Definition at line 57 of file GoTo.php.

58  {
59  parent::__construct($dictionary, $processedActions);
60 
61  $this->_destination = Zend_Pdf_Destination::load($dictionary->D);
62  }
static load(Zend_Pdf_Element $resource)
Definition: Destination.php:49

Member Function Documentation

◆ create()

static create (   $destination)
static

Create new Zend_Pdf_Action_GoTo object using specified destination

Parameters
Zend_Pdf_Destination | string$destination
Returns
Zend_Pdf_Action_GoTo

Definition at line 70 of file GoTo.php.

71  {
72  if (is_string($destination)) {
73  #require_once 'Zend/Pdf/Destination/Named.php';
74  $destination = Zend_Pdf_Destination_Named::create($destination);
75  }
76 
77  if (!$destination instanceof Zend_Pdf_Destination) {
78  #require_once 'Zend/Pdf/Exception.php';
79  throw new Zend_Pdf_Exception('$destination parameter must be a Zend_Pdf_Destination object or string.');
80  }
81 
82  $dictionary = new Zend_Pdf_Element_Dictionary();
83  $dictionary->Type = new Zend_Pdf_Element_Name('Action');
84  $dictionary->S = new Zend_Pdf_Element_Name('GoTo');
85  $dictionary->Next = null;
86  $dictionary->D = $destination->getResource();
87 
88  return new Zend_Pdf_Action_GoTo($dictionary, new SplObjectStorage());
89  }
static create($name)
Definition: Named.php:76

◆ getDestination()

getDestination ( )

Get goto action destination

Returns
Zend_Pdf_Destination

Definition at line 112 of file GoTo.php.

113  {
114  return $this->_destination;
115  }

◆ setDestination()

setDestination ( Zend_Pdf_Destination  $destination)

Set goto action destination

Parameters
Zend_Pdf_Destination | string$destination
Returns
Zend_Pdf_Action_GoTo

Definition at line 97 of file GoTo.php.

98  {
99  $this->_destination = $destination;
100 
101  $this->_actionDictionary->touch();
102  $this->_actionDictionary->D = $destination->getResource();
103 
104  return $this;
105  }

Field Documentation

◆ $_destination

$_destination
protected

Definition at line 48 of file GoTo.php.


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