?? controller.php
字號:
<?php/** * Piwik - Open source web analytics * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id: Controller.php 661 2008-10-29 17:19:06Z matt $ * * @package Piwik_API */require_once "API/Request.php";/** * * @package Piwik_API */class Piwik_API_Controller extends Piwik_Controller{ function index() { $request = new Piwik_API_Request('token_auth='.Piwik_Common::getRequestVar('token_auth', 'anonymous', 'string')); echo $request->process(); } public function listAllMethods() { $this->init(); echo Piwik_API_Proxy::getInstance()->getAllInterfaceString( $outputExampleUrls = true, $prefixUrls = Piwik_Common::getRequestVar('prefixUrl', '') ); } public function listAllAPI() { $view = new Piwik_View("API/templates/listAllAPI.tpl"); $this->setGeneralVariablesView($view); $view->countLoadedAPI = $this->init(); $view->list_api_methods_with_links = Piwik_API_Proxy::getInstance()->getAllInterfaceString(); echo $view->render(); } protected function init() { $plugins = Piwik_PluginsManager::getInstance()->getLoadedPluginsName(); $loaded = 0; foreach( $plugins as $plugin ) { $plugin = Piwik::unprefixClass($plugin); try { Piwik_API_Proxy::getInstance()->registerClass($plugin); $loaded++; } catch(Exception $e){ } } return $loaded; } }
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -