private function doDev360AuthAction() { // 设置路由,这样用户就能访问到我们的程序了 SystemHelper::addRouteMap('/Thirdpart/Dev360Auth/Login', 'Controller\\Thirdpart\\Dev360Auth\\Login'); SystemHelper::addRouteMap('/Thirdpart/Dev360Auth/Callback', 'Controller\\Thirdpart\\Dev360Auth\\Callback'); return true; }
/** * 为 groupon 系统设置运行环境 * * @return bool */ private function doGrouponAction() { // 获取当前插件的根地址 $currentPluginBasePath = dirname(__FILE__); // groupon 目录加入到 auto load 的路径中,这样系统就能自动做 class 加载 SystemHelper::addAutoloadPath($currentPluginBasePath . '/groupon/Code'); // 设置路由,这样用户就能访问到我们的程序了 SystemHelper::addRouteMap('/Thirdpart/QQAuth/Login', 'Controller\\Thirdpart\\QQAuth\\Login'); SystemHelper::addRouteMap('/Thirdpart/QQAuth/Callback', 'Controller\\Thirdpart\\QQAuth\\Callback'); return true; }
/** * 为系统设置运行环境 * * @return bool */ private function doEtaoFeedAction() { // 获取当前插件的根地址 $currentPluginBasePath = dirname(__FILE__); // yiqifacps code 目录加入到 auto load 的路径中,这样系统就能自动做 class 加载 SystemHelper::addAutoloadPath($currentPluginBasePath . '/shop/Code'); // 设置路由,这样用户就能访问到我们的程序了 SystemHelper::addRouteMap('/Thirdpart/EtaoFeed/Category', 'Controller\\Thirdpart\\EtaoFeed\\Category'); SystemHelper::addRouteMap('/Thirdpart/EtaoFeed/FullIndex', 'Controller\\Thirdpart\\EtaoFeed\\FullIndex'); SystemHelper::addRouteMap('/Thirdpart/EtaoFeed/IncIndex', 'Controller\\Thirdpart\\EtaoFeed\\IncIndex'); SystemHelper::addRouteMap('/Thirdpart/EtaoFeed/Item/@fileName', 'Controller\\Thirdpart\\EtaoFeed\\Item'); return true; }
/** * 为 manage 系统设置运行环境 * * @return bool */ private function doManageAction() { // 获取当前插件的根地址 $currentPluginBasePath = dirname(__FILE__); // manage 目录加入到 auto load 的路径中,这样系统就能自动做 class 加载 SystemHelper::addAutoloadPath($currentPluginBasePath . '/manage/Code'); // 设置路由,这样用户就能访问到我们的程序了 SystemHelper::addRouteMap('/Thirdpart/PageTextReplace/Configure', 'Controller\\Thirdpart\\PageTextReplace\\Configure'); // 增加 smarty 模板搜索路径 global $smarty; $smarty->addTemplateDir($currentPluginBasePath . '/manage/Tpl/'); return true; }
/** * 为系统设置运行环境 * * @return bool */ private function doGouwukeAction() { // 获取当前插件的根地址 $currentPluginBasePath = dirname(__FILE__); // code 目录加入到 auto load 的路径中,这样系统就能自动做 class 加载 SystemHelper::addAutoloadPath($currentPluginBasePath . '/gouwuke/Code'); // 设置路由,这样用户就能访问到我们的程序了 SystemHelper::addRouteMap('/Thirdpart/Gouwuke/Goods', 'Controller\\Thirdpart\\Gouwuke\\Goods'); // 增加 smarty 模板搜索路径 global $smarty; $smarty->addTemplateDir($currentPluginBasePath . '/gouwuke/Tpl/'); return true; }
/** * 为 manage 系统设置运行环境 * * @return bool */ private function doManageAction() { // 获取当前插件的根地址 $currentThemeBasePath = dirname(__FILE__); // 通用的加载 $this->doOtherAction(); // manage 目录加入到 auto load 的路径中,这样系统就能自动做 class 加载 SystemHelper::addAutoloadPath($currentThemeBasePath . '/manage/Code'); // 设置路由,这样用户就能访问到我们的程序了 SystemHelper::addRouteMap('/Theme/Mobile/@action', 'Controller\\Theme\\Mobile\\@action'); // 增加 smarty 模板搜索路径 global $smarty; $smarty->addTemplateDir($currentThemeBasePath . '/manage/Tpl/'); return true; }
/** * 为系统设置运行环境 * * @return bool */ private function doYiqifaCpsAction() { // 获取当前插件的根地址 $currentPluginBasePath = dirname(__FILE__); // yiqifacps code 目录加入到 auto load 的路径中,这样系统就能自动做 class 加载 SystemHelper::addAutoloadPath($currentPluginBasePath . '/yiqifacps/Code'); // 设置 CPS 日志,按照日期分目录存储 $todayDateStr = \Core\Helper\Utility\Time::localTimeStr('Y-m-d'); $todayDateArray = explode('-', $todayDateStr); $fileLogger = new \Core\Log\File('YIQIFACPS/' . $todayDateArray[0] . '/' . $todayDateArray[1] . '/' . implode('-', $todayDateArray) . '.yiqifacps.log'); $fileLogger->sourceAllow[] = 'YIQIFACPS'; // 只接收 YIQIFACPS 的日志 global $logger; $logger->addLogger($fileLogger); // 把 $fileLogger 放到全局日志列表中 // 设置路由,这样用户就能访问到我们的程序了 SystemHelper::addRouteMap('/Thirdpart/YiqifaCps/Redirect', 'Controller\\Thirdpart\\YiqifaCps\\Redirect'); SystemHelper::addRouteMap('/Thirdpart/YiqifaCps/QueryOrder', 'Controller\\Thirdpart\\YiqifaCps\\QueryOrder'); SystemHelper::addRouteMap('/Thirdpart/YiqifaCps/CaibeiLogin', 'Controller\\Thirdpart\\YiqifaCps\\CaibeiLogin'); // 设置一个 OrderRefer 用于记录订单来自于 亿起发CPS require_once $currentPluginBasePath . '/yiqifacps/Code/YiqifaCpsRefer.php'; // 设置订单 refer 用于记录订单来源于 亿起发CPS ReferHelper::addReferItem('YiqifaCpsRefer', new YiqifaCpsRefer()); // 增加 smarty 模板搜索路径 global $smarty; $smarty->addTemplateDir($currentPluginBasePath . '/yiqifacps/Tpl/'); return true; }
/** * 为 manage 系统设置运行环境 * * @return bool */ private function doManageAction() { // 获取当前插件的根地址 $currentThemeBasePath = dirname(__FILE__); // 通用的加载 $this->doOtherAction(); // manage 目录加入到 auto load 的路径中,这样系统就能自动做 class 加载 SystemHelper::addAutoloadPath($currentThemeBasePath . '/manage/Code'); // 设置路由,这样用户就能访问到我们的程序了 SystemHelper::addRouteMap('/Theme/Shop/@action', 'Controller\\Theme\\Shop\\@action'); // 注册 Asset 模块 \Core\Asset\ManagerHelper::registerModule(ShopThemePlugin::pluginGetUniqueId(), $this->pluginGetVersion(), $currentThemeBasePath . '/manage/Asset'); // 增加 smarty 模板搜索路径 global $smarty; $smarty->addTemplateDir($currentThemeBasePath . '/manage/Tpl/'); return true; }