/** Get the geometry of a constituency * @access public * @param string $constituency * @return array * @throws Pas_Twfy_Exception */ public function get($constituency, $params = array()) { if (!is_null($constituency) && is_string($constituency)) { $params = array('key' => $this->_apikey, 'name' => $constituency, 'format' => $this->_format); return parent::get(self::METHOD, $params); } else { throw new Pas_Twfy_Exception('No constituency provided', 500); } }
/** Get a person's data * * @param int $id * @return object * @throws Pas_Twfy_Exception */ public function get($id, $params = array()) { if (is_numeric($id) && !is_null($id)) { $params = array('key' => $this->_apikey, 'output' => 'js', 'id' => $id); return parent::get(self::METHOD, $params); } else { throw new Pas_Twfy_Exception('Person ID problems', 500); } }
/** Get the extended data * @access public * @param integer $id * @param string $postcode * @return type */ public function get($postcode) { $params = array('key' => $this->_apikey, 'output' => 'js', 'postcode' => $postcode); return parent::get(self::METHOD, $params); }
/** Get the constituency * * @param string $constituency * @return void */ public function get($constituency) { $params = array('key' => $this->_apikey, 'name' => $constituency); return parent::get(self::METHOD, $params); }
/** Get the constituency data * @access public * @param string $name * @param string $postcode * @return type */ public function get($name = null, $postcode = null) { $params = array('key' => $this->_apikey, 'name' => $name, 'postcode' => $postcode); return parent::get(self::METHOD, $params); }
/** Get the extended data * @access public * @param integer $id * @param array $fields * @return type */ public function get($id = null, array $fields) { $params = array('key' => $this->_apikey, 'id' => $id, 'fields' => $fields); return parent::get(self::METHOD, $params); }
/** Get the response from twfy * @access public * @param string $date * @return array */ public function get($date) { $params = array('key' => $this->_apikey, 'date' => $date); $data = parent::get(self::METHOD, $params); return $this->_cleanUp($data); }
/** Retrieve data * @access public * @param string $search * @param int $page * @param int $limit * @param string $order * @return array */ public function fetchData() { $params = array('key' => $this->_apikey, 'order' => $this->getOrder(), 'search' => $this->getSearch(), 'num' => $this->getLimit(), 'page' => $this->getPage()); return parent::get(self::METHOD, $params); }