Class ControllerFactory
Factory method for building controllers from request/response pairs.
Method Summary
- create() publicCreate a controller for a given request/response
- getControllerClass() publicDetermine the controller class name based on current request and controller param
- missingController() protectedThrows an exception when a controller is missing.
Method Detail
create()source public
create( Cake\Http\ServerRequest $request , Cake\Http\Response $response )
Create a controller for a given request/response
Parameters
-
Cake\Http\ServerRequest
$request
- The request to build a controller for.
-
Cake\Http\Response
$response
- The response to use.
Returns
Cake\Controller\Controller
getControllerClass()source public
getControllerClass( Cake\Http\ServerRequest $request )
Determine the controller class name based on current request and controller param
Parameters
-
Cake\Http\ServerRequest
$request
- The request to build a controller for.
Returns
string|nullmissingController()source protected
missingController( Cake\Http\ServerRequest $request )
Throws an exception when a controller is missing.
Parameters
-
Cake\Http\ServerRequest
$request
- The request.
Throws
Cake\Routing\Exception\MissingControllerException
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.4/class-Cake.Http.ControllerFactory.html