Merge branch 'fronkdev' into 'master'
Added Lieboch to rimo api import See merge request fronk/thetool!272
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
class ADBNetzgebiet extends mfBaseModel {
|
||||
private $gemeinden;
|
||||
|
||||
private $json_options;
|
||||
|
||||
protected function init() {
|
||||
$this->db = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
$this->table = "Netzgebiet";
|
||||
@@ -23,6 +24,27 @@ class ADBNetzgebiet extends mfBaseModel {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getOption($opt) {
|
||||
$options = $this->getOptions();
|
||||
if(!$options) return null;
|
||||
if(property_exists($options, $opt)) {
|
||||
return $options->$opt;
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
public function getOptions() {
|
||||
if(!$this->options) {
|
||||
return false;
|
||||
}
|
||||
$opts = json_decode($this->options);
|
||||
if(json_last_error() != JSON_ERROR_NONE) {
|
||||
return null;
|
||||
}
|
||||
return $opts;
|
||||
}
|
||||
|
||||
public function getProperty($name) {
|
||||
if($this->$name == null) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user