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

Public Member Functions

 __construct (Array $data)
 
 getArray ()
 
- Public Member Functions inherited from Hoa\Ruler\Model\Bag\Bag
 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

 $_array = null
 

Detailed Description

Class .

Bag for an array.

Definition at line 47 of file RulerArray.php.

Constructor & Destructor Documentation

Hoa\Ruler\Model\Bag\RulerArray::__construct ( Array  $data)

Constructor.

Parameters
array$dataData.
Returns
void

Definition at line 64 of file RulerArray.php.

65  {
66  foreach ($data as &$datum) {
67  if ($datum instanceof Bag) {
68  continue;
69  }
70 
71  if (is_scalar($datum) || null === $datum) {
72  $datum = new Scalar($datum);
73  } elseif (is_array($datum)) {
74  $datum = new static($datum);
75  }
76  }
77 
78  $this->_array = $data;
79 
80  return;
81  }

Member Function Documentation

Hoa\Ruler\Model\Bag\RulerArray::getArray ( )

Get array.

Returns
array

Definition at line 88 of file RulerArray.php.

89  {
90  return $this->_array;
91  }

Member Data Documentation

Hoa\Ruler\Model\Bag\RulerArray::$_array = null
protected

Definition at line 54 of file RulerArray.php.


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