Exemplo n.º 1
0
Arquivo: Wfs.php Projeto: Gnafu/wiz
 public static function getLayers()
 {
     $layers = Wfs::model()->findAllByAttributes(array('username' => Yii::app()->user->id));
     $return = array();
     foreach ($layers as $i => $l) {
         $return[] = array('name' => $l->name, 'title' => $l->title, 'typename' => $l->typename, 'typenameurl' => $l->typenameurl, 'url' => $l->url, 'projection' => $l->projection);
     }
     return $return;
 }
Exemplo n.º 2
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param string $id the identifier of the model to be loaded
  */
 public function loadModel($name)
 {
     $model = Wfs::model()->findByPk(array('username' => Yii::app()->user->id, 'name' => $name));
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
 public function transaction($method, $wfsConf, $geoJson)
 {
     $gmlFactory = new Gml_2_Factory();
     $gmlObj = $gmlFactory->createFromGeoJson($geoJson);
     return parent::transaction($method, $wfsConf, $gmlObj);
 }