[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/classes/update/ -> deployer.php (summary)

Defines classes used for updates.

Copyright: 2011 David Mudrak <[email protected]>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 574 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

deployer:: (19 methods):
  __construct()
  __clone()
  instance()
  reset_caches()
  enabled()
  initialize()
  initialized()
  deployment_impediments()
  plugin_external_source()
  make_confirm_widget()
  make_execution_widget()
  submitted_data()
  __call()
  prepare_authorization()
  generate_passfile()
  generate_password()
  component_writable()
  update_downloadable()
  directory_writable()


Class: deployer  - X-Ref

Implements a communication bridge to the mdeploy.php utility

__construct()   X-Ref
Direct instantiation not allowed, use the factory method {@link self::instance()}


__clone()   X-Ref
Sorry, this is singleton


instance()   X-Ref
Factory method for this class

return: \core\update\deployer the singleton instance

reset_caches($phpunitreset = false)   X-Ref
Reset caches used by this script

param: bool $phpunitreset is this called as a part of PHPUnit reset?

enabled()   X-Ref
Is automatic deployment enabled?

return: bool

initialize(moodle_url $callerurl, moodle_url $returnurl)   X-Ref
Sets some base properties of the class to make it usable.

param: moodle_url $callerurl the base URL of a script that will handle the class'es form data
param: moodle_url $returnurl the final URL to return to when the deployment is finished

initialized()   X-Ref
Has the deployer been initialized?

Initialized deployer means that the following properties were set:
callerurl, returnurl

return: bool

deployment_impediments(info $info)   X-Ref
Returns a list of reasons why the deployment can not happen

If the returned array is empty, the deployment seems to be possible. The returned
structure is an associative array with keys representing individual impediments.
Possible keys are: missingdownloadurl, missingdownloadmd5, notwritable.

param: \core\update\info $info
return: array

plugin_external_source(info $info)   X-Ref
Check to see if the current version of the plugin seems to be a checkout of an external repository.

param: \core\update\info $info
return: false|string

make_confirm_widget(info $info)   X-Ref
Prepares a renderable widget to confirm installation of an available update.

param: \core\update\info $info component version to deploy
return: \renderable

make_execution_widget(info $info, moodle_url $returnurl = null)   X-Ref
Prepares a renderable widget to execute installation of an available update.

param: \core\update\info $info component version to deploy
param: moodle_url $returnurl URL to return after the installation execution
return: \renderable

submitted_data()   X-Ref
Returns array of data objects passed to this tool.

return: array

__call($name, array $arguments = array()   X-Ref
Handles magic getters and setters for protected properties.

param: string $name method name, e.g. set_returnurl()
param: array $arguments arguments to be passed to the array

prepare_authorization()   X-Ref
Generates a random token and stores it in a file in moodledata directory.

return: array of the (string)filename and (string)password in this order

generate_passfile()   X-Ref
Returns a random string to be used as a filename of the password storage.

return: string

generate_password()   X-Ref
Returns a random string to be used as the authorization token

return: string

component_writable($component)   X-Ref
Checks if the given component's directory is writable

For the purpose of the deployment, the web server process has to have
write access to all files in the component's directory (recursively) and for the
directory itself.

param: string $component normalized component name
return: boolean

update_downloadable($downloadurl)   X-Ref
Checks if the mdeploy.php will be able to fetch the ZIP from the given URL

This is mainly supposed to check if the transmission over HTTPS would
work. That is, if the CA certificates are present at the server.

param: string $downloadurl the URL of the ZIP package to download
return: bool

directory_writable($path)   X-Ref
Checks if the directory and all its contents (recursively) is writable

param: string $path full path to a directory
return: boolean



Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1