改名
This commit is contained in:
@@ -74,7 +74,7 @@ class Component extends BaseObject
|
||||
*/
|
||||
public function trigger($name, $event = null, $params = [], $isRemove = false)
|
||||
{
|
||||
$aEvents = Snowflake::get()->event;
|
||||
$aEvents = Snowflake::app()->event;
|
||||
if (isset($this->_events[$name])) {
|
||||
$events = $this->_events[$name];
|
||||
foreach ($events as $key => $_event) {
|
||||
@@ -98,7 +98,7 @@ class Component extends BaseObject
|
||||
*/
|
||||
public function off($name, $handler = NULL)
|
||||
{
|
||||
$aEvents = Snowflake::get()->event;
|
||||
$aEvents = Snowflake::app()->event;
|
||||
if (!isset($this->_events[$name])) {
|
||||
return $aEvents->of($name, $handler);
|
||||
}
|
||||
@@ -125,7 +125,7 @@ class Component extends BaseObject
|
||||
public function offAll()
|
||||
{
|
||||
$this->_events = [];
|
||||
$aEvents = Snowflake::get()->event;
|
||||
$aEvents = Snowflake::app()->event;
|
||||
$aEvents->clean();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class Config extends Component
|
||||
*/
|
||||
public static function get($key, $try = FALSE, $default = null)
|
||||
{
|
||||
$config = Snowflake::get()->config;
|
||||
$config = Snowflake::app()->config;
|
||||
|
||||
if (strpos($key, '.') === false) {
|
||||
if (isset($config->data[$key])) {
|
||||
@@ -74,7 +74,7 @@ class Config extends Component
|
||||
*/
|
||||
public static function set($key, $value)
|
||||
{
|
||||
$config = Snowflake::get()->config;
|
||||
$config = Snowflake::app()->config;
|
||||
return $config->data[$key] = $value;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class Config extends Component
|
||||
*/
|
||||
public static function has($key, $must_not_null = false)
|
||||
{
|
||||
$config = Snowflake::get()->config;
|
||||
$config = Snowflake::app()->config;
|
||||
if (!isset($config->data[$key])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user