Created
September 16, 2013 20:30
-
-
Save bartv2/6586173 to your computer and use it in GitHub Desktop.
owncloud public app interface
This file contains 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 characters
<?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 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 characters
<?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 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment