Methods summary
public
boolean
|
#
hasPropertyValue( string $property )
Check if a property exists in this bag.
Check if a property exists in this bag.
Parameters
- $property
string $property The name of the property to check.
Returns
boolean
|
public
mixed
|
#
getPropertyValue( string $property )
Return the value of a property.
Return the value of a property.
Parameters
- $property
string $property The name of the property to check.
Returns
mixed
Throws
|
public
DcGeneral\Data\PropertyValueBag
|
#
setPropertyValue( string $property, mixed $value )
Set the value of a property.
Set the value of a property.
Parameters
- $property
string $property The name of the property to set.
- $value
mixed $value The value to use.
Returns
|
public
DcGeneral\Data\PropertyValueBag
|
#
removePropertyValue( string $property )
Remove the value of a property.
Remove the value of a property.
Parameters
- $property
string $property The name of the property to remove.
Returns
Throws
|
public
boolean
|
#
hasInvalidPropertyValues( )
Check if this bag contains invalid property values.
Check if this bag contains invalid property values.
Returns
boolean
|
public
boolean
|
#
hasNoInvalidPropertyValues( )
Check if this bag contains no invalid property values.
Check if this bag contains no invalid property values.
Returns
boolean
|
public
boolean
|
#
isPropertyValueInvalid( string $property )
Check if a property value is invalid.
Check if a property value is invalid.
Parameters
- $property
string $property The name of the property to check.
Returns
boolean
|
public
boolean
|
#
isPropertyValueValid( string $property )
Check if a property value is valid.
Check if a property value is valid.
Parameters
- $property
string $property The name of the property to check.
Returns
boolean
|
public
DcGeneral\Data\PropertyValueBag
|
#
markPropertyValueAsInvalid( string $property, string|array|mixed $error, boolean $append = true )
Mark a property as invalid and add an error message to the property.
Mark a property as invalid and add an error message to the property.
Parameters
- $property
string $property The name of the property to mark.
- $error
string|array|mixed $error The error message to attach for this property.
- $append
boolean $append Append this error and keep previous errors (optional).
Returns
|
public
DcGeneral\Data\PropertyValueBag
|
#
resetPropertyValueErrors( string $property )
Reset the state of a property and remove all errors.
Reset the state of a property and remove all errors.
Parameters
- $property
string $property The name of the property to reset.
Returns
|
public
string[]
|
#
getInvalidPropertyNames( )
Get a list of all property names, whose values are invalid.
Get a list of all property names, whose values are invalid.
Returns
string[]
|
public
array
|
#
getPropertyValueErrors( string $property )
Return all errors of an invalid property value.
Return all errors of an invalid property value.
Parameters
- $property
string $property The name of the property to retrieve the errors for.
Returns
array
|
public
array
|
#
getInvalidPropertyErrors( )
Get an associative array of properties and their errors, whose values are
invalid.
Get an associative array of properties and their errors, whose values are
invalid.
Returns
array
|
public
array
|
|