src/Manager.php
public function getDevice($deviceId, Request\GenericRequest $request = null)
    {
        if ($request !== null) {
            if (!($request instanceof GenericRequest)) {
                throw new \InvalidArgumentException(
                    'Error: Request parameter must be null or instance of WURFL_Request_GenericRequest'
                );
            }

            // Normalization must be performed if request is passed so virtual capabilities can be
            // resolved correctly.  This is normally handled in self::deviceIdForRequest()
            $generic_normalizer = UserAgentHandlerChainFactory::createGenericNormalizers();
            $request->setUserAgentNormalized($generic_normalizer->normalize($request->getUserAgent()));
        }

        return $this->getWrappedDevice($deviceId, $request);
    }
public function getDevice($deviceId, Request\GenericRequest $request = null)
    {
        if ($request !== null) {
            if (!($request instanceof GenericRequest)) {
                throw new \InvalidArgumentException(
                    'Error: Request parameter must be null or instance of WURFL_Request_GenericRequest'
                );
            }

            // Normalization must be performed if request is passed so virtual capabilities can be
            // resolved correctly.  This is normally handled in self::deviceIdForRequest()
            $generic_normalizer = UserAgentHandlerChainFactory::createGenericNormalizers();
            $request->setUserAgentNormalized($generic_normalizer->normalize($request->getUserAgent()));
        }

        return $this->getWrappedDevice($deviceId, $request);
    }
public function getDevice ( $ deviceId , Request \ GenericRequest $ request = null ) { if ( $ request !== null ) { if ( ! ( $ request instanceof GenericRequest ) ) { throw new \ InvalidArgumentException ( 'Error: Request parameter must be null or instance of WURFL_Request_GenericRequest' ) ; } // Normalization must be performed if request is passed so virtual capabilities can be // resolved correctly.  This is normally handled in self::deviceIdForRequest() $ generic_normalizer = UserAgentHandlerChainFactory :: createGenericNormalizers ( ) ; $ request -> setUserAgentNormalized ( $ generic_normalizer -> normalize ( $ request -> getUserAgent ( ) ) ) ; } return $ this -> getWrappedDevice ( $ deviceId , $ request ) ; }
Return a device for the given device id

@param string                 $deviceId
@param Request\GenericRequest $request

@throws \InvalidArgumentException
@return \Wurfl\Device\ModelDeviceInterface
Return a device for the given device id