SolveConsole/Controllers/GenController.php
public function appAction() {
        $name = ucfirst($this->getFirstParamOrAsk('Enter application\'s name'));;
        FSService::makeWritable(DC::getEnvironment()->getApplicationRoot() . $name);
        $this->createCV(array(
            'name' => 'Index',
            'app'  => $name,
        ));
        $appPath = DC::getEnvironment()->getApplicationRoot() . $name . '/';
        $this->safeCreateFromTemplate($appPath . 'Views/_layout.slot', '_view_layout', array('app'=>$name));
        $this->safeCreateFromTemplate($appPath . 'config.yml', '_app_config', array('app'=>$name));
        $config = DC::getProjectConfig();
        if (!$config->has('applications/'.strtolower($name))) {
            $config->set('applications/'.strtolower($name), strtolower($name));
            $this->notify('added information to project.yml', '+ config');
            $config->save();
        }
    }
public function appAction() {
        $name = ucfirst($this->getFirstParamOrAsk('Enter application\'s name'));;
        FSService::makeWritable(DC::getEnvironment()->getApplicationRoot() . $name);
        $this->createCV(array(
            'name' => 'Index',
            'app'  => $name,
        ));
        $appPath = DC::getEnvironment()->getApplicationRoot() . $name . '/';
        $this->safeCreateFromTemplate($appPath . 'Views/_layout.slot', '_view_layout', array('app'=>$name));
        $this->safeCreateFromTemplate($appPath . 'config.yml', '_app_config', array('app'=>$name));
        $config = DC::getProjectConfig();
        if (!$config->has('applications/'.strtolower($name))) {
            $config->set('applications/'.strtolower($name), strtolower($name));
            $this->notify('added information to project.yml', '+ config');
            $config->save();
        }
    }
public function appAction ( ) { $ name = ucfirst ( $ this -> getFirstParamOrAsk ( 'Enter application\'s name' ) ) ; ; FSService :: makeWritable ( DC :: getEnvironment ( ) -> getApplicationRoot ( ) . $ name ) ; $ this -> createCV ( array ( 'name' => 'Index' , 'app' => $ name , ) ) ; $ appPath = DC :: getEnvironment ( ) -> getApplicationRoot ( ) . $ name . '/' ; $ this -> safeCreateFromTemplate ( $ appPath . 'Views/_layout.slot' , '_view_layout' , array ( 'app' => $ name ) ) ; $ this -> safeCreateFromTemplate ( $ appPath . 'config.yml' , '_app_config' , array ( 'app' => $ name ) ) ; $ config = DC :: getProjectConfig ( ) ; if ( ! $ config -> has ( 'applications/' . strtolower ( $ name ) ) ) { $ config -> set ( 'applications/' . strtolower ( $ name ) , strtolower ( $ name ) ) ; $ this -> notify ( 'added information to project.yml' , '+ config' ) ; $ config -> save ( ) ; } }
Generates new application
@throws \Exception
Generates new application