Hoa central
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Hoa\Praspel\Model\Clause Class Reference
Inheritance diagram for Hoa\Praspel\Model\Clause:

Public Member Functions

 __construct (Clause $parent)
 
 getParent ()
 
 getRoot ()
 
 getName ()
 
 getId ()
 
 accept (Visitor\Visit $visitor, &$handle=null, $eldnah=null)
 
- Public Member Functions inherited from Hoa\Visitor\Element
 accept (Visit $visitor, &$handle=null, $eldnah=null)
 

Protected Member Functions

 setParent (Clause $parent)
 
 _getId ()
 

Protected Attributes

 $_parent = null
 

Detailed Description

Class .

Represent a clause.

Definition at line 49 of file Clause.php.

Constructor & Destructor Documentation

Hoa\Praspel\Model\Clause::__construct ( Clause  $parent)

Build a clause.

Parameters
\Hoa\Praspel\Model\Clause$parentParent.
Returns
void

Definition at line 73 of file Clause.php.

74  {
75  $this->setParent($parent);
76 
77  return;
78  }
setParent(Clause $parent)
Definition: Clause.php:86

Here is the call graph for this function:

Member Function Documentation

Hoa\Praspel\Model\Clause::_getId ( )
protected

Get identifier (fallback).

Returns
string

Definition at line 153 of file Clause.php.

154  {
155  return $this->getName();
156  }

Here is the call graph for this function:

Here is the caller graph for this function:

Hoa\Praspel\Model\Clause::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 166 of file Clause.php.

170  {
171  return $visitor->visit($this, $handle, $eldnah);
172  }
Hoa\Praspel\Model\Clause::getId ( )

Get identifier.

Returns
string

Definition at line 135 of file Clause.php.

136  {
137  $out = null;
138  $parent = $this->getParent();
139 
140  if (null !== $parent &&
141  !($parent instanceof Specification)) {
142  $out .= $this->getParent()->getId() . '_';
143  }
144 
145  return $out . $this->_getId();
146  }

Here is the call graph for this function:

Here is the caller graph for this function:

Hoa\Praspel\Model\Clause::getName ( )

Get clause name.

Returns
string

Definition at line 125 of file Clause.php.

126  {
127  return static::NAME;
128  }

Here is the caller graph for this function:

Hoa\Praspel\Model\Clause::getParent ( )

Get parent clause.

Returns

Definition at line 99 of file Clause.php.

100  {
101  return $this->_parent;
102  }

Here is the caller graph for this function:

Hoa\Praspel\Model\Clause::getRoot ( )

Get the root clause.

Returns

Definition at line 109 of file Clause.php.

110  {
111  $parent = $this;
112 
113  while (null !== $nextParent = $parent->getParent()) {
114  $parent = $nextParent;
115  }
116 
117  return $parent;
118  }
Hoa\Praspel\Model\Clause::setParent ( Clause  $parent)
protected

Set parent clause.

Parameters
\Hoa\Praspel\Model\Clause$parentParent.
Returns

Definition at line 86 of file Clause.php.

87  {
88  $old = $this->_parent;
89  $this->_parent = $parent;
90 
91  return $old;
92  }

Here is the caller graph for this function:

Member Data Documentation

Hoa\Praspel\Model\Clause::$_parent = null
protected

Definition at line 63 of file Clause.php.


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