src/Amadeus/Client/Base.php
protected function loadSessionHandler($sessionHandler, $params)
    {
        if ($sessionHandler instanceof HandlerInterface) {
            $newSessionHandler = $sessionHandler;
        } else {
            $newSessionHandler = HandlerFactory::createHandler($params);
        }

        return $newSessionHandler;
    }
protected function loadSessionHandler($sessionHandler, $params)
    {
        if ($sessionHandler instanceof HandlerInterface) {
            $newSessionHandler = $sessionHandler;
        } else {
            $newSessionHandler = HandlerFactory::createHandler($params);
        }

        return $newSessionHandler;
    }
protected function loadSessionHandler ( $ sessionHandler , $ params ) { if ( $ sessionHandler instanceof HandlerInterface ) { $ newSessionHandler = $ sessionHandler ; } else { $ newSessionHandler = HandlerFactory :: createHandler ( $ params ) ; } return $ newSessionHandler ; }
Load the session handler

Either load the provided session handler or create one depending on incoming parameters.

@param HandlerInterface|null $sessionHandler
@param Params\SessionHandlerParams|null $params
@return HandlerInterface
Load the session handler