host . (($cred->port !== '') ? ";port=" . $cred->port : '') . ";dbname=" . $cred->dbName, $cred->login, $cred->password ); // we destroy $cred as quickly as possible $cred = null; } catch (\PDOException $err) { // we destroy $cred as quickly as possible $cred = null; throw $err; // throw for Controller to catch } return $this; } }