A generic bag containing properties and their values.

 Methods

Create a new instance of a property bag.

__construct(array|null $properties) 

Parameters

$properties

arraynull

The initial property values to use.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralInvalidArgumentException If the passed properties aren't null or an array.

{@inheritdoc}

__get($name) 

Parameters

$name

{@inheritdoc}

__isset($name) 

Parameters

$name

{@inheritdoc}

__set($name, $value) 

Parameters

$name

$value

{@inheritdoc}

__unset($name) 

Parameters

$name

{@inheritdoc}

count() 

Exports the {@link PropertyValueBag} to an array.

getArrayCopy() : array

Returns

array

{@inheritdoc}

getInvalidPropertyErrors() 

{@inheritdoc}

getInvalidPropertyNames() 

{@inheritdoc}

getIterator() 

{@inheritdoc}

getPropertyValue($property) 

Parameters

$property

{@inheritdoc}

getPropertyValueErrors($property) 

Parameters

$property

{@inheritdoc}

hasInvalidPropertyValues() 

{@inheritdoc}

hasNoInvalidPropertyValues() 

{@inheritdoc}

hasPropertyValue($property) 

Parameters

$property

{@inheritdoc}

isPropertyValueInvalid($property) 

Parameters

$property

{@inheritdoc}

isPropertyValueValid($property) 

Parameters

$property

{@inheritdoc}

markPropertyValueAsInvalid($property, $error, $append) 

Parameters

$property

$error

$append

{@inheritdoc}

offsetExists($offset) 

Parameters

$offset

{@inheritdoc}

offsetGet($offset) 

Parameters

$offset

{@inheritdoc}

offsetSet($offset, $value) 

Parameters

$offset

$value

{@inheritdoc}

offsetUnset($offset) 

Parameters

$offset

{@inheritdoc}

removePropertyValue($property) 

Parameters

$property

{@inheritdoc}

resetPropertyValueErrors($property) 

Parameters

$property

{@inheritdoc}

setPropertyValue($property, $value) 

Parameters

$property

$value

Check if a property exists, otherwise through an exception.

requirePropertyValue(string $property) : void
internal

Parameters

$property

string

The name of the property to require.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralInvalidArgumentException If the property is not registered.

 Properties

 

All properties that are marked as invalid and their error messages.

$errors : array
 

All properties and its values in this bag.

$properties : array