/** * @param FilesInterface $files * @param string $name User specified class name, will be joined with default namespace * and postfix. * @param array $options Default namespace must already be included into default directory. * @param string $header File header. */ public function __construct(FilesInterface $files, $name, array $options, $header = '') { $this->options = $options + $this->options; if (empty($this->options['directory'])) { throw new ReactorException("Declaration generator always require output directory."); } $this->file = new FileElement($files); $this->file->setComment($header); $this->class = new ClassElement('Reactor'); $this->file->addClass($this->class); //Configuring names $this->setNamespace('')->setName($name); //Implementation specific generation $this->generate(); }