chainsaw = new \ChainsawFB(); } */ public function _remap($method, ...$params) { if (method_exists($this, $method)) { return $this->{$method}(...$params); } throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound(); } protected function facebook(...$params) { $this->chainsaw = new ZenithFB(); $this->fb_func(...$params); } protected function moment(...$params) { $this->chainsaw = new ZenithKM(); $this->fb_func(...$params); } protected function google(...$params) { $this->chainsaw = new ZenithGG(); $this->fb_func(...$params); } protected function fb_func(...$params) { if (method_exists($this->chainsaw, $params[0])) { $result = $this->chainsaw->{$params[0]}(); if(in_array('grid', $params)) $this->chainsaw->grid($result); return $result; } } //안쓰는거 /* protected function kakaoMoment(...$params) { include APPPATH."/ThirdParty/moment_api/kmapi.php"; $this->chainsaw = new \ChainsawKM(); $this->km_func(...$params); } protected function km_func(...$params) { if (method_exists($this->chainsaw, $params[0])) { $result = $this->chainsaw->{$params[0]}(); if(in_array('grid', $params)) $this->chainsaw->grid($result); return $result; } } */ }