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

Public Member Functions

 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 getIterator ()
 
 count ()
 
- Public Member Functions inherited from Hoa\Praspel\Model\Clause
 __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)
 

Public Attributes

const NAME = 'description'
 

Protected Attributes

 $_examples = []
 
- Protected Attributes inherited from Hoa\Praspel\Model\Clause
 $_parent = null
 

Additional Inherited Members

- Protected Member Functions inherited from Hoa\Praspel\Model\Clause
 setParent (Clause $parent)
 
 _getId ()
 

Detailed Description

Class .

Represent the clause.

Definition at line 49 of file Description.php.

Member Function Documentation

Hoa\Praspel\Model\Description::count ( )

Count number of examples.

Returns
int

Definition at line 143 of file Description.php.

144  {
145  return count($this->_examples);
146  }
Hoa\Praspel\Model\Description::getIterator ( )

Iterator over examples.

Returns

Definition at line 133 of file Description.php.

134  {
135  return new Iterator\Map($this->_examples);
136  }
Hoa\Praspel\Model\Description::offsetExists (   $offset)

Check if an example exists.

Parameters
int$offsetOffset.
Returns
bool

Definition at line 77 of file Description.php.

78  {
79  return isset($this->_examples[$offset]);
80  }

Here is the caller graph for this function:

Hoa\Praspel\Model\Description::offsetGet (   $offset)

Get an example.

Parameters
int$offsetOffset.
Returns
string

Definition at line 88 of file Description.php.

89  {
90  if (false === $this->offsetExists($offset)) {
91  return null;
92  }
93 
94  return $this->_examples[$offset];
95  }

Here is the call graph for this function:

Hoa\Praspel\Model\Description::offsetSet (   $offset,
  $value 
)

Set an example.

Parameters
int$offsetOffset.
string$valueExample value.
Returns

Definition at line 104 of file Description.php.

105  {
106  if (null === $offset) {
107  $this->_examples[] = $value;
108  } else {
109  $this->_examples[$offset] = $value;
110  }
111 
112  return $this;
113  }
Hoa\Praspel\Model\Description::offsetUnset (   $offset)

Unset an example.

Parameters
int$offsetOffset.
Returns
void

Definition at line 121 of file Description.php.

122  {
123  unset($this->_examples[$offset]);
124 
125  return;
126  }

Member Data Documentation

Hoa\Praspel\Model\Description::$_examples = []
protected

Definition at line 67 of file Description.php.

const Hoa\Praspel\Model\Description::NAME = 'description'

Name.

string

Definition at line 60 of file Description.php.


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