PHP Class ForkCMS\Bundle\InstallerBundle\Service\RequirementsChecker

Afficher le fichier Open project: forkcms/forkcms

Méthodes publiques

Méthode Description
__construct ( $rootDir ) RequirementsChecker constructor.
getErrors ( ) : array Get all errors created by the requirements test
hasErrors ( ) : boolean Are there any issues with status error?
hasWarnings ( ) Are there any issues with status warning?
passes ( ) : boolean Are all requirements met?

Méthodes protégées

Méthode Description
checkApacheRewrites ( ) Ensure that Apache .htaccess file is written and mod_rewrite does its job
checkAvailableFiles ( )
checkAvailableFunctions ( ) Some functions should be available
checkFilePermissions ( ) Make sure the filesystem is prepared for the installation and everything can be read/ written correctly.
checkPhpExtensions ( ) A couple extensions need to be loaded in order to be able to use Fork CMS. Without these extensions, we can't guarantee that everything will work.
checkPhpIniSettings ( ) A couple of php.ini settings should be configured in a specific way to make sure that they don't intervene with Fork CMS.
checkPhpVersion ( ) * At first we're going to check to see if the PHP version meets the minimum requirements for Fork CMS. We require at least PHP 5.5.0, because we don't want to be responsible for security issues in PHP itself.
checkRequirement ( string $name, boolean $requirement, string $severity = self::STATUS_ERROR ) : boolean Check if a specific requirement is satisfied
checkRequirements ( ) : boolean Check all requirements and returns if everything has passed.
checkSubFolder ( ) Fork can't be installed in subfolders, so we should check that.

Private Methods

Méthode Description
isRecursivelyWritable ( string $path ) : boolean Check if a directory and its sub-directories and its subdirectories and .
isWritable ( string $path ) : boolean Check if a directory is writable.

Method Details

__construct() public méthode

RequirementsChecker constructor.
public __construct ( $rootDir )
$rootDir

checkApacheRewrites() protected méthode

Ensure that Apache .htaccess file is written and mod_rewrite does its job
protected checkApacheRewrites ( )

checkAvailableFiles() protected méthode

protected checkAvailableFiles ( )

checkAvailableFunctions() protected méthode

Some functions should be available
protected checkAvailableFunctions ( )

checkFilePermissions() protected méthode

Make sure the filesystem is prepared for the installation and everything can be read/ written correctly.
protected checkFilePermissions ( )

checkPhpExtensions() protected méthode

A couple extensions need to be loaded in order to be able to use Fork CMS. Without these extensions, we can't guarantee that everything will work.
protected checkPhpExtensions ( )

checkPhpIniSettings() protected méthode

A couple of php.ini settings should be configured in a specific way to make sure that they don't intervene with Fork CMS.
protected checkPhpIniSettings ( )

checkPhpVersion() protected méthode

We follow this timeline: http://php.net/supported-versions.php
protected checkPhpVersion ( )

checkRequirement() protected méthode

Check if a specific requirement is satisfied
protected checkRequirement ( string $name, boolean $requirement, string $severity = self::STATUS_ERROR ) : boolean
$name string The "name" of the check.
$requirement boolean The result of the check.
$severity string The severity of the requirement.
Résultat boolean

checkRequirements() protected méthode

Check all requirements and returns if everything has passed.
protected checkRequirements ( ) : boolean
Résultat boolean

checkSubFolder() protected méthode

Fork can't be installed in subfolders, so we should check that.
protected checkSubFolder ( )

getErrors() public méthode

Get all errors created by the requirements test
public getErrors ( ) : array
Résultat array

hasErrors() public méthode

Are there any issues with status error?
public hasErrors ( ) : boolean
Résultat boolean

hasWarnings() public méthode

Are there any issues with status warning?
public hasWarnings ( )

passes() public méthode

Are all requirements met?
public passes ( ) : boolean
Résultat boolean