src/Handlers/Chain/UserAgentHandlerChainFactory.php
public static function createFrom(
        Storage $persistenceProvider,
        Storage $cacheProvider,
        LoggerInterface $logger = null
    ) {
        /** @var $userAgentHandlerChain \Wurfl\Handlers\Chain\UserAgentHandlerChain */
        $userAgentHandlerChain = $cacheProvider->load('UserAgentHandlerChain');

        if (!($userAgentHandlerChain instanceof UserAgentHandlerChain)) {
            $userAgentHandlerChain = self::init();
            $cacheProvider->save('UserAgentHandlerChain', $userAgentHandlerChain, 3600);
        }

        $userAgentHandlerChain->setLogger($logger);

        foreach ($userAgentHandlerChain->getHandlers() as $handler) {
            /* @var $handler \Wurfl\Handlers\AbstractHandler */
            $handler
                ->setLogger($logger)
                ->setPersistenceProvider($persistenceProvider);
        }

        return $userAgentHandlerChain;
    }
public static function createFrom(
        Storage $persistenceProvider,
        Storage $cacheProvider,
        LoggerInterface $logger = null
    ) {
        /** @var $userAgentHandlerChain \Wurfl\Handlers\Chain\UserAgentHandlerChain */
        $userAgentHandlerChain = $cacheProvider->load('UserAgentHandlerChain');

        if (!($userAgentHandlerChain instanceof UserAgentHandlerChain)) {
            $userAgentHandlerChain = self::init();
            $cacheProvider->save('UserAgentHandlerChain', $userAgentHandlerChain, 3600);
        }

        $userAgentHandlerChain->setLogger($logger);

        foreach ($userAgentHandlerChain->getHandlers() as $handler) {
            /* @var $handler \Wurfl\Handlers\AbstractHandler */
            $handler
                ->setLogger($logger)
                ->setPersistenceProvider($persistenceProvider);
        }

        return $userAgentHandlerChain;
    }
public static function createFrom ( Storage $ persistenceProvider , Storage $ cacheProvider , LoggerInterface $ logger = null ) { /** @var $userAgentHandlerChain \Wurfl\Handlers\Chain\UserAgentHandlerChain */ $ userAgentHandlerChain = $ cacheProvider -> load ( 'UserAgentHandlerChain' ) ; if ( ! ( $ userAgentHandlerChain instanceof UserAgentHandlerChain ) ) { $ userAgentHandlerChain = self :: init ( ) ; $ cacheProvider -> save ( 'UserAgentHandlerChain' , $ userAgentHandlerChain , 3600 ) ; } $ userAgentHandlerChain -> setLogger ( $ logger ) ; foreach ( $ userAgentHandlerChain -> getHandlers ( ) as $ handler ) { /* @var $handler \Wurfl\Handlers\AbstractHandler */ $ handler -> setLogger ( $ logger ) -> setPersistenceProvider ( $ persistenceProvider ) ; } return $ userAgentHandlerChain ; }
Create a \Wurfl\Handlers\Chain\UserAgentHandlerChain

@param \Wurfl\Storage\Storage   $persistenceProvider
@param \Wurfl\Storage\Storage   $cacheProvider
@param \Psr\Log\LoggerInterface $logger

@return UserAgentHandlerChain
Create a \ Wurfl \ Handlers \ Chain \ UserAgentHandlerChain