* finish tsak #2199.
This commit is contained in:
@@ -57,14 +57,6 @@ class router
|
||||
*/
|
||||
private $appRoot;
|
||||
|
||||
/**
|
||||
* The root directory of the app library($this->appRoot/lib).
|
||||
*
|
||||
* @var string
|
||||
* @access private
|
||||
*/
|
||||
private $appLibRoot;
|
||||
|
||||
/**
|
||||
* The root directory of temp.
|
||||
*
|
||||
@@ -293,7 +285,6 @@ class router
|
||||
$this->setFrameRoot();
|
||||
$this->setCoreLibRoot();
|
||||
$this->setAppRoot($appName, $appRoot);
|
||||
$this->setAppLibRoot();
|
||||
$this->setTmpRoot();
|
||||
$this->setCacheRoot();
|
||||
$this->setLogRoot();
|
||||
@@ -411,17 +402,6 @@ class router
|
||||
if(!is_dir($this->appRoot)) $this->triggerError("The app you call not found in {$this->appRoot}", __FILE__, __LINE__, $exit = true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the app lib root.
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function setAppLibRoot()
|
||||
{
|
||||
$this->appLibRoot = $this->appRoot . 'lib' . $this->pathFix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the tmp root.
|
||||
*
|
||||
@@ -592,17 +572,6 @@ class router
|
||||
{
|
||||
return $this->appRoot;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the $appLibRoot var
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getAppLibRoot()
|
||||
{
|
||||
return $this->appLibRoot;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the $tmpRoot var
|
||||
@@ -1305,7 +1274,7 @@ class router
|
||||
/**
|
||||
* Load a class file.
|
||||
*
|
||||
* First search in $appLibRoot, then $coreLibRoot.
|
||||
* Search in $coreLibRoot.
|
||||
*
|
||||
* @param string $className the class name
|
||||
* @param bool $static statis class or not
|
||||
@@ -1316,19 +1285,11 @@ class router
|
||||
{
|
||||
$className = strtolower($className);
|
||||
|
||||
/* Search in $appLibRoot. */
|
||||
$classFile = $this->appLibRoot . $className;
|
||||
/* Search in $coreLibRoot. */
|
||||
$classFile = $this->coreLibRoot . $className;
|
||||
if(is_dir($classFile)) $classFile .= $this->pathFix . $className;
|
||||
$classFile .= '.class.php';
|
||||
|
||||
if(!helper::import($classFile))
|
||||
{
|
||||
/* Search in $coreLibRoot. */
|
||||
$classFile = $this->coreLibRoot . $className;
|
||||
if(is_dir($classFile)) $classFile .= $this->pathFix . $className;
|
||||
$classFile .= '.class.php';
|
||||
if(!helper::import($classFile)) $this->triggerError("class file $classFile not found", __FILE__, __LINE__, $exit = true);
|
||||
}
|
||||
if(!helper::import($classFile)) $this->triggerError("class file $classFile not found", __FILE__, __LINE__, $exit = true);
|
||||
|
||||
/* If staitc, return. */
|
||||
if($static) return true;
|
||||
|
||||
Reference in New Issue
Block a user