Skip to content

Commit

Permalink
Revert "Revert "Drop App::dbConnect() method (#1361)""
Browse files Browse the repository at this point in the history
This reverts commit 845123f.
  • Loading branch information
romaninsh committed Jul 15, 2020
1 parent 845123f commit de24d7f
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -567,24 +567,6 @@ public function loadTemplate($name)
->addMoreInfo('template_dir', $this->template_dir);
}

/**
* Connects database.
*
* @param string $dsn Format as PDO DSN or use "mysql://user:pass@host/db;option=blah", leaving user and password arguments = null
* @param string $user
* @param string $password
* @param array $args
*
* @return Persistence
*/
public function dbConnect($dsn, $user = null, $password = null, $args = [])
{
$this->db = Persistence::connect($dsn, $user, $password, $args);
$this->db->app = $this;

return $this->db;
}

protected function getRequestUrl()
{
if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { // IIS
Expand Down

0 comments on commit de24d7f

Please sign in to comment.