Added addresstypes to address
This commit is contained in:
@@ -214,10 +214,27 @@ class mfBaseModel {
|
||||
}
|
||||
|
||||
public function __get($name) {
|
||||
if($name == "create" || $name == "edit") {
|
||||
if(isset($this->data->$name)) {
|
||||
return $this->data->$name;
|
||||
} else {
|
||||
return $this->$name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(isset($this->data->$name)) {
|
||||
return $this->data->$name;
|
||||
} elseif(property_exists(__CLASS__, $name)) {
|
||||
return $this->$name;
|
||||
} elseif(property_exists($this, $name)) {
|
||||
if(method_exists($this, "getProperty")) {
|
||||
$prop = $this->getProperty($name);
|
||||
if($prop === null){
|
||||
return null;
|
||||
}
|
||||
return $prop;
|
||||
} else {
|
||||
return $this->$name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user