Skip to content

Instantly share code, notes, and snippets.

@oh-sky oh-sky/AppController.php

Last active Aug 29, 2015
What would you like to do?
CakePHP2 defined methods of Controller
App::uses('Controller', 'Controller');
AppController extends Controller {
public function __construct($request = null, $response = null) {
parent::__construct($request, $response);
// ここに書いた処理はComponent初期化より前に実行されます
public function startupProcess() {
// ここに書いた処理はComponent初期化より前に実行されます
// 親クラス(Controller)のstartupProcess()より前に書く必要があります。
public function beforeFilter() {
// この中の処理はComponent初期化後に実行されます
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.