PHP Class FOF30\Utils\FilesCheck
You need a file called fileslist.php in your component's administrator root directory with the following contents:
$phpFileChecker = array(
'version' => 'revCEE2DAB',
'date' => '2014-10-16',
'directories' => array(
'administrator/components/com_foobar',
....
),
'files' => array(
'administrator/components/com_foobar/access.xml' => array('705', '09aa0351a316bf011ecc8c1145134761', 'b95f00c7b49a07a60570dc674f2497c45c4e7152'),
....
)
);
All directory and file paths are relative to the site's root
The directories array is a list of directories which must exist. The files array has the file paths as keys. The
value is a simple array containing the following elements in this order: file size in bytes, MD5 checksum, SHA1
checksum.
Exibir arquivo
Open project: akeeba/fof
Protected Properties
Property |
Type |
Description |
|
$date |
|
Current component release date |
|
$dirList |
|
List of directories to check that exist |
|
$fileList |
|
List of files to check as filepath => (filesize, md5, sha1) |
|
$option |
|
The name of the component |
|
$version |
|
Current component version |
|
$wrongComponentVersion |
|
Is the reported component version different than the version of the #__extensions table? |
|
$wrongFilesVersion |
|
Is the fileslist.php reporting a version different than the reported component version? |
|
Public Methods
Method |
Description |
|
__construct ( string $option, string $version, string $date ) |
Create and initialise the object |
|
fastCheck ( ) : boolean |
Performs a fast check of file and folders. If even one of the files/folders doesn't exist, or even one file has
the wrong file size it will return false. |
|
isWrongComponentVersion ( ) : boolean |
Is the reported component version different than the version of the #__extensions table? |
|
isWrongFilesVersion ( ) : boolean |
Is the fileslist.php reporting a version different than the reported component version? |
|
slowCheck ( integer $idx ) : array |
Performs a slow, thorough check of all files and folders (including MD5/SHA1 sum checks) |
|
Method Details
__construct()
public method
Create and initialise the object
public __construct ( string $option, string $version, string $date ) |
$option |
string |
Component name, e.g. com_foobar |
$version |
string |
The current component version, as reported by the component |
$date |
string |
The current component release date, as reported by the component |
fastCheck()
public method
Performs a fast check of file and folders. If even one of the files/folders doesn't exist, or even one file has
the wrong file size it will return false.
isWrongComponentVersion()
public method
Is the reported component version different than the version of the #__extensions table?
isWrongFilesVersion()
public method
Is the fileslist.php reporting a version different than the reported component version?
slowCheck()
public method
Performs a slow, thorough check of all files and folders (including MD5/SHA1 sum checks)
Property Details
$date protected_oe property
Current component release date
$dirList protected_oe property
List of directories to check that exist
$fileList protected_oe property
List of files to check as filepath => (filesize, md5, sha1)
$option protected_oe property
The name of the component
$version protected_oe property
Current component version
$wrongComponentVersion protected_oe property
Is the reported component version different than the version of the #__extensions table?
protected $wrongComponentVersion |
$wrongFilesVersion protected_oe property
Is the fileslist.php reporting a version different than the reported component version?
protected $wrongFilesVersion |