Zend_Auth_Storage_Session example


    public function getStorage()
    {
        if (null === $this->_storage) {
            /** * @see Zend_Auth_Storage_Session */
            $this->setStorage(new Zend_Auth_Storage_Session());
        }

        return $this->_storage;
    }

    /** * Sets the persistent storage handler * * @param Zend_Auth_Storage_Interface $storage * @return Zend_Auth Provides a fluent interface */
    

    public function onInitResourceAuth(Enlight_Event_EventArgs $args)
    {
        /** @var Enlight_Components_Session_Namespace $session */
        $session = Shopware()->Container()->get('backendsession');

        $resource = Shopware_Components_Auth::getInstance();
        $adapter = new Shopware_Components_Auth_Adapter_Default($session);
        $storage = new Zend_Auth_Storage_Session($session);
        $resource->setBaseAdapter($adapter);
        $resource->addAdapter($adapter);
        $resource->setStorage($storage);

        $this->registerAclPlugin($resource);

        return $resource;
    }

    public function getCapabilities()
    {
        
Home | Imprint | This part of the site doesn't use cookies.