Example #1
0
 /**
  * Create Builder object
  *
  * @param array $options Builder options
  * @throws BuilderException
  */
 public function __construct(array $options)
 {
     if (!isset($options['name'])) {
         throw new BuilderException('Please, specify the model name');
     }
     if (!isset($options['camelize'])) {
         $options['camelize'] = false;
     }
     if (!isset($options['force'])) {
         $options['force'] = false;
     }
     if (!isset($options['className'])) {
         $options['className'] = Utils::camelize($options['name']);
     }
     if (!isset($options['fileName'])) {
         $options['fileName'] = $options['name'];
     }
     if (!isset($options['abstract'])) {
         $options['abstract'] = false;
     }
     if (!isset($options['annotate'])) {
         $options['annotate'] = false;
     }
     if ($options['abstract']) {
         $options['className'] = 'Abstract' . $options['className'];
     }
     parent::__construct($options);
     $this->snippet = new Snippet();
 }
Example #2
0
 /**
  * Create Builder object
  *
  * @param array $options Builder options
  * @throws BuilderException
  */
 public function __construct(array $options = [])
 {
     if (!isset($options['name'])) {
         throw new BuilderException('Please specify the controller name.');
     }
     if (!isset($options['force'])) {
         $options['force'] = false;
     }
     parent::__construct($options);
 }
Example #3
0
 /**
  * Create Builder object
  *
  * @param array $options Builder options
  * @throws BuilderException
  */
 public function __construct(array $options = array())
 {
     if (!isset($options['force'])) {
         $options['force'] = false;
     }
     if (!isset($options['abstract'])) {
         $options['abstract'] = false;
     }
     parent::__construct($options);
 }
Example #4
0
 /**
  * Create Builder object
  *
  * @param array $options Builder options
  * @throws BuilderException
  */
 public function __construct(array $options)
 {
     parent::__construct($options);
 }