Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 402] [Versions 400 and 403]

This plugin is used to access s3 files

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

Defines 1 class


Class: repository_s3  - X-Ref

This is a repository class used to browse Amazon S3 content.

__construct($repositoryid, $context = SYSCONTEXTID, $options = array()   X-Ref
Constructor

param: int $repositoryid
param: object $context
param: array $options

explode_path($path)   X-Ref
Extracts the Bucket and URI from the path

return: array including bucket and uri
param: string $path path in this format 'bucket/path/to/folder/and/file'

get_listing($path = '', $page = '')   X-Ref
Get S3 file list

return: array The file list and options
param: string $path

get_file($filepath, $file = '')   X-Ref
Download S3 files to moodle

return: array The local stored path
param: string $filepath
param: string $file The file path in moodle

get_file_source_info($filepath)   X-Ref
Return the source information

return: string
param: stdClass $filepath

check_login()   X-Ref
S3 doesn't require login

return: bool

global_search()   X-Ref
S3 doesn't provide search

return: bool

get_type_option_names()   X-Ref
No description

type_config_form($mform, $classname = 'repository')   X-Ref
No description

supported_returntypes()   X-Ref
S3 plugins doesn't support return links of files

return: int

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

return: bool