Hoa central
Interpreter.php
Go to the documentation of this file.
1 <?php
2 
37 namespace Hoa\Xyl\Interpreter;
38 
39 use Hoa\Core;
40 
49 abstract class Interpreter
50 {
56  protected $_rank = [];
57 
63  protected $_resourcePath = null;
64 
65 
66 
73  public function __construct(Array $rank = [])
74  {
75  $this->setComponents($rank);
76 
77  return;
78  }
79 
86  public function setComponents(Array $rank)
87  {
88  foreach ($rank as $element => $component) {
89  $this->setComponent($element, $component);
90  }
91 
92  return;
93  }
94 
102  public function setComponent($element, $component)
103  {
104  $this->_rank[$element] = $component;
105 
106  return;
107  }
108 
114  public function getRank()
115  {
116  return $this->_rank;
117  }
118 
124  public function getResourcePath()
125  {
126  return $this->_resourcePath;
127  }
128 }
129 
133 Core\Consistency::flexEntity('Hoa\Xyl\Interpreter\Interpreter');
setComponent($element, $component)