Auth_Yadis_Discovery::getNextService PHP Method

getNextService() public method

Return the next authentication service for the pair of user_input and session. This function handles fallback.
public getNextService ( $discover_cb, $fetcher )
    function getNextService($discover_cb, $fetcher)
    {
        $manager = $this->getManager();
        if (!$manager || !$manager->services) {
            $this->destroyManager();
            list($yadis_url, $services) = call_user_func_array($discover_cb, array($this->url, $fetcher));
            $manager = $this->createManager($services, $yadis_url);
        }
        if ($manager) {
            $loader = new Auth_Yadis_ManagerLoader();
            $service = $manager->nextService();
            $this->session->set($this->session_key, serialize($loader->toSession($manager)));
        } else {
            $service = null;
        }
        return $service;
    }