Skip to content

Commit a5ea7ff

Browse files
lweb20chriskacerguis
authored andcommitted
add namespaces support (#745)
1 parent 5aef7b4 commit a5ea7ff

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

application/libraries/Format.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
namespace Restserver\Libraries;
23

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

application/libraries/REST_Controller.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<?php
2+
namespace Restserver\Libraries;
3+
4+
use Exception;
5+
use stdClass;
6+
use Restserver\Libraries\Format;
27

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

@@ -14,7 +19,7 @@
1419
* @link https://github.com/chriskacerguis/codeigniter-restserver
1520
* @version 3.0.0
1621
*/
17-
abstract class REST_Controller extends CI_Controller {
22+
abstract class REST_Controller extends \CI_Controller {
1823

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

@@ -430,7 +435,7 @@ public function __construct($config = 'rest')
430435
}
431436

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

435440
// Initialise the response, request and rest objects
436441
$this->request = new stdClass();

composer.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@
33
"name": "chriskacerguis/codeigniter-restserver",
44
"type": "project",
55
"homepage": "https://github.com/chriskacerguis/codeigniter-restserver",
6-
"authors": [
6+
"authors": [
77
{
88
"name": "Chris Kacerguis",
99
"role": "Developer"
1010
}
1111
],
12+
"require": {
13+
"php": ">=5.4.0"
14+
},
15+
"autoload": {
16+
"classmap": [
17+
"application/libraries/Format.php",
18+
"application/libraries/REST_Controller.php"
19+
]
20+
},
1221
"license": "MIT",
1322
"support": {
1423
"source": "https://github.com/chriskacerguis/codeigniter-restserver"

0 commit comments

Comments
 (0)