Example #1
0
 /**
  * Return an array representation of the current object
  *
  * @return array
  */
 public function toArray()
 {
     $array = parent::toArray();
     $tmp = array();
     foreach ($this->_children as $child) {
         $tmp = array_merge($tmp, array($child->getName() => $child->toArray()));
         $array['member'] = $tmp;
     }
     return $array;
 }
Example #2
0
 /**
  * Helper method. Sets inner children to be mandatory or optional and the children are specified by name
  *
  * @param Streamwide_Introspection_Method_Parameter_Composite_Abstract $param    Method parameter object.
  * @param array                                                        $children An associative array with key being the child name and value being the isOptional value
  * @return void
  */
 protected function _setParameterOptionalChildren(Streamwide_Introspection_Method_Parameter_Composite_Abstract $param, array $children)
 {
     foreach ($children as $childName => $isOptional) {
         $param->setOptionalChildByName($childName, $isOptional);
     }
 }