setNickname($nickname); $this->setUsername($username); $this->setStartNickname($startNickname); } /** * Set the nickname to query for. When set, only users with a nickname * matching this value will be returned in search results. Set to * null to disable filtering by username. * * @param string $value The nickname to filter search results by, or null * to disable. */ public function setNickname($value) { $this->_nickname = $value; } /** * Get the nickname to query for. If no nickname is set, null will be * returned. * * @see setNickname * @return string The nickname to filter search results by, or null if * disabled. */ public function getNickname() { return $this->_nickname; } /** * Set the username to query for. When set, only users with a username * matching this value will be returned in search results. Set to * null to disable filtering by username. * * @param string $value The username to filter search results by, or null * to disable. */ public function setUsername($value) { if ($value !== null) { $this->_params['username'] = $value; } else { unset($this->_params['username']); } } /** * Get the username to query for. If no username is set, null will be * returned. * * @see setUsername * @return string The username to filter search results by, or null if * disabled. */ public function getUsername() { if (array_key_exists('username', $this->_params)) { return $this->_params['username']; } else { return null; } } /** * Set the first nickname which should be displayed when retrieving * a list of nicknames. * * @param string $value The first nickname to be returned, or null to * disable. */ public function setStartNickname($value) { if ($value !== null) { $this->_params['startNickname'] = $value; } else { unset($this->_params['startNickname']); } } /** * Get the first nickname which should be displayed when retrieving * a list of nicknames. * * @return string The first nickname to be returned, or null to * disable. */ public function getStartNickname() { if (array_key_exists('startNickname', $this->_params)) { return $this->_params['startNickname']; } else { return null; } } /** * Returns the URL generated for this query, based on it's current * parameters. * * @return string A URL generated based on the state of this query. */ public function getQueryUrl() { $uri = $this->getBaseUrl(); $uri .= Zend_Gdata_Gapps::APPS_NICKNAME_PATH; if ($this->_nickname !== null) { $uri .= '/' . $this->_nickname; } $uri .= $this->getQueryString(); return $uri; } }