diff --git a/application/controllers/api/example.php b/application/controllers/api/example.php index edfd1e32..f124d279 100644 --- a/application/controllers/api/example.php +++ b/application/controllers/api/example.php @@ -14,7 +14,7 @@ */ // This can be removed if you use __autoload() in config.php OR use Modular Extensions -require APPPATH.'/libraries/REST_Controller.php'; +require APPPATH.'/third_party/restserver/libraries/REST_Controller.php'; class Example extends REST_Controller { diff --git a/application/config/rest.php b/application/third_party/restserver/config/rest.php similarity index 100% rename from application/config/rest.php rename to application/third_party/restserver/config/rest.php diff --git a/application/libraries/Format.php b/application/third_party/restserver/libraries/Format.php similarity index 100% rename from application/libraries/Format.php rename to application/third_party/restserver/libraries/Format.php diff --git a/application/libraries/REST_Controller.php b/application/third_party/restserver/libraries/REST_Controller.php similarity index 99% rename from application/libraries/REST_Controller.php rename to application/third_party/restserver/libraries/REST_Controller.php index 74cf6290..260b13ea 100644 --- a/application/libraries/REST_Controller.php +++ b/application/third_party/restserver/libraries/REST_Controller.php @@ -31,6 +31,9 @@ public function __construct() { parent::__construct(); + // Add third_party path so that we can find the config/rest.php and libraries/format.php + $this->load->add_package_path(APPPATH.'third_party/restserver/'); + // Lets grab the config and get ready to party $this->load->config('rest');