Inheritance: extends AbstractPhpElement
Ejemplo n.º 1
0
 /**
  * @param ConstantContainer
  */
 protected function getClassConstants(ConstantContainer $constants)
 {
     foreach ($this->getModel()->getValues() as $value) {
         $constants->add(new PhpConstant($value->getCleanName(), $value->getValue()));
     }
 }
Ejemplo n.º 2
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testAddWithException()
 {
     $constant = new Constant(self::getBingGeneratorInstance());
     $constant->add(new PhpMethod('Bar'));
 }