* Get the source cache of a shared file or folder
*
* @param string $target Shared target file path
- * @return \OC\Files\Cache\Cache
+ * @return \OC\Files\Cache\Cache|false
*/
private function getSourceCache($target) {
if ($target === false || $target === $this->storage->getMountPoint()) {
* get the stored metadata of a file or folder
*
* @param string|int $file
- * @return array
+ * @return array|false
*/
public function get($file) {
if (is_string($file)) {
* get the metadata of all files stored in $folder
*
* @param string $folderId
- * @return array
+ * @return array|false
*/
public function getFolderContentsById($folderId) {
$cache = $this->getSourceCache('');
* @param string $file
* @param array $data
*
- * @return int file id
+ * @return int|false file id
*/
public function put($file, array $data) {
$file = ($file === false) ? '' : $file;
*
* @param string $token
* @param string $path
- * @return TemplateResponse
+ * @return TemplateResponse|RedirectResponse
*/
public function showShare($token, $path = '') {
\OC_User::setIncognitoMode(true);
/**
* Get the source file path for a shared file
* @param string $target Shared target file path
- * @return string source file path or false if not found
+ * @return string|false source file path or false if not found
*/
public function getSourcePath($target) {
$source = $this->getFile($target);
/**
* returns the LDAP DN for the given internal ownCloud name of the user
* @param string $name the ownCloud name in question
- * @return string with the LDAP DN on success, otherwise false
+ * @return string|false with the LDAP DN on success, otherwise false
*/
public function username2dn($name) {
$fdn = $this->userMapper->getDNbyName($name);
* returns the internal ownCloud name for the given LDAP DN of the group, false on DN outside of search DN or failure
* @param string $fdn the dn of the group object
* @param string $ldapName optional, the display name of the object
- * @return string with the name to use in ownCloud, false on DN outside of search DN
+ * @return string|false with the name to use in ownCloud, false on DN outside of search DN
*/
public function dn2groupname($fdn, $ldapName = null) {
//To avoid bypassing the base DN settings under certain circumstances
* returns the internal ownCloud name for the given LDAP DN of the user, false on DN outside of search DN or failure
* @param string $dn the dn of the user object
* @param string $ldapName optional, the display name of the object
- * @return string with with the name to use in ownCloud
+ * @return string|false with with the name to use in ownCloud
*/
public function dn2username($fdn, $ldapName = null) {
//To avoid bypassing the base DN settings under certain circumstances
* @param string $dn the dn of the user object
* @param string $ldapName optional, the display name of the object
* @param bool $isUser optional, whether it is a user object (otherwise group assumed)
- * @return string with with the name to use in ownCloud
+ * @return string|false with with the name to use in ownCloud
*/
public function dn2ocname($fdn, $ldapName = null, $isUser = true) {
if($isUser) {
/**
* creates a unique name for internal ownCloud use for users. Don't call it directly.
* @param string $name the display name of the object
- * @return string with with the name to use in ownCloud or false if unsuccessful
+ * @return string|false with with the name to use in ownCloud or false if unsuccessful
*
* Instead of using this method directly, call
* createAltInternalOwnCloudName($name, true)
/**
* creates a unique name for internal ownCloud use for groups. Don't call it directly.
* @param string $name the display name of the object
- * @return string with with the name to use in ownCloud or false if unsuccessful.
+ * @return string|false with with the name to use in ownCloud or false if unsuccessful.
*
* Instead of using this method directly, call
* createAltInternalOwnCloudName($name, false)
* creates a unique name for internal ownCloud use.
* @param string $name the display name of the object
* @param boolean $isUser whether name should be created for a user (true) or a group (false)
- * @return string with with the name to use in ownCloud or false if unsuccessful
+ * @return string|false with with the name to use in ownCloud or false if unsuccessful
*/
private function createAltInternalOwnCloudName($name, $isUser) {
$originalTTL = $this->connection->ldapCacheTTL;
return false;
}
$groupsTotal = ($groupsTotal !== false) ? $groupsTotal : 0;
- $output = self::$l->n('%s group found', '%s groups found', $groupsTotal, $groupsTotal);
+ $output = self::$l->n('%s group found', '%s groups found', $groupsTotal, array($groupsTotal));
$this->result->addChange('ldap_group_count', $output);
return $this->result;
}
$usersTotal = $this->countEntries($filter, 'users');
$usersTotal = ($usersTotal !== false) ? $usersTotal : 0;
- $output = self::$l->n('%s user found', '%s users found', $usersTotal, $usersTotal);
+ $output = self::$l->n('%s user found', '%s users found', $usersTotal, array($usersTotal));
$this->result->addChange('ldap_user_count', $output);
return $this->result;
}
/**
* detects the available LDAP attributes
- * @return array The instance's WizardResult instance
+ * @return array|false The instance's WizardResult instance
* @throws \Exception
*/
private function getUserAttributes() {
/**
* detects the available LDAP groups
- * @return WizardResult the instance's WizardResult instance
+ * @return WizardResult|false the instance's WizardResult instance
*/
public function determineGroupsForGroups() {
return $this->determineGroups('ldap_groupfilter_groups',
/**
* detects the available LDAP groups
- * @return WizardResult the instance's WizardResult instance
+ * @return WizardResult|false the instance's WizardResult instance
*/
public function determineGroupsForUsers() {
return $this->determineGroups('ldap_userfilter_groups',
* @param string $dbKey
* @param string $confKey
* @param bool $testMemberOf
- * @return WizardResult the instance's WizardResult instance
+ * @return WizardResult|false the instance's WizardResult instance
* @throws \Exception
*/
private function determineGroups($dbKey, $confKey, $testMemberOf = true) {
/**
* Detects the available object classes
- * @return WizardResult the instance's WizardResult instance
+ * @return WizardResult|false the instance's WizardResult instance
* @throws \Exception
*/
public function determineGroupObjectClasses() {
}
/**
- * @return WizardResult
+ * @return WizardResult|false
* @throws \Exception
*/
public function getGroupFilter() {
}
/**
- * @return WizardResult
+ * @return WizardResult|false
* @throws \Exception
*/
public function getUserListFilter() {
* Configuration class
* @param bool $po whether the objectClass with most result entries
* shall be pre-selected via the result
- * @return array, list of found items.
+ * @return array|false list of found items.
* @throws \Exception
*/
private function determineFeature($objectclasses, $attr, $dbkey, $confkey, $po = false) {
/**
* get display name of the user
* @param string $uid user ID of the user
- * @return string display name
+ * @return string|false display name
*/
public function getDisplayName($uid) {
if(!$this->userExists($uid)) {
/**
* Get the path where to install apps
*
- * @return string
+ * @return string|false
*/
public static function getInstallPath() {
if (OC_Config::getValue('appstoreenabled', true) == false) {
/**
* get a list of all apps on apps.owncloud.com
- * @return array, multi-dimensional array of apps.
+ * @return array|false multi-dimensional array of apps.
* Keys: id, name, type, typename, personid, license, detailpage, preview, changed, description
*/
public static function getAppstoreApps($filter = 'approved', $category = null) {
/**
* @param string $appId
- * @return \OC\Files\View
+ * @return \OC\Files\View|false
*/
public static function getStorage($appId) {
if (OC_App::isEnabled($appId)) { //sanity check
*
* @param string|false $app
* @param string|false $key
- * @return array
+ * @return array|false
*/
public function getValues($app, $key) {
if (($app !== false) == ($key !== false)) {
* @param string $slotName name of slot, in another word, this is the
* name of the method that will be called when registered
* signal is emitted.
- * @return bool, always true
+ * @return bool always true
*/
public function connectHook($signalClass, $signalName, $slotClass, $slotName) {
return \OCP\Util::connectHook($signalClass, $signalName, $slotClass, $slotName);
* @param string $signalClass class name of emitter
* @param string $signalName name of signal
* @param array $params default: array() array with additional data
- * @return bool, true if slots exists or false if not
+ * @return bool true if slots exists or false if not
*/
public function emitHook($signalClass, $signalName, $params = array()) {
return \OCP\Util::emitHook($signalClass, $signalName, $params);
/**
* @param string $file
*
- * @return int, Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
+ * @return int Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
*/
public function getStatus($file) {
// normalize file
* instead does a global search in the cache table
*
* @param int $id
- * @return array, first element holding the storage id, second the path
+ * @return array first element holding the storage id, second the path
*/
static public function getById($id) {
$sql = 'SELECT `storage`, `path` FROM `*PREFIX*filecache` WHERE `fileid` = ?';
/**
* @param string $file
*
- * @return int, Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
+ * @return int Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
*/
public function getStatus($file) {
return $this->cache->getStatus($this->getSourcePath($file));
/**
* @param string $file
*
- * @return int, Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
+ * @return int Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
*/
public function getStatus($file) {
return $this->cache->getStatus($file);
* instead does a global search in the cache table
*
* @param int $id
- * @return array, first element holding the storage id, second the path
+ * @return array first element holding the storage id, second the path
*/
static public function getById($id) {
return parent::getById($id);
* get the owner of a path
*
* @param string $path The path to get the owner
- * @return string uid or false
+ * @return string|false uid or false
*/
public function getOwner($path) {
return \OC_User::getUser();
* get the ETag for a file or folder
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function getETag($path) {
$ETagFunction = \OC_Connector_Sabre_Node::$ETagFunction;
* get the free space in the storage
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function free_space($path) {
return \OCP\Files\FileInfo::SPACE_UNKNOWN;
* For now the returned array can hold the parameter url - in future more attributes might follow.
*
* @param string $path
- * @return array
+ * @return array|false
*/
public function getDirectDownload($path) {
return [];
* @param string $signalclass class name of emitter
* @param string $signalname name of signal
* @param mixed $params default: array() array with additional data
- * @return bool, true if slots exists or false if not
+ * @return bool true if slots exists or false if not
*
* Emits a signal. To get data from the slot use references!
*
* Throws an exception if the tag could not be found.
*
* @param string $tag Tag id or name.
- * @return array An array of object ids or false on error.
+ * @return array|false An array of object ids or false on error.
*/
public function getIdsForTag($tag) {
$result = null;
* Add a new tag.
*
* @param string $name A string with a name of the tag
- * @return false|string the id of the added tag or false on error.
+ * @return false|int the id of the added tag or false on error.
*/
public function add($name) {
$name = trim($name);
/**
* Get favorites for an object type
*
- * @return array An array of object ids.
+ * @return array|false An array of object ids.
*/
public function getFavorites() {
try {
* see http://php.net/manual/en/function.opendir.php
*
* @param string $path
- * @return resource
+ * @return resource|false
*/
public function opendir($path);
* only the following keys are required in the result: size and mtime
*
* @param string $path
- * @return array
+ * @return array|false
*/
public function stat($path);
* see http://php.net/manual/en/function.filetype.php
*
* @param string $path
- * @return bool
+ * @return string|false
*/
public function filetype($path);
* The result for filesize when called on a folder is required to be 0
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function filesize($path);
* see http://php.net/manual/en/function.filemtime.php
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function filemtime($path);
* see http://php.net/manual/en/function.file_get_contents.php
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function file_get_contents($path);
*
* @param string $path
* @param string $mode
- * @return resource
+ * @return resource|false
*/
public function fopen($path, $mode);
* The mimetype for a folder is required to be "httpd/unix-directory"
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function getMimeType($path);
* @param string $type
* @param string $path
* @param bool $raw
- * @return string
+ * @return string|false
*/
public function hash($type, $path, $raw = false);
* see http://php.net/manual/en/function.free_space.php
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function free_space($path);
* search for occurrences of $query in file names
*
* @param string $query
- * @return array
+ * @return array|false
*/
public function search($query);
* The local version of the file can be temporary and doesn't have to be persistent across requests
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function getLocalFile($path);
* The local version of the folder can be temporary and doesn't have to be persistent across requests
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function getLocalFolder($path);
/**
* get the ETag for a file or folder
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function getETag($path);
* For now the returned array can hold the parameter url - in future more attributes might follow.
*
* @param string $path
- * @return array
+ * @return array|false
*/
public function getDirectDownload($path);
}
*
* @param string|false $key
* @param string|false $app
- * @return array
+ * @return array|false
*/
public function getValues($app, $key);
* Throws an exception if the tag could not be found.
*
* @param string|integer $tag Tag id or name.
- * @return array An array of object ids or false on error.
+ * @return array|false An array of object ids or false on error.
*/
public function getIdsForTag($tag);
* Add a new tag.
*
* @param string $name A string with a name of the tag
- * @return int the id of the added tag or false if it already exists.
+ * @return int|false the id of the added tag or false if it already exists.
*/
public function add($name);
/**
* Get favorites for an object type
*
- * @return array An array of object ids.
+ * @return array|false An array of object ids.
*/
public function getFavorites();
* Converts the shared item sources back into the item in the specified format
* @param array $items Shared items
* @param int $format
- * @return TODO
+ * @return array
*
* The items array is a 3-dimensional array with the item_source as the
* first key and the share id as the second key to an array with the share