Created
September 16, 2013 20:30
Revisions
-
bartv2 created this gist
Sep 16, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ <?php /** * Copyright (c) 2013 Bart Visscher <[email protected]> * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ namespace OCP\App; /** * Provide a common interface to all Application functions */ interface Info { /** * @brief Get the name of the app. * * @return string */ public function getName(); /** * @brief Get the last version of the app. Either from appinfo/version or from appinfo/info.xml * * @return string for example '1.2.45' */ public function getVersion(); /** * @brief Get the directory for the given app. * If the app is defined in multiple directories, the first one is taken. (false if not found) * * @return string */ public function getDirectory(); /** * @brief Get the web path of the app. * If the app is defined in multiple directories, the first one is taken. (false if not found) * * @return string */ public function getWebPath(); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ <?php /** * Copyright (c) 2013 Bart Visscher <[email protected]> * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ namespace OCP\App; /** * Provide a common interface to all Application functions */ interface Manager { /** * @brief checks whether or not an app is enabled * @param $app string appid * @returns bool true when an app is enabled. */ public function isEnabled( $app ); /** * @brief load all enabled apps */ public function loadAll(); /** * @brief Get information about the app * @param $app string appid * * @return \OCP\App\Info */ public function getInfo( $app ); }