/**
  * Set up of attributes
  */
 protected function setAttribs()
 {
     $name = strtolower($this->argument('name'));
     $this->tableName = $this->inflector->pluralize($this->inflector->underscore($name));
     $this->varModelName = $this->inflector->singularize($this->inflector->camelize($name, Inflector::DOWNCASE_FIRST_LETTER));
     $this->varModelNamePlural = $this->inflector->pluralize($this->varModelName);
     $this->modelName = ucfirst($this->varModelName);
 }
Beispiel #2
0
 /**
  * @param array $data
  * @return \ArrayObject
  */
 private function instantiateCollection(array $data)
 {
     $collectionClassName = $this->inflector->pluralize($this->className);
     if (class_exists($collectionClassName)) {
         return new $collectionClassName($data);
     }
     return $data;
 }