core/routine/Database.class.php
public function mount(Info $info): PDO {
    $trouble = false;
    $pdo = null;
    switch ($info->getDsn()) {
      case "mysql":
        $pdo = (new MySql())->connect($info);
        break;
      default :
        $trouble = true;
        break;
    }
    if ($trouble) {
      Lang::addRoot(Environment::PACKAGE, Environment::PATH);
      throw new Exception(Lang::get("database:database:invalid", "helionogueir/database"));
    }
    return $pdo;
  }
public function mount(Info $info): PDO {
    $trouble = false;
    $pdo = null;
    switch ($info->getDsn()) {
      case "mysql":
        $pdo = (new MySql())->connect($info);
        break;
      default :
        $trouble = true;
        break;
    }
    if ($trouble) {
      Lang::addRoot(Environment::PACKAGE, Environment::PATH);
      throw new Exception(Lang::get("database:database:invalid", "helionogueir/database"));
    }
    return $pdo;
  }
public function mount ( Info $ info ) : PDO { $ trouble = false ; $ pdo = null ; switch ( $ info -> getDsn ( ) ) { case "mysql" : $ pdo = ( new MySql ( ) ) -> connect ( $ info ) ; break ; default : $ trouble = true ; break ; } if ( $ trouble ) { Lang :: addRoot ( Environment :: PACKAGE , Environment :: PATH ) ; throw new Exception ( Lang :: get ( "database:database:invalid" , "helionogueir/database" ) ) ; } return $ pdo ; }
- Mount database by object
@param helionogueir\database\routine\database\Info $info Database info connection
@return null
- Mount database by object