Skip to content

Commit

Permalink
add namespaces support (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
lweb20 authored and chriskacerguis committed Dec 27, 2016
1 parent 5aef7b4 commit a5ea7ff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions application/libraries/Format.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
namespace Restserver\Libraries;

defined('BASEPATH') OR exit('No direct script access allowed');

Expand Down
9 changes: 7 additions & 2 deletions application/libraries/REST_Controller.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?php
namespace Restserver\Libraries;

use Exception;
use stdClass;
use Restserver\Libraries\Format;

defined('BASEPATH') OR exit('No direct script access allowed');

Expand All @@ -14,7 +19,7 @@
* @link https://github.com/chriskacerguis/codeigniter-restserver
* @version 3.0.0
*/
abstract class REST_Controller extends CI_Controller {
abstract class REST_Controller extends \CI_Controller {

// Note: Only the widely used HTTP status codes are documented

Expand Down Expand Up @@ -430,7 +435,7 @@ public function __construct($config = 'rest')
}

// Load the language file
$this->lang->load('rest_controller', $language);
$this->lang->load('rest_controller', $language, FALSE, TRUE, __DIR__."/../");

// Initialise the response, request and rest objects
$this->request = new stdClass();
Expand Down
11 changes: 10 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@
"name": "chriskacerguis/codeigniter-restserver",
"type": "project",
"homepage": "https://github.com/chriskacerguis/codeigniter-restserver",
"authors": [
"authors": [
{
"name": "Chris Kacerguis",
"role": "Developer"
}
],
"require": {
"php": ">=5.4.0"
},
"autoload": {
"classmap": [
"application/libraries/Format.php",
"application/libraries/REST_Controller.php"
]
},
"license": "MIT",
"support": {
"source": "https://github.com/chriskacerguis/codeigniter-restserver"
Expand Down

0 comments on commit a5ea7ff

Please sign in to comment.