Hoa central
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Hoa\Compiler\Llk\Rule\Rule Class Reference
Inheritance diagram for Hoa\Compiler\Llk\Rule\Rule:

Public Member Functions

 __construct ($name, $content, $nodeId=null)
 
 setName ($name)
 
 getName ()
 
 getContent ()
 
 setNodeId ($nodeId)
 
 getNodeId ()
 
 getNodeOptions ()
 
 setDefaultId ($defaultId)
 
 getDefaultId ()
 
 getDefaultOptions ()
 
 setPPRepresentation ($pp)
 
 getPPRepresentation ()
 
 isTransitional ()
 

Protected Member Functions

 setContent ($content)
 

Protected Attributes

 $_name = null
 
 $_content = null
 
 $_nodeId = null
 
 $_nodeOptions = []
 
 $_defaultId = null
 
 $_defaultOptions = []
 
 $_pp = null
 
 $_transitional = true
 

Detailed Description

Class .

Rule parent.

Definition at line 49 of file Rule.php.

Constructor & Destructor Documentation

Hoa\Compiler\Llk\Rule\Rule::__construct (   $name,
  $content,
  $nodeId = null 
)

Constructor.

Parameters
string$nameName.
mixed$contentContent.
string$nodeIdNode ID.
Returns
void

Definition at line 117 of file Rule.php.

118  {
119  $this->setName($name);
120  $this->setContent($content);
121  $this->setNodeId($nodeId);
122 
123  return;
124  }
$content
Definition: Hoa.php:119

Here is the call graph for this function:

Member Function Documentation

Hoa\Compiler\Llk\Rule\Rule::getContent ( )

Get rule content.

Returns
mixed

Definition at line 168 of file Rule.php.

169  {
170  return $this->_content;
171  }
Hoa\Compiler\Llk\Rule\Rule::getDefaultId ( )

Get default ID.

Returns
string

Definition at line 240 of file Rule.php.

241  {
242  return $this->_defaultId;
243  }
Hoa\Compiler\Llk\Rule\Rule::getDefaultOptions ( )

Get default options.

Returns
array

Definition at line 250 of file Rule.php.

251  {
252  return $this->_defaultOptions;
253  }
Hoa\Compiler\Llk\Rule\Rule::getName ( )

Get rule name.

Returns
string

Definition at line 145 of file Rule.php.

146  {
147  return $this->_name;
148  }
Hoa\Compiler\Llk\Rule\Rule::getNodeId ( )

Get node ID.

Returns
string

Definition at line 199 of file Rule.php.

200  {
201  return $this->_nodeId;
202  }
Hoa\Compiler\Llk\Rule\Rule::getNodeOptions ( )

Get node options.

array

Definition at line 209 of file Rule.php.

210  {
211  return $this->_nodeOptions;
212  }
Hoa\Compiler\Llk\Rule\Rule::getPPRepresentation ( )

Get PP representation of the rule.

Returns
string

Definition at line 275 of file Rule.php.

276  {
277  return $this->_pp;
278  }
Hoa\Compiler\Llk\Rule\Rule::isTransitional ( )

Check whether the rule is transitional or not.

Returns
bool

Definition at line 285 of file Rule.php.

286  {
287  return $this->_transitional;
288  }
Hoa\Compiler\Llk\Rule\Rule::setContent (   $content)
protected

Set rule content.

Returns
mixed

Definition at line 155 of file Rule.php.

156  {
157  $old = $this->_content;
158  $this->_content = $content;
159 
160  return $old;
161  }
$content
Definition: Hoa.php:119

Here is the caller graph for this function:

Hoa\Compiler\Llk\Rule\Rule::setDefaultId (   $defaultId)

Set default ID.

Parameters
string$defaultIdDefault ID.
Returns
string

Definition at line 220 of file Rule.php.

221  {
222  $old = $this->_defaultId;
223 
224  if (false !== $pos = strpos($defaultId, ':')) {
225  $this->_defaultId = substr($defaultId, 0, $pos);
226  $this->_defaultOptions = str_split(substr($defaultId, $pos + 1));
227  } else {
228  $this->_defaultId = $defaultId;
229  $this->_defaultOptions = [];
230  }
231 
232  return $old;
233  }
Hoa\Compiler\Llk\Rule\Rule::setName (   $name)

Set rule name.

Parameters
string$nameRule name.
Returns
string

Definition at line 132 of file Rule.php.

133  {
134  $old = $this->_name;
135  $this->_name = $name;
136 
137  return $old;
138  }

Here is the caller graph for this function:

Hoa\Compiler\Llk\Rule\Rule::setNodeId (   $nodeId)

Set node ID.

Parameters
string$nodeIdNode ID.
Returns
string

Definition at line 179 of file Rule.php.

180  {
181  $old = $this->_nodeId;
182 
183  if (false !== $pos = strpos($nodeId, ':')) {
184  $this->_nodeId = substr($nodeId, 0, $pos);
185  $this->_nodeOptions = str_split(substr($nodeId, $pos + 1));
186  } else {
187  $this->_nodeId = $nodeId;
188  $this->_nodeOptions = [];
189  }
190 
191  return $old;
192  }

Here is the caller graph for this function:

Hoa\Compiler\Llk\Rule\Rule::setPPRepresentation (   $pp)

Set PP representation of the rule.

Parameters
string$ppPP representation.
Returns
string

Definition at line 261 of file Rule.php.

262  {
263  $old = $this->_pp;
264  $this->_pp = $pp;
265  $this->_transitional = false;
266 
267  return $old;
268  }

Member Data Documentation

Hoa\Compiler\Llk\Rule\Rule::$_content = null
protected

Definition at line 63 of file Rule.php.

Hoa\Compiler\Llk\Rule\Rule::$_defaultId = null
protected

Definition at line 84 of file Rule.php.

Hoa\Compiler\Llk\Rule\Rule::$_defaultOptions = []
protected

Definition at line 91 of file Rule.php.

Hoa\Compiler\Llk\Rule\Rule::$_name = null
protected

Definition at line 56 of file Rule.php.

Hoa\Compiler\Llk\Rule\Rule::$_nodeId = null
protected

Definition at line 70 of file Rule.php.

Hoa\Compiler\Llk\Rule\Rule::$_nodeOptions = []
protected

Definition at line 77 of file Rule.php.

Hoa\Compiler\Llk\Rule\Rule::$_pp = null
protected

Definition at line 98 of file Rule.php.

Hoa\Compiler\Llk\Rule\Rule::$_transitional = true
protected

Definition at line 105 of file Rule.php.


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