Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403] [Versions 402 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: 335 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