protected function generateLoginUrl($query)
    {
        //if there is a scope
        if (!is_null($this->scope)) {
            //if scope is in array
            if (is_array($this->scope)) {
                $this->scope = implode(' ', $this->scope);
            }
            //add scope to the query
            $query['scope'] = $this->scope;
        }
        //if there is state
        if (!is_null($this->state)) {
            //add state to the query
            $query['state'] = $this->state;
        }
        //if there is display
        if (!is_null($this->display)) {
            //add state to the query
            $query['display'] = $this->display;
        }
        //generate a login url
        return $this->requestUrl.'?'.http_build_query($query);
    }
protected function generateLoginUrl($query)
    {
        //if there is a scope
        if (!is_null($this->scope)) {
            //if scope is in array
            if (is_array($this->scope)) {
                $this->scope = implode(' ', $this->scope);
            }
            //add scope to the query
            $query['scope'] = $this->scope;
        }
        //if there is state
        if (!is_null($this->state)) {
            //add state to the query
            $query['state'] = $this->state;
        }
        //if there is display
        if (!is_null($this->display)) {
            //add state to the query
            $query['display'] = $this->display;
        }
        //generate a login url
        return $this->requestUrl.'?'.http_build_query($query);
    }
protected function generateLoginUrl ( $ query ) { //if there is a scope if ( ! is_null ( $ this -> scope ) ) { //if scope is in array if ( is_array ( $ this -> scope ) ) { $ this -> scope = implode ( ' ' , $ this -> scope ) ; } //add scope to the query $ query [ 'scope' ] = $ this -> scope ; } //if there is state if ( ! is_null ( $ this -> state ) ) { //add state to the query $ query [ 'state' ] = $ this -> state ; } //if there is display if ( ! is_null ( $ this -> display ) ) { //add state to the query $ query [ 'display' ] = $ this -> display ; } //generate a login url return $ this -> requestUrl . '?' . http_build_query ( $ query ) ; }
Generates a login url to redirect to

@param *string $query Query string to include in the URL

@return string
Generates a login url to redirect to