public function create() { $definition = new Definition($this->className); $definition->setClass($this->nameSpace . '\\' . $this->className); $definition->setAbstract(true); $properties = $this->extractProperties(); $definition->setProperties($properties); $methods = $this->extractMethods(); $definition->setMethods($methods); $definition->addInterface('\\Serializable'); $definition->addMethod($this->createSerialize()); $definition->addMethod($this->createUnserialize()); return $definition; }
public function testDocComment() { $definition = new Definition('Class1'); $definition->setDocComment('myDoc'); $this->assertSame('myDoc', $definition->getDocComment()); }
/** * @expectedException \InvalidArgumentException */ public function testRemoveConstantBynameShouldThrowException() { $definition = new Definition('Class1'); $definition->removeConstantByName('X'); }
/** * Constructor. * * @param string $class The class. * @param Mandango\Mondator\Output $output The output. * * @api */ public function __construct($class, Output $output) { parent::__construct($class); $this->setOutput($output); }