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

Public Member Functions

 __construct ()
 
 getImplicitVariable ($identifier)
 
 bindToClass ($classname)
 
 getBindedClass ()
 
- Public Member Functions inherited from Hoa\Praspel\Model\Behavior
 getClause ($clause)
 
 addClause (Clause $clause)
 
 clauseExists ($clause)
 
 setIdentifier ($identifier)
 
 getIdentifier ()
 
- 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 = ''
 
- Public Attributes inherited from Hoa\Praspel\Model\Behavior
const NAME = 'behavior'
 

Protected Member Functions

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

Protected Attributes

 $_implicitVariables = []
 
 $_bindedClass = null
 
- Protected Attributes inherited from Hoa\Praspel\Model\Behavior
 $_clauses = []
 
 $_identifier = null
 
- Protected Attributes inherited from Hoa\Praspel\Model\Clause
 $_parent = null
 

Static Protected Attributes

static $_allowedClauses
 
- Static Protected Attributes inherited from Hoa\Praspel\Model\Behavior
static $_allowedClauses
 

Additional Inherited Members

- Static Public Member Functions inherited from Hoa\Praspel\Model\Behavior
static getAllowedClauses ()
 

Detailed Description

Class .

Represent a specification (contains all clauses).

Definition at line 54 of file Specification.php.

Constructor & Destructor Documentation

Hoa\Praspel\Model\Specification::__construct ( )

Cancel the constructor from the parent.

Returns
void

Definition at line 100 of file Specification.php.

101  {
102  return;
103  }

Member Function Documentation

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

Get identifier (fallback).

Returns
string

Definition at line 151 of file Specification.php.

152  {
153  return 'praspel';
154  }
Hoa\Praspel\Model\Specification::bindToClass (   $classname)

Bind this specification to a specific class. Obligatory for dynamic or static resolutions.

Returns
string

Definition at line 128 of file Specification.php.

129  {
130  $old = $this->_bindedClass;
131  $this->_bindedClass = ltrim($classname, '\\');
132 
133  return $old;
134  }
Hoa\Praspel\Model\Specification::getBindedClass ( )

Get binded class.

Returns
string

Definition at line 141 of file Specification.php.

142  {
143  return $this->_bindedClass;
144  }
Hoa\Praspel\Model\Specification::getImplicitVariable (   $identifier)

Get an implicit variable.

Parameters
string$identifierIdentifier.
Returns

Definition at line 111 of file Specification.php.

112  {
113  if (isset($this->_implicitVariables[$identifier])) {
114  return $this->_implicitVariables[$identifier];
115  }
116 
117  return
118  $this->_implicitVariables[$identifier] =
119  new Variable\Implicit($identifier, false, $this);
120  }

Member Data Documentation

Hoa\Praspel\Model\Specification::$_allowedClauses
staticprotected
Initial value:
= [
'is',
'invariant',
'requires',
'behavior',
'default',
'ensures',
'throwable',
'description'
]

Definition at line 68 of file Specification.php.

Hoa\Praspel\Model\Specification::$_bindedClass = null
protected

Definition at line 91 of file Specification.php.

Hoa\Praspel\Model\Specification::$_implicitVariables = []
protected

Definition at line 84 of file Specification.php.

const Hoa\Praspel\Model\Specification::NAME = ''

Name.

string

Definition at line 61 of file Specification.php.


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