Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Added ability to specify port
Browse files Browse the repository at this point in the history
  • Loading branch information
radnan committed Sep 29, 2012
1 parent c42f0bd commit 2f387d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions library/Zend/Db/Adapter/Driver/Pdo/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -225,6 +228,9 @@ public function connect()
if (isset($hostname)) {
$dsn[] = "host={$hostname}";
}
if (isset($port)) {
$dsn[] = "port={$port}";
}
break;
}
$dsn = $pdoDriver . ':' . implode(';', $dsn);
Expand Down

0 comments on commit 2f387d4

Please sign in to comment.