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

Public Member Functions

 is_push ()
 get_base_file_url ()
 verify_file_request_params ($params)
 send_file ()

Protected Attributes

 $file

Detailed Description

class to inherit from for 'pull' type plugins eg those that write a file and wait for the remote system to request it from portfolio/file.php if you're using this you must do $this->set('file', $file) so that it can be served.

Definition at line 785 of file plugin.php.


Member Function Documentation

the base part of the download file url to pull files from your plugin might need to add &foo=bar on the end {

See also:
verify_file_request_params}
Returns:
string the url

Definition at line 800 of file plugin.php.

is_push ( )

is this plugin push or pill. if push, cleanup will be called directly after send_package if not, cleanup will be called after portfolio/file.php is requested

Returns:
boolean

Reimplemented from portfolio_plugin_base.

Definition at line 789 of file plugin.php.

send_file ( )

called from portfolio/file.php this function sends the stored file out to the browser the default is to just use send_stored_file, but other implementations might do something different for example, send back the file base64 encoded and encrypted mahara does this but in the response to an xmlrpc request rather than through file.php

Definition at line 822 of file plugin.php.

Here is the call graph for this function:

verify_file_request_params ( params) [abstract]

before sending the file when the pull is requested, verify the request parameters these might include a token of some sort of whatever

Parameters:
arrayrequest parameters (POST wins over GET)

Reimplemented in portfolio_plugin_mahara, and portfolio_plugin_download.


Field Documentation

$file [protected]

Definition at line 787 of file plugin.php.


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