Compare commits
2 Commits
d1adc532e1
...
v2.15
| Author | SHA1 | Date | |
|---|---|---|---|
| eb42c8e0a2 | |||
| 10de0d5e08 |
+12
-8
@@ -52,15 +52,19 @@ class Client
|
||||
{
|
||||
// TODO: Implement __get() method.
|
||||
$getter = 'get' . ucfirst($name);
|
||||
if (method_exists($this, $getter)) {
|
||||
return $this->$getter();
|
||||
} else if (method_exists($this, $name)) {
|
||||
return $this->$name();
|
||||
} else if (property_exists($this, $name)) {
|
||||
return $this->$name;
|
||||
} else {
|
||||
throw new Exception('Property|Method "' . $name . '" does not exist.');
|
||||
if (method_exists($this->abstracts, $getter)) {
|
||||
return $this->abstracts->$getter();
|
||||
}
|
||||
|
||||
if (method_exists($this->abstracts, $name)) {
|
||||
return $this->abstracts->$name();
|
||||
}
|
||||
|
||||
if (property_exists($this->abstracts, $name)) {
|
||||
return $this->abstracts->$name;
|
||||
}
|
||||
|
||||
throw new Exception('Property|Method "' . $name . '" does not exist.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user