[pLog-svn] r485 - plog/trunk/class/controller
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Mon Dec 13 23:42:04 GMT 2004
Author: oscar
Date: 2004-12-13 23:42:03 +0000 (Mon, 13 Dec 2004)
New Revision: 485
Modified:
plog/trunk/class/controller/controller.class.php
Log:
cleaned it up a bit, and improved the usage of the new class loader object.
Modified: plog/trunk/class/controller/controller.class.php
===================================================================
--- plog/trunk/class/controller/controller.class.php 2004-12-13 23:40:37 UTC (rev 484)
+++ plog/trunk/class/controller/controller.class.php 2004-12-13 23:42:03 UTC (rev 485)
@@ -96,9 +96,9 @@
// default folder where actions are located
$this->actionFolderPath = PLOG_CLASS_PATH.'class/action/';
- // folder where classes can be loaded
- //$this->_loader = new ResourceClassLoader( $this->actionFolderPath );
- $this->_loader =& ResourceClassLoader::getLoader( $this->actionFolderPath );
+ // get a resource loader so that we can dynamically load classes if they
+ // have not been loaded yet!
+ $this->_loader =& ResourceClassLoader::getLoader( $this->actionFolderPath );
}
/**
@@ -135,17 +135,14 @@
global $_plogController_actionMap;
$actionMap = $_plogController_actionMap;
- if (($actionName == '') || (!empty($actionMap) && !array_key_exists($actionName, $actionMap)))
- {
+ if (($actionName == '') || (!empty($actionMap) && !array_key_exists($actionName, $actionMap))) {
$actionName = DEFAULT_ACTION_NAME;
}
- if (!empty($actionMap))
- {
+ if (!empty($actionMap)) {
$actionClassName = $actionMap[$actionName];
}
- else
- {
+ else {
$actionClassName = $actionName . 'Action';
}
@@ -181,7 +178,7 @@
function loadActionClass( $actionClass )
{
if( !class_exists($actionClass)) {
- $this->_loader->load( $actionClass );
+ $this->_loader->load( $actionClass );
}
return true;
More information about the pLog-svn
mailing list