public static function __set_state(array $state)
{
$obj = new self();
foreach ($state as $k => $v) {
$obj->{$k} = $v;
}
return $obj;
}
/** * {@inheritDoc} */ public function load() { $file = file_get_contents($this->path); $object = json_decode($file, true); $object['config'] = Config::__set_state($object['config']); return $object; }