Class CMS_patch

Description

Class CMS_patch

This script aimed to manage patch files

Located in /automne/classes/files/patch.php (line 27)

CMS_grandFather
   |
   --CMS_patch
Method Summary
 void __construct ()
 string, applyChmod ($right, $right, $files, $files)
 boolean canCorrectErrors ($errorsInfos, $errorsInfos)
 string, changeGroup ($group, $group, $files, $files)
 string, changeOwner ($owner, $owner, $files, $files)
 string checkInstall ($array, &$array, $errorsInfo &$errorsInfo)
 true checkPatch (array $array)
 void doInstall (array &$array, [array $excludeCommand = array()], [ $stopOnErrors = true])
 string, executeCommand ($script, $command, $error, &$error)
 string, executePhpScript ($script, $script)
 boolean, executeSqlScript ($script, $script, [simulation $simulation = false])
 void getReturn ()
 boolean _checkRightFormat (string $right)
 void _report ( $text, [ $isErrror = false])
 void _verbose ( $text)
Methods
Constructor __construct (line 41)

Constructor

void __construct ()
applyChmod (line 712)

Apply chmod on file(s)

  • return: the files who can't apply the chmod, else nothing if all is done.
  • access: public
string, applyChmod ($right, $right, $files, $files)
  • $right, $right: string : rights to apply to file(s) format : r read (and execute if it's a folder) w read and write (and execute if it's a folder) x read+write+execute XXX unix chmod octal value (ex : 664, 775, etc.)
  • $files, $files: string : the files to apply new rights (relative to CMS_file::FILE_SYSTEM)
automneGeneralScript (line 789)

Launch script PATH_AUTOMNE_CHMOD_SCRIPT_FS

  • return: true on success, false on failure.
  • access: public
boolean automneGeneralScript ()
canCorrectErrors (line 825)

Is this errors can be easilly corrected by patch system ?

  • return: true on success, false on failure.
  • access: public
boolean canCorrectErrors ($errorsInfos, $errorsInfos)
  • $errorsInfos, $errorsInfos: array, the errors returned by checkInstall method
changeGroup (line 769)

Change group on file(s)

  • return: the files who can't apply the chmod, else nothing if all is done.
  • access: public
string, changeGroup ($group, $group, $files, $files)
  • $group, $group: string : new group to apply to file(s)
  • $files, $files: string : the files to apply new rights (relative to CMS_file::FILE_SYSTEM)
changeOwner (line 747)

Change owner on file(s)

  • return: the files who can't apply the chmod, else nothing if all is done.
  • access: public
string, changeOwner ($owner, $owner, $files, $files)
  • $owner, $owner: string : new owner to apply to file(s)
  • $files, $files: string : the files to apply new rights (relative to CMS_file::FILE_SYSTEM)
checkInstall (line 95)

Check install parameters

  • return: errors found in install array
  • access: public
string checkInstall ($array, &$array, $errorsInfo &$errorsInfo)
  • $array, &$array: install command to check, view documentation for format
  • $errorsInfo &$errorsInfo: array, infos on errors found in checked install commands. Returned by reference.
checkPatch (line 53)

Check patch parameters

  • return: on success, false on failure
  • access: public
true checkPatch (array $array)
  • array $array: of parameters to check (usually : file patch), view documentation for format
doInstall (line 350)

Do patch installation

  • access: public
void doInstall (array &$array, [array $excludeCommand = array()], [ $stopOnErrors = true])
  • array &$array: of install command to do, view documentation for format This array MUST be checked before by checkInstall method to ensure it format is as correct as possible
  • array $excludeCommand: of excluded commands
  • $stopOnErrors
executeCommand (line 641)

Execute a command

  • return: the return of the command, false on failure
  • access: public
string, executeCommand ($script, $command, $error, &$error)
  • $script, $command: string : the Command to execute
  • $error, &$error: integer : the error Command return, passed by reference
executePhpScript (line 609)

Execute a PHP script

  • return: the return of the script, false on failure
  • access: public
string, executePhpScript ($script, $script)
  • $script, $script: string : the CMS_file::FILE_SYSTEM PHP script filename
executeSqlScript (line 545)

Execute a SQL script

  • return: true on success, false on failure
  • access: public
boolean, executeSqlScript ($script, $script, [simulation $simulation = false])
  • $script, $script: string : the CMS_file::FILE_SYSTEM SQL script filename This script can be SQL export provided by phpMyadmin or mysqldump, etc.
  • simulation $simulation: : boolean, if true, only do a read of the script and if it contain sql data, return true.
getReturn (line 814)
void getReturn ()
_checkRightFormat (line 679)

Check validity format of a given right

  • return: true on success, false on failure
  • access: private
boolean _checkRightFormat (string $right)
  • string $right: the right to check format : r read (and execute if it's a folder) w read and write (and execute if it's a folder) x read+write+execute XXX unix chmod octal value (ex : 664, 775, etc.)
_report (line 337)
void _report ( $text, [ $isErrror = false])
  • $text
  • $isErrror
_verbose (line 333)
void _verbose ( $text)
  • $text

Inherited Methods

Inherited From CMS_grandFather

 CMS_grandFather::autoload()
 CMS_grandFather::hasError()
 CMS_grandFather::log()
 CMS_grandFather::PHPErrorHandler()
 CMS_grandFather::raiseError()
 CMS_grandFather::setDebug()
 CMS_grandFather::setLog()
 CMS_grandFather::_raiseError()
 CMS_grandFather::__call()
Class Constants

Documentation generated on Wed, 15 Feb 2012 15:36:18 +0100 by phpDocumentor 1.4.3