Search the Community
Showing results for tags 'run() method'.
-
version 0.5 Page 154 - 155 Larry, 1. What exactly is is a filter chain? 2. In the particular example given, does "invoking its run() method" mean invoking the "account" action's run method? 3. Where can I find the "account" action? Is it in the yii_cms? Should I search for "actionAccount" as a string within the files in the Protected folder? 4. If the "Account" action is hypothetical, would it really have a method called "run()"? If not, what is a run() method? Quoting from the book" "The method needs to take one parameter, which will be a filter chain. This variable will be used to allow the action to take place by invoking its run() method (i.e., continue the filtering and such)." The example given is: public function filterHttpsOnly($fc) { if (Yii::app()->getRequest()->getIsSecureConnection()) { $fc->run(); } else { throw new CHttpException(400, 'This page needs to be accessed securely.'); } } public function filters() { return array( 'accessControl', // account must be accessed over HTTPS: 'httpsOnly + account', ); } Thanks.
- 8 replies
-
- filter chain
- run() method
-
(and 3 more)
Tagged with: