Hoa central
Public Member Functions | Protected Attributes | List of all members
Hoa\Realdom\Crate\Variable Class Reference
Inheritance diagram for Hoa\Realdom\Crate\Variable:

Public Member Functions

 __construct (Realdom\IRealdom\Holder $variable)
 
 setVariable (Realdom\IRealdom\Holder $variable)
 
 getVariable ()
 
getDomains ()
 
 getTypes ()
 
 accept (Visitor\Visit $visitor, &$handle=null, $eldnah=null)
 
- Public Member Functions inherited from Hoa\Visitor\Element
 accept (Visit $visitor, &$handle=null, $eldnah=null)
 

Protected Attributes

 $_variable = null
 

Detailed Description

Class .

Represent a variable.

Definition at line 50 of file Variable.php.

Constructor & Destructor Documentation

Hoa\Realdom\Crate\Variable::__construct ( Realdom\IRealdom\Holder  $variable)

Constructor.

Parameters
\Hoa\Realdom\IRealdom\Holder$variableVariable.
Returns
void

Definition at line 67 of file Variable.php.

68  {
69  $this->setVariable($variable);
70 
71  return;
72  }
setVariable(Realdom\IRealdom\Holder $variable)
Definition: Variable.php:80

Here is the call graph for this function:

Member Function Documentation

Hoa\Realdom\Crate\Variable::accept ( Visitor\Visit  $visitor,
$handle = null,
  $eldnah = null 
)

Accept a visitor.

Parameters
\Hoa\Visitor\Visit$visitorVisitor.
mixed&$handleHandle (reference).
mixed$eldnahHandle (no reference).
Returns
mixed

Definition at line 133 of file Variable.php.

137  {
138  return $visitor->visit($this, $handle, $eldnah);
139  }
& Hoa\Realdom\Crate\Variable::getDomains ( )

Get domains of the variable.

Returns

Definition at line 104 of file Variable.php.

105  {
106  return $this->_domains;
107  }

Here is the caller graph for this function:

Hoa\Realdom\Crate\Variable::getTypes ( )

Get crate types.

Returns
array

Implements Hoa\Realdom\IRealdom\Crate.

Definition at line 114 of file Variable.php.

115  {
116  $out = [];
117 
118  foreach ($this->getDomains() as $realdom) {
119  $out[] = get_class($realdom);
120  }
121 
122  return $out;
123  }

Here is the call graph for this function:

Hoa\Realdom\Crate\Variable::getVariable ( )

Get variable.

Returns

Definition at line 94 of file Variable.php.

95  {
96  return $this->_variable;
97  }
Hoa\Realdom\Crate\Variable::setVariable ( Realdom\IRealdom\Holder  $variable)

Set variable.

Parameters
\Hoa\Realdom\IRealdom\Holder$variableVariable.
Returns

Definition at line 80 of file Variable.php.

81  {
82  $old = $this->_variable;
83  $this->_variable = $variable;
84  $this->_domains = &$variable->getDomains();
85 
86  return $old;
87  }

Here is the caller graph for this function:

Member Data Documentation

Hoa\Realdom\Crate\Variable::$_variable = null
protected

Definition at line 57 of file Variable.php.


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