1: <?php
2: /**
3: *
4: * @package XCube
5: * @version $Id: XCube_ActionFilter.class.php,v 1.5 2008/10/12 04:30:27 minahito Exp $
6: * @copyright Copyright 2005-2007 XOOPS Cube Project <https://github.com/xoopscube/legacy>
7: * @license https://github.com/xoopscube/legacy/blob/master/docs/bsd_licenses.txt Modified BSD license
8: *
9: */
10:
11: /**
12: * @public
13: * @brief [Abstract] Used for initialization, post-processing and others by the controller.
14: *
15: * This class is chained and called by the initialization procedure of the
16: * controller class. Developers or users can use the subclass of this class for
17: * dynamic customizing.
18: *
19: * Users usually don't need to add on filters because each controllers should
20: * have initialization code enough. This class is used to the case of special
21: * customizing by modules and users.
22: *
23: * Each controllers should not use this class to their initialization procedure.
24: *
25: * Two member functions are called by the controller at the special timing.
26: * These timing is different in each controllers.
27: *
28: * \par Abstract Class
29: * This class is an abstract class.
30: */
31: class XCube_ActionFilter
32: {
33: /**
34: * @protected
35: * @brief [READ ONLY] XCube_Controller
36: */
37: var $mController;
38:
39: /**
40: * @protected
41: * @brief [READ ONLY] XCube_Root
42: */
43: var $mRoot;
44:
45: /**
46: * @public
47: * @brief Constructor.
48: * @param $controller XCube_Controller
49: */
50: function XCube_ActionFilter(&$controller)
51: {
52: $this->mController =& $controller;
53: $this->mRoot =& $this->mController->mRoot;
54: }
55:
56: /**
57: * @public
58: * @brief [Abstract] Executes the logic, when the controller executes preFilter().
59: * @remarks
60: * This method is called earliest in the controller's initialization process, so
61: * some of filters may not be called if these filters are registered later.
62: */
63: function preFilter()
64: {
65: }
66:
67: /**
68: * @public
69: * @brief [Abstract] Executes the logic, when the controller executes preBlockFilter().
70: * @remarks
71: * Each controller has different timing when it calls preBlockFilter().
72: */
73: function preBlockFilter()
74: {
75: }
76:
77: /**
78: * @public
79: * @brief [Abstract] Executes the logic, when the controller executes postFilter().
80: * @remarks
81: * Each controller has different timing when it calls postFilter().
82: */
83: function postFilter()
84: {
85: }
86: }
87:
88: ?>
89: