0
有人會向我整體解釋這個功能嗎?即過濾器之前的功能以及每行的功能。謝謝。需要cakephp的Auth組件配置詳細信息?
function beforeFilter()
{
//Configure AuthComponent
$this->Auth->authorize = 'actions';
$this->Auth->actionPath = 'controllers/';
$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
$this->Auth->loginRedirect = array('controller' => 'posts', 'action' => 'add');
$this->Auth->logoutRedirect = array('controller' => 'users', 'action' => 'login');
}
它說,它做什麼的註釋。它配置AuthComponent。沒什麼神奇的。這是對屬性的簡單賦值。請澄清你的問題,指出你對此不瞭解的內容。 – Gordon 2011-02-02 16:50:41
*(參考)* http://api.cakephp.org/class/auth-component – Gordon 2011-02-02 16:52:35