Skip to content
Permalink
Browse files

Added __debugInfo() to Driver

  • Loading branch information...
robertpustulka committed Sep 8, 2014
1 parent ceb11c4 commit bec4a39e09ff168e4f9b874c5e24b3fda306be9d
Showing with 28 additions and 0 deletions.
  1. +28 −0 src/Database/Driver.php
@@ -316,4 +316,32 @@ public function __destruct() {
$this->_connection = null;
}
/**
* Returns an array that can be used to describe the internal state of this
* object.
*
* @return array
*/
public function __debugInfo() {
$secrets = [
'password' => '*****',
'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
'prefix' => '*****',
'schema' => '*****'
];
$replace = array_intersect_key($secrets, $this->_config);
return [
'_baseConfig' => $replace + $this->_baseConfig,
'_config' => $replace + $this->_config,
'_autoQuoting' => $this->_autoQuoting,
'_startQuote' => $this->_startQuote,
'_endQuote' => $this->_endQuote,
'_schemaDialect' => get_class($this->_schemaDialect)
];
}
}

0 comments on commit bec4a39

Please sign in to comment.
You can’t perform that action at this time.