Exemple #1
0
 /**
  * built a class representation of a fixture
  *
  * @param string $class
  * @param string $name
  * @param array  $spec
  * @param string $valueForCurrent - when <current()> is called, this value is used
  */
 public function __construct($class, $name, array $spec, $valueForCurrent)
 {
     list($this->class, $this->classFlags) = FlagParser::parse($class);
     list($this->name, $this->nameFlags) = FlagParser::parse($name);
     $this->spec = $spec;
     $this->valueForCurrent = $valueForCurrent;
     $this->properties = [];
     foreach ($spec as $propertyName => $propertyValue) {
         $this->addProperty($propertyName, $propertyValue);
     }
 }
Exemple #2
0
 public function __construct($name, $value)
 {
     list($this->name, $this->nameFlags) = FlagParser::parse($name);
     parent::__construct($value);
 }