Prado\Data\TDbConnection::open PHP Метод

open() защищенный Метод

Opens DB connection if it is currently not
protected open ( )
    protected function open()
    {
        if ($this->_pdo === null) {
            try {
                $this->_pdo = new PDO($this->getConnectionString(), $this->getUsername(), $this->getPassword(), $this->_attributes);
                // This attribute is only useful for PDO::MySql driver.
                // Ignore the warning if a driver doesn't understand this.
                @$this->_pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
                $this->_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
                $this->_active = true;
                $this->setConnectionCharset();
            } catch (PDOException $e) {
                throw new TDbException('dbconnection_open_failed', $e->getMessage());
            }
        }
    }