[ PHPXref.com ] [ Generated: Sun Jul 20 18:45:57 2008 ] [ Moodle 1.5.3 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/lib/ -> environmentlib.php (summary)

(no description)

File Size: 722 lines (24 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

environment_results:: (14 methods):
  environment_results()
  setStatus()
  setErrorCode()
  setLevel()
  setCurrentVersion()
  setNeededVersion()
  setInfo()
  getStatus()
  getErrorCode()
  getLevel()
  getCurrentVersion()
  getNeededVersion()
  getInfo()
  getPart()

Defines 14 functions

  check_moodle_environment()
  print_moodle_environment()
  normalize_version()
  load_environment_xml()
  get_list_of_environment_versions()
  get_latest_version_available()
  get_environment_for_version()
  environment_check()
  environment_check_php_extensions()
  environment_check_php()
  environment_check_database()

Class: environment_results  - X-Ref

This class is used to return the results of the environment
main functions (environment_check_xxxx)

environment_results($part)   X-Ref
Constructor of the environment_result class. Just set default values


setStatus($status)   X-Ref
Set the status

param: boolean the status (true/false)

setErrorCode($error_code)   X-Ref
Set the error_code

param: integer the error code (see constants above)

setLevel($level)   X-Ref
Set the level

param: string the level (required, optional)

setCurrentVersion($current_version)   X-Ref
Set the current version

param: string the current version

setNeededVersion($needed_version)   X-Ref
Set the needed version

param: string the needed version

setInfo($info)   X-Ref
Set the auxiliary info

param: string the auxiliary info

getStatus()   X-Ref
Get the status

return: boolean result

getErrorCode()   X-Ref
Get the error code

return: integer error code

getLevel()   X-Ref
Get the level

return: string level

getCurrentVersion()   X-Ref
Get the current version

return: string current version

getNeededVersion()   X-Ref
Get the needed version

return: string needed version

getInfo()   X-Ref
Get the aux info

return: string info

getPart()   X-Ref
Get the part this result belongs to

return: string part

Functions
Functions that are not part of a class:

check_moodle_environment($version, &$environment_results, $print_table=true)   X-Ref
This function will perform the whole check, returning
true or false as final result. Also, he full array of
environment_result will be returned in the parameter list.
The function looks for the best version to compare and
everything. This is the only function that should be called
ever from the rest of Moodle.

param: string version version to check.
param: array results array of results checked.
return: boolean true/false, depending of results

print_moodle_environment($result, $environment_results)   X-Ref
This function will print one beautiful table with all the environmental
configuration and how it suits Moodle needs.

param: boolean final result of the check (true/false)
param: array environment_results array of results gathered

normalize_version($version)   X-Ref
This function will normalize any version to just a serie of numbers
separated by dots. Everything else will be removed.

param: string $version the original version
return: string the normalized version

load_environment_xml()   X-Ref
This function will load the environment.xml file and xmlize it

return: mixed the xmlized structure or false on error

get_list_of_environment_versions($contents)   X-Ref
This function will return the list of Moodle versions available

return: mixed array of versions. False on error.

get_latest_version_available($version)   X-Ref
This function will return the most recent version in the environment.xml
file previous or equal to the version requested

param: string version top version from which we start to look backwards
return: string more recent version or false if not found

get_environment_for_version($version)   X-Ref
This function will return the xmlized data belonging to one Moodle version

return: mixed the xmlized structure or false on error

environment_check($version)   X-Ref
This function will check for everything (DB, PHP and PHP extensions for now)
returning an array of environment_result objects.

param: string $version xml version we are going to use to test this server
return: array array of results encapsulated in one environment_result object

environment_check_php_extensions($version)   X-Ref
This function will check if php extensions requirements are satisfied

param: string $version xml version we are going to use to test this server
return: array array of results encapsulated in one environment_result object

environment_check_php($version)   X-Ref
This function will check if php requirements are satisfied

param: string $version xml version we are going to use to test this server
return: object results encapsulated in one environment_result object

environment_check_database($version)   X-Ref
This function will check if database requirements are satisfied

param: string $version xml version we are going to use to test this server
return: object results encapsulated in one environment_result object



[ Powered by PHPXref - Served by Debian GNU/Linux ]