Ejemplo n.º 1
0
 /**
  * Receives the name of the project and decide 
  * what to do, create a new or use an existing
  * 
  * @since 1.0
  * @access public
  * @param string $name the project's name
  * @return void
  */
 public function __construct($name)
 {
     self::$name = $name;
     if (!file_exists(PROJECTS_PATH . DS . self::$name)) {
         ConsoleIgniter::write('Project not found!');
         $this->newProject();
     } else {
         if (!file_exists(PROJECTS_PATH . DS . self::$name . DS . 'db.php')) {
             ConsoleIgniter::write('Cannot find database configurations!');
             $this->createDbConfig();
         }
     }
 }