library/Garp/Auth/Factory.php
public static function getAdapter($key) {
        $config = Zend_Registry::get('config');
        if (!$config->auth || !$config->auth->adapters) {
            throw new Garp_Auth_Exception(self::EXCEPTION_NO_ADAPTERS_CONFIGURED);
        }

        $key = strtolower($key);
        if (!$config->auth->adapters->{$key}) {
            throw new Garp_Auth_Exception(sprintf(self::EXCEPTION_KEY_NOT_FOUND, $key));
        }

        $classKey = $config->auth->adapters->{$key}->class;
        if (!$classKey) {
            $classKey = $key;
        }
        $className = strpos($classKey, '_') === false ?
            self::AUTH_NAMESPACE . ucfirst($classKey) : $classKey;
        $obj = new $className();
        if (!$obj instanceof Garp_Auth_Adapter_Abstract) {
            throw new Garp_Auth_Exception(sprintf(self::EXCEPTION_INVALID_CLASS, $className));
        }
        return $obj;
    }
public static function getAdapter($key) {
        $config = Zend_Registry::get('config');
        if (!$config->auth || !$config->auth->adapters) {
            throw new Garp_Auth_Exception(self::EXCEPTION_NO_ADAPTERS_CONFIGURED);
        }

        $key = strtolower($key);
        if (!$config->auth->adapters->{$key}) {
            throw new Garp_Auth_Exception(sprintf(self::EXCEPTION_KEY_NOT_FOUND, $key));
        }

        $classKey = $config->auth->adapters->{$key}->class;
        if (!$classKey) {
            $classKey = $key;
        }
        $className = strpos($classKey, '_') === false ?
            self::AUTH_NAMESPACE . ucfirst($classKey) : $classKey;
        $obj = new $className();
        if (!$obj instanceof Garp_Auth_Adapter_Abstract) {
            throw new Garp_Auth_Exception(sprintf(self::EXCEPTION_INVALID_CLASS, $className));
        }
        return $obj;
    }
public static function getAdapter ( $ key ) { $ config = Zend_Registry :: get ( 'config' ) ; if ( ! $ config -> auth || ! $ config -> auth -> adapters ) { throw new Garp_Auth_Exception ( self :: EXCEPTION_NO_ADAPTERS_CONFIGURED ) ; } $ key = strtolower ( $ key ) ; if ( ! $ config -> auth -> adapters -> { $ key } ) { throw new Garp_Auth_Exception ( sprintf ( self :: EXCEPTION_KEY_NOT_FOUND , $ key ) ) ; } $ classKey = $ config -> auth -> adapters -> { $ key } -> class ; if ( ! $ classKey ) { $ classKey = $ key ; } $ className = strpos ( $ classKey , '_' ) === false ? self :: AUTH_NAMESPACE . ucfirst ( $ classKey ) : $ classKey ; $ obj = new $ className ( ) ; if ( ! $ obj instanceof Garp_Auth_Adapter_Abstract ) { throw new Garp_Auth_Exception ( sprintf ( self :: EXCEPTION_INVALID_CLASS , $ className ) ) ; } return $ obj ; }
Retrieve a specified Zend_Auth_Adapter_Interface object.
@param String $key The authentication key. An adapter must be stored under
auth.adapters.{$key}.
@return Garp_Auth
Retrieve a specified Zend_Auth_Adapter_Interface object .