public function setParam($key, $param)
 {
     if ($this->className) {
         return parent::setParam($key, $param);
     }
     $this->propertySetters[$key] = $param;
 }
Example #2
0
 protected function parseInstantiator($key, $value)
 {
     $key = $this->removeDuplicatedSpaces($key);
     list($keyName, $keyClass) = explode(' ', $key, 2);
     if ('instanceof' === $keyName) {
         $keyName = $keyClass;
     }
     $instantiator = new Instantiator($keyClass);
     if (is_array($value)) {
         foreach ($value as $property => $pValue) {
             $instantiator->setParam($property, $this->parseValue($pValue));
         }
     } else {
         $instantiator->setParam('__construct', $this->parseValue($value));
     }
     $this->offsetSet($keyName, $instantiator);
 }