Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added ability to specify port

  • Loading branch information...
commit 2f387d4f8c0160d93992eadd381eabe6e486d669 1 parent c42f0bd
@radnan authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 library/Zend/Db/Adapter/Driver/Pdo/Connection.php
View
6 library/Zend/Db/Adapter/Driver/Pdo/Connection.php
@@ -197,6 +197,9 @@ public function connect()
case 'hostname':
$hostname = (string) $value;
break;
+ case 'port':
+ $port = (int) $value;
+ break;
case 'database':
case 'dbname':
$database = (string) $value;
@@ -225,6 +228,9 @@ public function connect()
if (isset($hostname)) {
$dsn[] = "host={$hostname}";
}
+ if (isset($port)) {
+ $dsn[] = "port={$port}";
+ }
break;
}
$dsn = $pdoDriver . ':' . implode(';', $dsn);
Please sign in to comment.
Something went wrong with that request. Please try again.