| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- namespace TestApp\Controller;
- use Cake\Controller\Controller;
- use Cake\Network\Exception\NotFoundException;
- /**
- * CakesController class
- */
- class CakesController extends Controller
- {
- /**
- * The default model to use.
- *
- * @var string
- */
- public $modelClass = 'Posts';
- /**
- * index method
- *
- * @return \Cake\Network\Response
- */
- public function index()
- {
- $this->response->body('Hello Jane');
- return $this->response;
- }
- /**
- * No autoRender
- *
- * @return void
- */
- public function noRender()
- {
- $this->autoRender = false;
- $this->response->body('autoRender false body');
- }
- /**
- * invalid method
- *
- * @return \Cake\Network\Response
- */
- public function invalid()
- {
- return 'Some string';
- }
- /**
- * startup process.
- */
- public function startupProcess()
- {
- parent::startupProcess();
- if ($this->request->param('stop') === 'startup') {
- $this->response->body('startup stop');
- return $this->response;
- }
- }
- /**
- * shutdown process.
- */
- public function shutdownProcess()
- {
- parent::shutdownProcess();
- if ($this->request->param('stop') === 'shutdown') {
- $this->response->body('shutdown stop');
- return $this->response;
- }
- }
- }
|