Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 402] [Versions 310 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

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

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

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

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

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

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

param: stdClass $filepath
return: string

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