mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 11:18:52 +00:00
Allow accessing Config data keys directly
This commit is contained in:
parent
5803a4e649
commit
ae8c934b5f
@ -150,6 +150,22 @@ class Config{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __get($k){
|
||||||
|
return $this->get($k);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __set($k, $v){
|
||||||
|
return $this->set($k, $v);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __isset($k){
|
||||||
|
return $this->exists($k);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __unset($k){
|
||||||
|
return $this->remove($k);
|
||||||
|
}
|
||||||
|
|
||||||
public function get($k){
|
public function get($k){
|
||||||
if($this->correct === false or !isset($this->config[$k])){
|
if($this->correct === false or !isset($this->config[$k])){
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user