PHP Class Symfony\Component\Form\FormError

Author: Bernhard Schussek ([email protected])
Inheritance: implements Serializable
Mostra file Open project: pmjones/php-framework-benchmarks Class Usage Examples

Protected Properties

Property Type Description
$messageParameters array The parameters that should be substituted in the message template
$messagePluralization integer | null The value for error message pluralization
$messageTemplate string The template for the error message

Public Methods

Method Description
__construct ( string $messageTemplate, array $messageParameters = [], integer | null $messagePluralization = null ) Constructor
getMessage ( ) : string Returns the error message
getMessageParameters ( ) : array Returns the parameters to be inserted in the message template
getMessagePluralization ( ) : integer | null Returns the value for error message pluralization.
getMessageTemplate ( ) : string Returns the error message template

Method Details

__construct() public method

Any array key in $messageParameters will be used as a placeholder in $messageTemplate.
See also: Symfony\Component\Translation\Translator
public __construct ( string $messageTemplate, array $messageParameters = [], integer | null $messagePluralization = null )
$messageTemplate string The template for the error message
$messageParameters array The parameters that should be substituted in the message template.
$messagePluralization integer | null The value for error message pluralization

getMessage() public method

Returns the error message
public getMessage ( ) : string
return string

getMessageParameters() public method

Returns the parameters to be inserted in the message template
public getMessageParameters ( ) : array
return array

getMessagePluralization() public method

Returns the value for error message pluralization.
public getMessagePluralization ( ) : integer | null
return integer | null

getMessageTemplate() public method

Returns the error message template
public getMessageTemplate ( ) : string
return string

Property Details

$messageParameters protected_oe property

The parameters that should be substituted in the message template
protected array $messageParameters
return array

$messagePluralization protected_oe property

The value for error message pluralization
protected int|null $messagePluralization
return integer | null

$messageTemplate protected_oe property

The template for the error message
protected string $messageTemplate
return string