Exemplo n.º 1
0
 public function HandleCreate() : int
 {
     /*//
     	this will handle the request to bootstrap a new project config file so
     	you do not have to write one from scratch.
     	//*/
     $Filename = $this->GetFilename();
     $File = basename($Filename);
     $Path = dirname($Filename);
     ////////
     if (file_exists($Filename)) {
         if (!$this::PromptEquals('File exists. Overwrite?', '[y/n]', 'y')) {
             $this::Message('OK, Goodbye.');
             return 0;
         }
     }
     ////////
     $this::Message("Creating config file ({$File})...");
     $Config = new Nether\Senpai\Config();
     $Config->Write($Filename);
     return 0;
 }