PHP Класс ForkCMS\Bundle\InstallerBundle\Service\RequirementsChecker

Показать файл Открыть проект

Открытые методы

Метод Описание
__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?

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

RequirementsChecker constructor.
public __construct ( $rootDir )
$rootDir

checkApacheRewrites() защищенный Метод

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

checkAvailableFiles() защищенный Метод

protected checkAvailableFiles ( )

checkAvailableFunctions() защищенный Метод

Some functions should be available
protected checkAvailableFunctions ( )

checkFilePermissions() защищенный Метод

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

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.
protected checkPhpExtensions ( )

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.
protected checkPhpIniSettings ( )

checkPhpVersion() защищенный Метод

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

checkRequirement() защищенный Метод

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.
Результат boolean

checkRequirements() защищенный Метод

Check all requirements and returns if everything has passed.
protected checkRequirements ( ) : boolean
Результат boolean

checkSubFolder() защищенный Метод

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

getErrors() публичный Метод

Get all errors created by the requirements test
public getErrors ( ) : array
Результат array

hasErrors() публичный Метод

Are there any issues with status error?
public hasErrors ( ) : boolean
Результат boolean

hasWarnings() публичный Метод

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

passes() публичный Метод

Are all requirements met?
public passes ( ) : boolean
Результат boolean