Overview

Namespaces

  • DcGeneral
    • Clipboard
    • Contao
      • Callback
      • Compatibility
      • DataDefinition
        • Definition
      • Dca
        • Builder
          • Legacy
        • Definition
        • Palette
        • Populator
      • Event
      • View
        • Contao2BackendView
          • Event
    • Controller
    • Data
    • DataDefinition
      • Builder
      • Definition
        • Properties
        • View
          • Panel
      • ModelRelationship
      • Palette
        • Builder
          • Event
        • Condition
          • Palette
          • Property
    • EnvironmentPopulator
    • Event
    • Exception
    • Factory
      • Event
    • Panel
    • View
      • Event

Classes

  • AbstractModel
  • DCGE
  • DefaultCollection
  • DefaultConfig
  • DefaultDataProvider
  • DefaultLanguageInformation
  • DefaultLanguageInformationCollection
  • DefaultModel
  • MultiLanguageDataProvider
  • NoOpDataProvider
  • PropertyValueBag
  • TableRowsAsRecordsDataProvider

Interfaces

  • CollectionInterface
  • ConfigInterface
  • DataProviderInterface
  • LanguageInformationCollectionInterface
  • LanguageInformationInterface
  • ModelInterface
  • MultiLanguageDataProviderInterface
  • PropertyValueBagInterface
  • VersionModelInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Interface PropertyValueBagInterface

A generic bag containing properties and their values.

DcGeneral\Data\PropertyValueBagInterface implements IteratorAggregate, Countable, ArrayAccess

Direct known implementers

DcGeneral\Data\PropertyValueBag
Namespace: DcGeneral\Data
Located at Data/PropertyValueBagInterface.php
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

DcGeneral\Exception\DcGeneralInvalidArgumentException
If the property is not contained within the bag.
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

DcGeneral\Data\PropertyValueBag
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

DcGeneral\Data\PropertyValueBag

Throws

DcGeneral\Exception\DcGeneralInvalidArgumentException
If the property is not contained within the bag.
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

DcGeneral\Data\PropertyValueBag
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

DcGeneral\Data\PropertyValueBag
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
# getArrayCopy( )

Exports the DcGeneral\Data\PropertyValueBag to an array.

Exports the DcGeneral\Data\PropertyValueBag to an array.

Returns

array
Methods inherited from IteratorAggregate
getIterator()
Methods inherited from Countable
count()
Methods inherited from ArrayAccess
offsetExists(), offsetGet(), offsetSet(), offsetUnset()
contao-community-alliance/dc-general API documentation generated by ApiGen 2.8.0