Example #1
0
 /**
  * Magic getter to retrieve attribute values
  *
  * @param string $name
  *
  * @return Value
  */
 public function __get($name)
 {
     foreach ($this->values as $valueObject) {
         if ($valueObject->getAttribute()->getName() == $name) {
             return $valueObject;
         }
     }
     throw new \BadMethodCallException('The valueset for template "' . $this->template->getName() . '" does not have a value called "' . $name . '".');
 }