PHP Class Requirement

Author: ShengHui
Inheritance: extends XBaseModel
Mostrar archivo Open project: pagekit/pagekit Class Usage Examples

Public Methods

Method Description
__construct ( boolean $fulfilled, string $testMessage, string $helpHtml, string | null $helpText = null, boolean $optional = false ) 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 ( ) : boolean Returns whether the requirement is fulfilled.
isOptional ( ) : boolean Returns whether this is only an optional recommendation and not a mandatory requirement.

Method Details

__construct() public method

Constructor that initializes the requirement.
public __construct ( boolean $fulfilled, string $testMessage, string $helpHtml, string | null $helpText = null, boolean $optional = false )
$fulfilled boolean 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 The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
$optional boolean Whether this is only an optional recommendation not a mandatory requirement

getHelpHtml() public method

Returns the help text formatted in HTML.
public getHelpHtml ( ) : string
return string The HTML help

getHelpText() public method

Returns the help text for resolving the problem
public getHelpText ( ) : string
return string The help text

getTestMessage() public method

Returns the message for testing the requirement.
public getTestMessage ( ) : string
return string The test message

isFulfilled() public method

Returns whether the requirement is fulfilled.
public isFulfilled ( ) : boolean
return boolean true if fulfilled, otherwise false

isOptional() public method

Returns whether this is only an optional recommendation and not a mandatory requirement.
public isOptional ( ) : boolean
return boolean true if optional, false if mandatory