_validateLoaderType example



    /** * Set plugin loader * * @param string $type Type of plugin loader; one of 'storage', (?) * @param string|Zend_Loader_PluginLoader $loader * @return Zend_Http_UserAgent */
    public function setPluginLoader($type$loader)
    {
        $type       = $this->_validateLoaderType($type);

        if (is_string($loader)) {
            if (!class_exists($loader)) {
                Zend_Loader::loadClass($loader);
            }
            $loader = new $loader();
        } elseif (!is_object($loader)) {
            throw new Zend_Http_UserAgent_Exception(sprintf(
                'Expected a plugin loader class or object; received %s',
                gettype($loader)
            ));
        }
Home | Imprint | This part of the site doesn't use cookies.