Пример #1
0
 /** Get the monuments from the model using the lat/lon pair
  * 
  * @param double $lat
  * @param double $long
  */
 public function getMonuments($lat, $long)
 {
     $mons = new ScheduledMonuments();
     $smrs = $mons->getSMRSNearby($lat, $long);
     if (count($smrs)) {
         return $this->buildHtml($smrs);
     } else {
         return false;
     }
 }
Пример #2
0
 /** Get the records from the database
  * @access public
  * @param  string $constituency
  * @return array
  */
 public function getRecords($constituency)
 {
     $osdata = new ScheduledMonuments();
     return $osdata->getSmrsConstituency($constituency);
 }
Пример #3
0
 public function samsAction()
 {
     $monuments = new ScheduledMonuments();
     $monjson = $monuments->samLookup($this->_getParam('q'));
     echo Zend_Json::encode($monjson);
 }
Пример #4
0
 /** SMR by WOEID
  */
 public function bywoeidAction()
 {
     if ($this->_getParam('number', false)) {
         $this->view->woeid = $this->_getParam('number');
         $smrs = new ScheduledMonuments();
         $this->view->smrs = $smrs->getSmrsByWoeid($this->_getParam('number'), $this->_getParam('page'));
     } else {
         throw new Pas_Exception_Param($this->_missingParameter);
     }
 }
Пример #5
0
 /** Get the data
  * @access public
  * @return object
  * @todo move data call to solr
  */
 public function getMonuments()
 {
     if ($this->getLat() && $this->getLon()) {
         $mons = new ScheduledMonuments();
         $smrs = $mons->getSMRSNearby($this->getLat(), $this->getLon());
         return $this->buildHtml($smrs);
     }
 }
Пример #6
0
 /** Get the data from the model
  * @access public
  * @param float $lat
  * @param float $lon
  * @param integer $distance
  * @return boolean
  */
 public function getData()
 {
     $coords = array($this->getLat(), $this->getLon());
     if (array_filter($coords)) {
         $smr = new ScheduledMonuments();
         return $smr->getSMRSNearby($this->getLat(), $this->getLon(), $this->getDistance());
     } else {
         return false;
     }
 }