安装插件后的基础文件
This commit is contained in:
58
plugin/demo/Demo.php
Normal file
58
plugin/demo/Demo.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace plugin\demo;
|
||||
|
||||
use app\PluginController;
|
||||
|
||||
|
||||
/**
|
||||
* 演示插件
|
||||
*/
|
||||
class Demo extends PluginController
|
||||
{
|
||||
/**
|
||||
* 插件安装方法
|
||||
* @return bool
|
||||
*/
|
||||
public function install()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件卸载方法
|
||||
* @return bool
|
||||
*/
|
||||
public function uninstall()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件启用方法
|
||||
* @return bool
|
||||
*/
|
||||
public function enabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件禁用方法
|
||||
* @return bool
|
||||
*/
|
||||
public function disabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试HOOK API
|
||||
* 自定义钩子
|
||||
* @return bool
|
||||
*/
|
||||
public function testhook($params)
|
||||
{
|
||||
var_dump('testhook');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user