Requirement
in package
Represents a single PHP requirement, e.g. an installed extension.
It can be a mandatory requirement or an optional recommendation. There is a special subclass, named PhpIniRequirement, to check a php.ini configuration.
Tags
Table of Contents
Properties
- $fulfilled : mixed
- $helpHtml : mixed
- $helpText : mixed
- $optional : mixed
- $testMessage : mixed
Methods
- __construct() : mixed
- Constructor that initializes the requirement.
- getHelpHtml() : string
- Returns the help text formatted in HTML.
- getHelpText() : string
- Returns the help text for resolving the problem.
- getTestMessage() : string
- Returns the message for testing the requirement.
- isFulfilled() : bool
- Returns whether the requirement is fulfilled.
- isOptional() : bool
- Returns whether this is only an optional recommendation and not a mandatory requirement.
Properties
$fulfilled
private
mixed
$fulfilled
$helpHtml
private
mixed
$helpHtml
$helpText
private
mixed
$helpText
$optional
private
mixed
$optional
$testMessage
private
mixed
$testMessage
Methods
__construct()
Constructor that initializes the requirement.
public
__construct(bool $fulfilled, string $testMessage, string $helpHtml[, string|null $helpText = null ][, bool $optional = false ]) : mixed
Parameters
- $fulfilled : bool
-
Whether the requirement is fulfilled
- $testMessage : string
-
The message for testing the requirement
- $helpHtml : string
-
The help text formatted in HTML for resolving the problem
- $helpText : string|null = null
-
The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
- $optional : bool = false
-
Whether this is only an optional recommendation not a mandatory requirement
getHelpHtml()
Returns the help text formatted in HTML.
public
getHelpHtml() : string
Return values
string —The HTML help
getHelpText()
Returns the help text for resolving the problem.
public
getHelpText() : string
Return values
string —The help text
getTestMessage()
Returns the message for testing the requirement.
public
getTestMessage() : string
Return values
string —The test message
isFulfilled()
Returns whether the requirement is fulfilled.
public
isFulfilled() : bool
Return values
bool —true if fulfilled, otherwise false
isOptional()
Returns whether this is only an optional recommendation and not a mandatory requirement.
public
isOptional() : bool
Return values
bool —true if optional, false if mandatory