public function __clone() { if ($this->config) { $this->config = clone $this->config; } if ($this->router) { $this->router = clone $this->router; } }