__construct() 공개 메소드

try to connect
public __construct ( $choice = NULL ) : nothing
$choice integer, host number (default NULL)
리턴 nothing
예제 #1
0
 /**
  * Constructor
  *
  * @param $ID ID of the ocs server ID
  **/
 function __construct($dbhost, $dbuser, $dbpassword, $dbdefault)
 {
     $this->dbhost = $dbhost;
     $this->dbuser = $dbuser;
     $this->dbpassword = $dbpassword;
     $this->dbdefault = $dbdefault;
     parent::__construct();
 }
예제 #2
0
 /**
  * Constructor
  *
  * @param $ID ID of the ocs server ID
  **/
 function __construct($ID)
 {
     $this->ocsservers_id = $ID;
     $data = PluginOcsinventoryngOcsServer::getConfig($ID);
     $this->dbhost = $data["ocs_db_host"];
     $this->dbuser = $data["ocs_db_user"];
     $this->dbpassword = rawurldecode($data["ocs_db_passwd"]);
     $this->dbdefault = $data["ocs_db_name"];
     $this->dbenc = $data["ocs_db_utf8"] ? "utf8" : "latin1";
     parent::__construct();
 }
예제 #3
0
 /**
  * Constructor
  *
  * @param $ID ID of the ocs server ID
  **/
 function __construct($ID)
 {
     global $CFG_GLPI;
     $this->ocsservers_id = $ID;
     if ($CFG_GLPI["use_ocs_mode"]) {
         $data = OcsServer::getConfig($ID);
         $this->dbhost = $data["ocs_db_host"];
         $this->dbuser = $data["ocs_db_user"];
         $this->dbpassword = rawurldecode($data["ocs_db_passwd"]);
         $this->dbdefault = $data["ocs_db_name"];
         $this->dbenc = $data["ocs_db_utf8"] ? "utf8" : "latin1";
         parent::__construct();
     }
 }