コード例 #1
0
 public function __construct($conf, $dsn)
 {
     parent::__construct($conf, $dsn);
     $matches = array();
     if (preg_match_all('#([a-z]*)://([^@]*)@(.*)#', $dsn, $matches)) {
         $this->id = $matches[2][0];
         $this->secret = $matches[3][0];
     } else {
         throw new Exception("DSN: '{$dsn}' is in wrong format.");
     }
 }