コード例 #1
0
 /**
  * Get geo data of all "nearby" articles (within given distance in kilometres)
  *
  * TODO: implement
  *
  * @param PlaceModel $center place to find nearby places for
  * @param int $distance define nearby distance (in km)
  * @return array set of PlaceModel objects
  */
 public function getNearby(PlaceModel $center, $distance = 10)
 {
     wfProfileIn(__METHOD__);
     $models = $this->query(array('nearby' => $center->getLatLon(), 'distance' => intval($distance)));
     wfProfileOut(__METHOD__);
     return $models;
 }