Moodle  2.2.1
http://www.collinsharper.com
repository_googledocs Class Reference
Inheritance diagram for repository_googledocs:
Collaboration diagram for repository_googledocs:

Public Member Functions

 __construct ($repositoryid, $context=SYSCONTEXTID, $options=array())
 check_login ()
 print_login ($ajax=true)
 get_listing ($path='', $page= '')
 search ($query)
 logout ()
 get_file ($url, $file)
 supported_filetypes ()
 supported_returntypes ()

Detailed Description

Definition at line 30 of file lib.php.


Constructor & Destructor Documentation

__construct ( repositoryid,
context = SYSCONTEXTID,
options = array() 
)

Definition at line 33 of file lib.php.

Here is the call graph for this function:


Member Function Documentation

To check whether the user is logged in.

Returns:
boolean

Reimplemented from repository.

Definition at line 46 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get_file ( url,
filename 
)

Download a file, this function can be overridden by subclass.

object $CFG

Parameters:
string$urlthe url of file
string$filenamesave location
Returns:
string the location of the file
See also:
curl package

Reimplemented from repository.

Definition at line 111 of file lib.php.

Here is the call graph for this function:

get_listing ( path = '',
page = '' 
)

Given a path, and perhaps a search, get a list of files.

See details on http://docs.moodle.org/dev/Repository_plugins

Parameters:
string$path,thisparameter can a folder name, or a identification of folder
string$page,thepage number of file list
Returns:
array the list of files, including meta infomation, containing the following keys manage, url to manage url client_id login, login form repo_id, active repository id login_btn_action, the login button action login_btn_label, the login button label total, number of results perpage, items per page page pages, total pages issearchresult, is it a search result? list, file list path, current path and parent path

Reimplemented from repository.

Definition at line 78 of file lib.php.

logout ( )

Logout from repository instance By default, this function will return a login form

Returns:
string

Reimplemented from repository.

Definition at line 96 of file lib.php.

Here is the call graph for this function:

print_login ( ajax = true)

Definition at line 65 of file lib.php.

Here is the call graph for this function:

search ( search_text)

Search files in repository When doing global search, $search_text will be used as keyword.

Returns:
mixed, see get_listing()

Reimplemented from repository.

Definition at line 87 of file lib.php.

what kind of files will be in this repository?

Returns:
array return '*' means this repository support any files, otherwise return mimetypes of files, it can be an array

Reimplemented from repository.

Definition at line 122 of file lib.php.

does it return a file url or a item_id

Returns:
string

Reimplemented from repository.

Definition at line 125 of file lib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations