private function createService(stdClass $serviceData)
    {
        $this->comment('');
        $this->comment('*************************************');
        $this->comment('*         Service creation          *');
        $this->comment('*************************************');
        $this->comment($serviceData->serviceName);
        $this->comment('*************************************');

        $helpersList = [
            'controller'      => new HCServiceController(),
            'translations'    => new HCServiceTranslations(),
            'models'          => new HCServiceModels(),
            'form-validators' => new HCServiceFormValidators(),
            'forms'           => new HCServiceForms(),
            'routes'          => new HCServiceRoutes(),
        ];

        foreach ( $helpersList as $helper )
            $serviceData = $helper->optimize($serviceData);

        // finalizing destination
        $serviceData->controllerDestination .= '/' . $serviceData->controllerName . '.php';

        foreach ( $helpersList as $helper ) {
            $files = $helper->generate($serviceData);

            if( is_array($files) )
                $this->createdFiles = array_merge($this->createdFiles, $files);
            else
                $this->createdFiles[] = $files;
        }

        if( $serviceData->rootDirectory != './' )
            $this->call('hc:routes', ["directory" => $serviceData->rootDirectory]);
        else
            $this->call('hc:routes');

        if( isset($serviceData->generateMigrations) && $serviceData->generateMigrations )
            $this->call('migrate:generate', ["--path" => $serviceData->rootDirectory . 'database/migrations', "tables" => implode(",", $helpersList['models']->getTables())]);

        $this->updateConfiguration($serviceData);
    }
private function createService(stdClass $serviceData)
    {
        $this->comment('');
        $this->comment('*************************************');
        $this->comment('*         Service creation          *');
        $this->comment('*************************************');
        $this->comment($serviceData->serviceName);
        $this->comment('*************************************');

        $helpersList = [
            'controller'      => new HCServiceController(),
            'translations'    => new HCServiceTranslations(),
            'models'          => new HCServiceModels(),
            'form-validators' => new HCServiceFormValidators(),
            'forms'           => new HCServiceForms(),
            'routes'          => new HCServiceRoutes(),
        ];

        foreach ( $helpersList as $helper )
            $serviceData = $helper->optimize($serviceData);

        // finalizing destination
        $serviceData->controllerDestination .= '/' . $serviceData->controllerName . '.php';

        foreach ( $helpersList as $helper ) {
            $files = $helper->generate($serviceData);

            if( is_array($files) )
                $this->createdFiles = array_merge($this->createdFiles, $files);
            else
                $this->createdFiles[] = $files;
        }

        if( $serviceData->rootDirectory != './' )
            $this->call('hc:routes', ["directory" => $serviceData->rootDirectory]);
        else
            $this->call('hc:routes');

        if( isset($serviceData->generateMigrations) && $serviceData->generateMigrations )
            $this->call('migrate:generate', ["--path" => $serviceData->rootDirectory . 'database/migrations', "tables" => implode(",", $helpersList['models']->getTables())]);

        $this->updateConfiguration($serviceData);
    }
private function createService ( stdClass $ serviceData ) { $ this -> comment ( '' ) ; $ this -> comment ( '*************************************' ) ; $ this -> comment ( '*         Service creation          *' ) ; $ this -> comment ( '*************************************' ) ; $ this -> comment ( $ serviceData -> serviceName ) ; $ this -> comment ( '*************************************' ) ; $ helpersList = [ 'controller' => new HCServiceController ( ) , 'translations' => new HCServiceTranslations ( ) , 'models' => new HCServiceModels ( ) , 'form-validators' => new HCServiceFormValidators ( ) , 'forms' => new HCServiceForms ( ) , 'routes' => new HCServiceRoutes ( ) , ] ; foreach ( $ helpersList as $ helper ) $ serviceData = $ helper -> optimize ( $ serviceData ) ; // finalizing destination $ serviceData -> controllerDestination .= '/' . $ serviceData -> controllerName . '.php' ; foreach ( $ helpersList as $ helper ) { $ files = $ helper -> generate ( $ serviceData ) ; if ( is_array ( $ files ) ) $ this -> createdFiles = array_merge ( $ this -> createdFiles , $ files ) ; else $ this -> createdFiles [ ] = $ files ; } if ( $ serviceData -> rootDirectory != './' ) $ this -> call ( 'hc:routes' , [ "directory" => $ serviceData -> rootDirectory ] ) ; else $ this -> call ( 'hc:routes' ) ; if ( isset ( $ serviceData -> generateMigrations ) && $ serviceData -> generateMigrations ) $ this -> call ( 'migrate:generate' , [ "--path" => $ serviceData -> rootDirectory . 'database/migrations' , "tables" => implode ( "," , $ helpersList [ 'models' ] -> getTables ( ) ) ] ) ; $ this -> updateConfiguration ( $ serviceData ) ; }
Generating service information

@param $serviceData
Generating service information