public function getConnection()
    {
        if (is_null($this->_connection)) {
            $this->setConnection(
                Agl::app()->getConfig('main/db/host'),
                Agl::app()->getConfig('main/db/name'),
                Agl::app()->getConfig('main/db/user'),
                Agl::app()->getConfig('main/db/password')
            );
        }

        return $this->_connection;
    }
public function getConnection()
    {
        if (is_null($this->_connection)) {
            $this->setConnection(
                Agl::app()->getConfig('main/db/host'),
                Agl::app()->getConfig('main/db/name'),
                Agl::app()->getConfig('main/db/user'),
                Agl::app()->getConfig('main/db/password')
            );
        }

        return $this->_connection;
    }
public function getConnection ( ) { if ( is_null ( $ this -> _connection ) ) { $ this -> setConnection ( Agl :: app ( ) -> getConfig ( 'main/db/host' ) , Agl :: app ( ) -> getConfig ( 'main/db/name' ) , Agl :: app ( ) -> getConfig ( 'main/db/user' ) , Agl :: app ( ) -> getConfig ( 'main/db/password' ) ) ; } return $ this -> _connection ; }
Return the stored database connection.

@return mixed
Return the stored database connection .