MysqlndUhConnection::getHostInformation
(PECL mysqlnd-uh >= 1.0.0-alpha)
MysqlndUhConnection::getHostInformation — Retourne une chaîne représentant le type de connexion utilisé
Description
   public string MysqlndUhConnection::getHostInformation
    ( mysqlnd_connection 
  $connection
   )Retourne une chaîne représentant le type de connexion utilisé.
Liste de paramètres
- 
    connection
- 
     Le gestionnaire de connexion Mysqlnd. Ne pas modifier ! 
Valeurs de retour
La description de la connexion.
Exemples
Exemple #1 Exemple avec MysqlndUhConnection::getHostInformation()
<?php
class proxy extends MysqlndUhConnection {
 public function getHostInformation($res) {
   printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
   $ret = parent::getHostInformation($res);
   printf("%s retourne %s\n", __METHOD__, var_export($ret, true));
   return $ret;
 }
}
mysqlnd_uh_set_connection_proxy(new proxy());
$mysqli = new mysqli("localhost", "root", "", "test");
var_dump($mysqli->host_info);
?>L'exemple ci-dessus va afficher :
proxy::getHostInformation(array ( 0 => NULL, )) proxy::getHostInformation retourne 'Localhost via UNIX socket' string(25) "Localhost via UNIX socket"
Voir aussi
- mysqlnd_uh_set_connection_proxy() - Installe un proxy pour les connexions mysqlnd
- mysqli_get_host_info() - Retourne une chaîne contenant le type de connexion utilisée
- mysql_get_host_info() - Lit les informations sur l'hôte MySQL
