Inheritance diagram for Legacy_Controller:
Public Member Functions | |
prepare (&$root) | |
executeCommon () | |
_setupEnvironment () | |
_setupFilterChain () | |
_setupBlock () | |
_processBlock () | |
_processModule () | |
_setupUser () | |
_setupDB () | |
_setupLanguage () | |
& | _createLanguageManager ($language) |
_setupConfig () | |
_setupDebugger () | |
_processPreBlockFilter () | |
_setupSession () | |
executeHeader () | |
executeView () | |
_executeViewTheme (&$resultRenderTarget) | |
& | _createDelegateManager () |
& | _createServiceManager () |
checkLogin () | |
logout () | |
switchStateCompulsory (&$strategy) | |
setStrategy (&$strategy) | |
setDialogMode ($flag) | |
getDialogMode () | |
& | getVirtualCurrentModule () |
getPMInboxUrl ($uid) | |
getCountUnreadPM ($uid) | |
executeRedirect ($url, $time=1, $message=null) | |
isEnableCacheFeature () | |
existActiveCacheFile ($filepath, $cachetime) | |
cacheRenderTarget ($filepath, &$renderTarget) | |
loadCache ($filepath) | |
& | _createContext () |
[NOTICE] XOOPS 2.0.x can switch to public mode and control panel mode. This controller emulates its process with using STATE. But, we may lose flexible setup by this implement. Now, we are investigating the influence.
[TODO] XCube_Controller keeps a process that set up instances of some legacy classes, yet. We should move its process to this controller.
Legacy_Controller::prepare | ( | &$ | root | ) |
This member function is overridden. The sub-class implements the initialization process which sets up the root object finally.
XCube_Root | $root |
Reimplemented from XCube_Controller.
Legacy_Controller::executeCommon | ( | ) |
public
Reimplemented from XCube_Controller.
Legacy_Controller::_setupEnvironment | ( | ) |
This member function is overridden. Sets up the controller and the environment.
Reimplemented from XCube_Controller.
Legacy_Controller::_setupFilterChain | ( | ) |
[NOTICE] We set up only filters that are decided to register by us. This is not flexible. This is not the style fixed.
[MEMO] For test, you can use automatic loading plug-in with writing a setting in site_custom.ini.php.
site_custom.ini.php: [Legacy] AutoPreload = 1
Reimplemented from XCube_Controller.
Legacy_Controller::_setupBlock | ( | ) |
FIXME.
Reimplemented from XCube_Controller.
Legacy_Controller::_processBlock | ( | ) |
Process of Block. Fetch objects from $this->mBlockChain, render the result of the object with html data, and set those result to member property.
In this member function, the cache mechanism has to be important. If the object has its cache, this function loads the cache data instead of calling the business logic of the block.
protected
Reimplemented from XCube_Controller.
Legacy_Controller::_processModule | ( | ) |
Legacy_Controller::_setupUser | ( | ) |
Sets up a principal object to the root object. In other words, restores the principal object from session or other.
Reimplemented from XCube_Controller.
Legacy_Controller::_setupDB | ( | ) |
Create the instance of DataBase class, and set it to member property. protected
Reimplemented from XCube_Controller.
Legacy_Controller::_setupLanguage | ( | ) |
Create a instance of Legacy_LanguageManager by the specified language, and set it to member properties.
[Notice] Now, this member function sets a string to the member property without language manager.
Reimplemented from XCube_Controller.
& Legacy_Controller::_createLanguageManager | ( | $ | language | ) |
Factory for the language manager. At first, this member function delegates to get a instance of LanguageManager. If it can't get it, do the following process:
1) Try creating a instance of 'Legacy_LanguageManager_' . ucfirst($language) 2) If the class doesn't exist, try loading 'LanguageManager.class.php' in the specified language. 3) Re-try creating the instance.
If it can't create any instances, create a instance of Legacy_LanguageManager as default.
protected
string | $language |
Legacy_Controller::_setupConfig | ( | ) |
This member function is overridden. Loads site configuration informations, and sets them to the member property.
Reimplemented from XCube_Controller.
Legacy_Controller::_setupDebugger | ( | ) |
Set debbuger object to member property.
Legacy_Controller::_processPreBlockFilter | ( | ) |
Calls the preBlockFilter() member function of action filters which have been loaded to the list of the controller.
protected
Reimplemented from XCube_Controller.
Legacy_Controller::_setupSession | ( | ) |
This member function is overrided. Sets up handler for session, then starts session.
Reimplemented from XCube_Controller.
Legacy_Controller::executeHeader | ( | ) |
Usually this member function is called after executeCommon(). But, some cases don't call this. Therefore, the page controller type base should not write the indispensable code here. For example, this is good to call blocks.
Reimplemented from XCube_Controller.
Legacy_Controller::executeView | ( | ) |
Executes the view logic. This member function is overridden.
public
Reimplemented from XCube_Controller.
Legacy_Controller::_executeViewTheme | ( | &$ | resultRenderTarget | ) |
$resultRenderTarget object The render target of content's result.
<
& Legacy_Controller::_createDelegateManager | ( | ) |
Creates an instance of the delegate manager and returns it.
Reimplemented from XCube_Controller.
& Legacy_Controller::_createServiceManager | ( | ) |
Creates an instance of the service manager and returns it.
Reimplemented from XCube_Controller.
Legacy_Controller::checkLogin | ( | ) |
Check the login request through delegates, and set XoopsObject to member property if the login is success.
public
Legacy_Controller::logout | ( | ) |
The current user logout.
public
Legacy_Controller::switchStateCompulsory | ( | &$ | strategy | ) |
Legacy_Controller::setStrategy | ( | &$ | strategy | ) |
CAUTION!! This method has a special mission. Because this method changes state after executeCommon, this resets now property. It depends on XCube_Controller steps.
Legacy_AbstractControllerStrategy | $strategy |
Legacy_Controller::setDialogMode | ( | $ | flag | ) |
Set bool flag to dialog mode flag. If you set true, executeView() will use Legacy_DialogRenderTarget class as render target.
$flag | bool |
Legacy_Controller::getDialogMode | ( | ) |
Return dialog mode flag.
& Legacy_Controller::getVirtualCurrentModule | ( | ) |
Return current module object. But, it's decided by the rules of the state. Preferences page, Help page and some pages returns the specified module by dirname. It's useful for controlling a theme.
Legacy_Controller::getPMInboxUrl | ( | $ | uid | ) |
Return URL of pm inbox. This is X2 fixed feature.
$uid | int ID of the user |
Legacy_Controller::getCountUnreadPM | ( | $ | uid | ) |
Return counts of unread pm. This is X2 fixed feature.
$uid | int ID of the user |
Legacy_Controller::executeRedirect | ( | $ | url, | |
$ | time = 1 , |
|||
$ | message = null | |||
) |
This member function works to redirect as well as redirect_header(). But, this member function handles raw values which hasn't been converted by htmlspecialchars(). Therefore, if user calls this function with the wrong value, some problems may be raised. If you can't understand the difference, use not this function but redirect_header().
string | $url redirect URL. Don't use user's variables or request. | |
int | $time waiting time (sec) | |
string | $message This string doesn't include tags. |
Reimplemented from XCube_Controller.
Legacy_Controller::isEnableCacheFeature | ( | ) |
Gets a value indicating whether the controller can use a cache mechanism.
Legacy_Controller::existActiveCacheFile | ( | $ | filepath, | |
$ | cachetime | |||
) |
Gets a value indicating wheter a cache file keeps life time. If $cachetime is 0 or the specific cache file doesn't exist, gets false.
string | $filepath a file path of the specific cache file. | |
int | $cachetime cache active duration. (Sec) |
Legacy_Controller::cacheRenderTarget | ( | $ | filepath, | |
&$ | renderTarget | |||
) |
Save the content of $renderTarget to $filepath.
string | $filepath a file path of the cache file. | |
XCube_RenderTarget | $renderBuffer |
Legacy_Controller::loadCache | ( | $ | filepath | ) |
Loads $filepath and gets the content of the file.
& Legacy_Controller::_createContext | ( | ) |
Creates the context object to initial the root object, and returns it.
Reimplemented from XCube_Controller.