Mage_Core_Model_Resource_Session::hasConnection PHP Method

hasConnection() public method

Check DB connection
public hasConnection ( ) : boolean
return boolean
    public function hasConnection()
    {
        if (!$this->_read) {
            return false;
        }
        if (!$this->_read->isTableExists($this->_sessionTable)) {
            return false;
        }
        return true;
    }

Usage Example

示例#1
0
 public function testHasConnection()
 {
     $this->assertTrue($this->_model->hasConnection());
 }