Exemplo n.º 1
0
 public function invoke(Scaffolding $scaffolding)
 {
     $name = ucFirst($this->in->getArgument('name'));
     $file = $scaffolding->createUnitTest($name);
     $this->writeCreatedFilesHeader();
     $this->writeCreatedFile($file);
 }
Exemplo n.º 2
0
 public function invoke(Scaffolding $scaffolding)
 {
     $name = $this->in->getArgument('presenterName');
     $file = $scaffolding->createPresenter($name);
     $this->writeCreatedFilesHeader();
     $this->writeCreatedFile($file);
     $file = $scaffolding->createDefaultView($name);
     $this->writeCreatedFile($file);
     $this->out->writeln("<comment>Don't forget to update your routes.</comment>");
 }
Exemplo n.º 3
0
 public function invoke(Scaffolding $scaffolding)
 {
     $name = ucFirst($this->in->getArgument('entityName'));
     $file = $scaffolding->createRepository($name);
     $this->writeCreatedFilesHeader();
     $this->writeCreatedFile($file);
     $file = $scaffolding->createMapper($name);
     $this->writeCreatedFile($file);
     $params = [];
     foreach ($this->in->getVariadics() as $arg) {
         list($param, $type) = explode(':', $arg) + [NULL, 'mixed'];
         $params[$param] = $type;
     }
     $file = $scaffolding->createEntity($name, $params);
     $this->writeCreatedFile($file);
     $this->out->writeln("\n<comment>Don't forget to add repository to your Model class</comment>");
     $plural = Inflect::pluralize($name);
     $repoClass = 'Rme\\' . ucFirst($plural) . 'Repository';
     $param = lcFirst($plural);
     $this->out->writeln(" * @property-read {$repoClass} \${$param}");
 }
Exemplo n.º 4
0
 public function invoke(Scaffolding $scaffolding)
 {
     $file = $scaffolding->createPhpMigration($this->in->getArgument('note'));
     $this->writeCreatedFilesHeader();
     $this->writeCreatedFile($file);
 }