File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33namespace App \Controllers ;
44
55use CodeIgniter \Controller ;
6+ use CodeIgniter \HTTP \CLIRequest ;
7+ use CodeIgniter \HTTP \IncomingRequest ;
68use CodeIgniter \HTTP \RequestInterface ;
79use CodeIgniter \HTTP \ResponseInterface ;
810use Psr \Log \LoggerInterface ;
@@ -22,7 +24,7 @@ abstract class BaseController extends Controller
2224 /**
2325 * Instance of the main Request object.
2426 *
25- * @var RequestInterface
27+ * @var CLIRequest|IncomingRequest
2628 */
2729 protected $ request ;
2830
Original file line number Diff line number Diff line change 1212namespace CodeIgniter \RESTful ;
1313
1414use CodeIgniter \Controller ;
15+ use CodeIgniter \HTTP \CLIRequest ;
16+ use CodeIgniter \HTTP \IncomingRequest ;
1517use CodeIgniter \HTTP \RequestInterface ;
1618use CodeIgniter \HTTP \ResponseInterface ;
1719use Psr \Log \LoggerInterface ;
1820
1921abstract class BaseResource extends Controller
2022{
23+ /**
24+ * Instance of the main Request object.
25+ *
26+ * @var CLIRequest|IncomingRequest
27+ */
28+ protected $ request ;
29+
2130 /**
2231 * @var string|null The model that holding this resource's data
2332 */
@@ -34,6 +43,7 @@ abstract class BaseResource extends Controller
3443 public function initController (RequestInterface $ request , ResponseInterface $ response , LoggerInterface $ logger )
3544 {
3645 parent ::initController ($ request , $ response , $ logger );
46+
3747 $ this ->setModel ($ this ->modelName );
3848 }
3949
You can’t perform that action at this time.
0 commit comments