BaiduAPI::setSession PHP Method

setSession() public method

Set user session.
public setSession ( array $session ) : Baidu
$session array User session info.
return Baidu
    public function setSession($session)
    {
        $this->session = $session;
        if ($session) {
            $this->store->set('session', $session);
        } else {
            $this->store->remove('session');
        }
        return $this;
    }