Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

oxModuleFilesValidator Class Reference

Inheritance diagram for oxModuleFilesValidator:
Collaboration diagram for oxModuleFilesValidator:

List of all members.

Public Member Functions

 getPathToModuleDirectory ()
 setPathToModuleDirectory ($sPathToModuleDirectory)
 validate (oxModule $oModule)
 getMissingFiles ()

Protected Member Functions

 _resetMissingFiles ()
 _allModuleExtensionsExists ($oModule)
 _allModuleFilesExists ($oModule)

Private Member Functions

 _allFilesExists ($aModuleExtendedFiles, $blAddExtension=false, $sListName= 'files')
 _addDirectorySeparatorAtTheEndIfNeeded ($sPathToModuleDirectory)

Private Attributes

 $_aMissingFiles = array()
 $_sPathToModuleDirectory = null

Detailed Description

Module files validator class.

Definition at line 9 of file oxmodulefilesvalidator.php.


Member Function Documentation

oxModuleFilesValidator._addDirectorySeparatorAtTheEndIfNeeded ( sPathToModuleDirectory  )  [private]

Check if path has directory separator at the end. Add it if needed.

Parameters:
strig $sPathToModuleDirectory Module directory pat
Returns:
string

Definition at line 152 of file oxmodulefilesvalidator.php.

oxModuleFilesValidator._allFilesExists ( aModuleExtendedFiles,
blAddExtension = false,
sListName = 'files' 
) [private]

Return true if all requested file exists.

Parameters:
array $aModuleExtendedFiles of files which must exist.
bool $blAddExtension if add .php extension to checked files.
string $sListName if add .php extension to checked files.
Returns:
bool

Definition at line 126 of file oxmodulefilesvalidator.php.

oxModuleFilesValidator._allModuleExtensionsExists ( oModule  )  [protected]

Return true if all module files which extends shop class exists.

Parameters:
oxModule $oModule object to validate metadata.
Returns:
bool

Definition at line 93 of file oxmodulefilesvalidator.php.

oxModuleFilesValidator._allModuleFilesExists ( oModule  )  [protected]

Return true if all module independent PHP files exist.

Parameters:
oxModule $oModule object to validate metadata.
Returns:
mixed

Definition at line 108 of file oxmodulefilesvalidator.php.

oxModuleFilesValidator._resetMissingFiles (  )  [protected]

Resets missing files array.

Definition at line 81 of file oxmodulefilesvalidator.php.

oxModuleFilesValidator.getMissingFiles (  ) 

Get missing files which result to invalid module.

Returns:
array

Definition at line 73 of file oxmodulefilesvalidator.php.

oxModuleFilesValidator.getPathToModuleDirectory (  ) 

Gets path to module directory.

Returns:
string

Definition at line 31 of file oxmodulefilesvalidator.php.

oxModuleFilesValidator.setPathToModuleDirectory ( sPathToModuleDirectory  ) 

Sets path to module directory.

Parameters:
string $sPathToModuleDirectory

Definition at line 45 of file oxmodulefilesvalidator.php.

oxModuleFilesValidator.validate ( oxModule oModule  ) 

Validates module files. Return true if module files exists. Return false if at least one module file does not exist.

Parameters:
oxModule $oModule object to validate metadata.
Returns:
bool

Implements oxIModuleValidator.

Definition at line 59 of file oxmodulefilesvalidator.php.


Member Data Documentation

oxModuleFilesValidator.$_aMissingFiles = array() [private]

Definition at line 17 of file oxmodulefilesvalidator.php.

oxModuleFilesValidator.$_sPathToModuleDirectory = null [private]

Definition at line 24 of file oxmodulefilesvalidator.php.


The documentation for this class was generated from the following file: