/** * Initialization. * * @param array $args Web and URL arguments * * @return boolean true if nothing goes wrong */ function prepare($args) { parent::prepare($args); $this->query = $this->trimmed('q'); $this->lang = $this->trimmed('lang'); $this->rpp = $this->trimmed('rpp'); if (!$this->rpp) { $this->rpp = 15; } if ($this->rpp > 100) { $this->rpp = 100; } $this->page = $this->trimmed('page'); if (!$this->page) { $this->page = 1; } $this->since_id = $this->trimmed('since_id'); $this->geocode = $this->trimmed('geocode'); return true; }
/** * Initialization. * * @param array $args Web and URL arguments * * @return boolean false if user doesn't exist */ function prepare($args) { parent::prepare($args); return true; }
/** * Read arguments and initialize members * * @param array $args Arguments from $_REQUEST * * @return boolean success * */ function prepare($args) { parent::prepare($args); $this->query = $this->trimmed('q'); $this->lang = $this->trimmed('lang'); $this->rpp = $this->trimmed('rpp'); if (!$this->rpp) { $this->rpp = 15; } if ($this->rpp > 100) { $this->rpp = 100; } $this->page = $this->trimmed('page'); if (!$this->page) { $this->page = 1; } // TODO: Suppport since_id -- we need to tweak the backend // Search classes to support it. $this->since_id = $this->trimmed('since_id'); $this->geocode = $this->trimmed('geocode'); // TODO: Also, language and geocode return true; }