[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/repository/local/ -> lib.php (summary)

This plugin is used to access local files

Copyright: 2010 Dongsheng Cai {@link http://dongsheng.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 263 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

repository_local:: (8 methods):
  get_listing()
  supported_returntypes()
  has_moodle_files()
  get_non_empty_children()
  can_skip()
  get_node()
  get_node_path()
  contains_private_data()


Class: repository_local  - X-Ref

repository_local class is used to browse moodle files

get_listing($encodedpath = '', $page = '')   X-Ref
Get file listing

param: string $encodedpath
param: string $page no paging is used in repository_local
return: mixed

supported_returntypes()   X-Ref
Tells how the file can be picked from this repository

return: int

has_moodle_files()   X-Ref
Does this repository used to browse moodle files?

return: boolean

get_non_empty_children(file_info $fileinfo, $extensions)   X-Ref
Returns all children elements that have one of the specified extensions

This function may skip subfolders and recursively add their children
{@link repository_local::can_skip()}

param: file_info $fileinfo
param: string|array $extensions, for example '*' or array('.gif','.jpg')
return: array array of file_info elements

can_skip(file_info $fileinfo, $extensions, $parent = -1)   X-Ref
Whether this folder may be skipped in folder hierarchy

1. Skip the name of a single filearea in a module
2. Skip course categories for non-admins who do not have navshowmycoursecategories setting

param: file_info $fileinfo
param: string|array $extensions, for example '*' or array('.gif','.jpg')
param: file_info|int $parent specify parent here if we know it to avoid creating extra objects
return: bool

get_node(file_info $fileinfo)   X-Ref
Converts file_info object to element of repository return list

param: file_info $fileinfo
return: array

get_node_path(file_info $fileinfo)   X-Ref
Converts file_info object to element of repository return path

param: file_info $fileinfo
return: array

contains_private_data()   X-Ref
Is this repository accessing private data?

return: bool



Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1