So i have set up my codeigniter 3 application working fine with chriskacerguis rest server and when i integrate it with jamieumberlow's MY\_controller, everything works fine except that when loading views i get a remap error. that's the error i get

**Declaration of REST\_Controller::\_remap() should be compatible with MY\_Controller::\_remap($method)**

My code sample are as follows the rest

```
 abstract class REST_Controller extends CI_Controller {

   }

```

my controller extends the rest controller

```
require APPPATH . '/libraries/REST_Controller.php';

class MY_Controller extends REST_Controller
{   

}

```

and other classes extends MY\_Controller

```
class Example extends MY_Controller {
}

```

problem is i can't get my classes to work with remap function and i wan't to display my views with the remap method. it say's it's not compatible. been on this for a while. appreciate any help atm. 

This is the remap script that messes it all up

```
public function _remap($method)
    {
        if (method_exists($this, $method))
        {
            call_user_func_array(array($this, $method), array_slice($this->uri->rsegments, 2));
        }
        else
        {
            if (method_exists($this, '_404'))
            {
                call_user_func_array(array($this, '_404'), array($method));
            }
            else
            {
                show_404(strtolower(get_class($this)).'/'.$method);
            }
        }

        $this->_load_view();
    }

```

and the load view function

```
protected function _load_view()
    {

        if($this->_is_ajax())
        {
            $this->layout = FALSE;

            if($this->_is_json())
            {
                $this->view = false;
                //$this->output->set_content_type('application/json')->set_output(json_encode($this->data));
            }
        }

        // If $this->view == FALSE, we don't want to load anything
        if ($this->view !== FALSE)
        {
            // If $this->view isn't empty, load it. If it isn't, try and guess based on the controller and action name
            $view = (!empty($this->view)) ? $this->view : $this->router->directory . $this->router->class . '/' . $this->router->method;

            // Load the view into $yield
            $data['yield'] = $this->load->view($view, $this->data, TRUE);

            // Do we have any asides? Load them.
            if (!empty($this->asides))
            {
                foreach ($this->asides as $name => $file)
                {
                    $data['yield_'.$name] = $this->load->view($file, $this->data, TRUE);
                }
            }

            // Load in our existing data with the asides and view
            $data = array_merge($this->data, $data);
            $layout = FALSE;

            // If we didn't specify the layout, try to guess it
            if (!isset($this->layout))
            {
                if (file_exists(APPPATH . 'views/layouts/' . $this->router->class . '.php'))
                {
                    $layout = 'layouts/' . $this->router->class;
                } 
                else
                {
                    $layout = 'layouts/application';
                }
            }

            // If we did, use it
            else if ($this->layout !== FALSE)
            {
                $layout = $this->layout;
            }

            // If $layout is FALSE, we're not interested in loading a layout, so output the view directly
            if ($layout == FALSE)
            {
                $this->output->set_output($data['yield']);
            }

            // Otherwise? Load away :)
            else
            {
                $this->load->view($layout, $data);
            }
        }
    }

```