删除冗余代码&修复bug
This commit is contained in:
@@ -1,53 +1,7 @@
|
||||
<?php
|
||||
namespace catcher\base;
|
||||
|
||||
use catcher\CatchAdmin;
|
||||
|
||||
abstract class CatchController
|
||||
{
|
||||
/**public function __construct()
|
||||
{
|
||||
$this->loadConfig();
|
||||
}*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @time 2019年12月15日
|
||||
* @return void
|
||||
*/
|
||||
protected function loadConfig(): void
|
||||
{
|
||||
$module = explode('\\', get_class($this))[1];
|
||||
|
||||
$moduleConfig = CatchAdmin::moduleDirectory($module) . 'config.php';
|
||||
|
||||
if (file_exists(CatchAdmin::moduleDirectory($module) . 'config.php')) {
|
||||
app()->config->load($moduleConfig);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @time 2019年12月13日
|
||||
* @param $name
|
||||
* @param $value
|
||||
* @return void
|
||||
*/
|
||||
public function __set($name, $value)
|
||||
{
|
||||
// TODO: Implement __set() method.
|
||||
$this->{$name} = $value;
|
||||
}
|
||||
|
||||
public function __get($name)
|
||||
{
|
||||
// TODO: Implement __get() method.
|
||||
}
|
||||
|
||||
public function __isset($name)
|
||||
{
|
||||
// TODO: Implement __isset() method.
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user