protected function getAuthenticationObject()
    {
        if ($this->authObject == null) {
            if (strlen($this->login) <= 0 || strlen($this->password) <= 0) {
                throw new NullPointerException("Login or Password is not set.");
            }
            $auth = new Authentication();
            if (! $auth->authenticate()) {
                throw new AuthException("Authentication Problem. Please check Login and Password.");
            }
            
            $this->authObject = $auth;
        }
        
        return $this->authObject;
    }
protected function getAuthenticationObject()
    {
        if ($this->authObject == null) {
            if (strlen($this->login) <= 0 || strlen($this->password) <= 0) {
                throw new NullPointerException("Login or Password is not set.");
            }
            $auth = new Authentication();
            if (! $auth->authenticate()) {
                throw new AuthException("Authentication Problem. Please check Login and Password.");
            }
            
            $this->authObject = $auth;
        }
        
        return $this->authObject;
    }
protected function getAuthenticationObject ( ) { if ( $ this -> authObject == null ) { if ( strlen ( $ this -> login ) <= 0 || strlen ( $ this -> password ) <= 0 ) { throw new NullPointerException ( "Login or Password is not set." ) ; } $ auth = new Authentication ( ) ; if ( ! $ auth -> authenticate ( ) ) { throw new AuthException ( "Authentication Problem. Please check Login and Password." ) ; } $ this -> authObject = $ auth ; } return $ this -> authObject ; }
authentication client with defined login and password; return Auth Object

@throws NullPointerException
@throws AuthException
@return \Mamoto\Api\Authentication
authentication client with defined login and password ; return Auth Object