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 ModelInterface

Interface ModelInterface.

This interface describes a model used in data providers.

DcGeneral\Data\ModelInterface implements IteratorAggregate

Direct known implementers

DcGeneral\Data\AbstractModel, DcGeneral\Data\VersionModelInterface

Indirect known implementers

DcGeneral\Data\DefaultModel
Namespace: DcGeneral\Data
Package: DcGeneral\Data
Located at Data/ModelInterface.php
Methods summary
public
# __clone( )

Copy this model, without the id.

Copy this model, without the id.

public mixed
# getId( )

Get the id for this model.

Get the id for this model.

Returns

mixed
The Id for this model.
public mixed
# getProperty( string $strPropertyName )

Fetch the property with the given name from the model.

Fetch the property with the given name from the model.

This method returns null if an unknown property is retrieved.

Parameters

$strPropertyName
string
$strPropertyName The property name to be retrieved.

Returns

mixed
The value of the given property.
public array
# getPropertiesAsArray( )

Fetch all properties from the model as an name => value array.

Fetch all properties from the model as an name => value array.

Returns

array
public mixed
# getMeta( string $strMetaName )

Fetch meta information from model.

Fetch meta information from model.

Parameters

$strMetaName
string
$strMetaName The meta information to retrieve.

Returns

mixed
The set meta information or null if undefined.
public
# setId( mixed $mixId )

Set the id for this object.

Set the id for this object.

NOTE: when the Id has been set once to a non null value, it can NOT be changed anymore.

Normally this should only be called from inside of the implementing provider.

Parameters

$mixId
mixed
$mixId Could be a integer, string or anything else - depends on the provider implementation.
public
# setProperty( string $strPropertyName, mixed $varValue )

Update the property value in the model.

Update the property value in the model.

Parameters

$strPropertyName
string
$strPropertyName The property name to be set.
$varValue
mixed
$varValue The value to be set.
public
# setPropertiesAsArray( array $arrProperties )

Update all properties in the model.

Update all properties in the model.

Parameters

$arrProperties
array
$arrProperties The property values as name => value pairs.
public
# setMeta( string $strMetaName, mixed $varValue )

Update meta information in the model.

Update meta information in the model.

Parameters

$strMetaName
string
$strMetaName The meta information name.
$varValue
mixed
$varValue The meta information value to store.
public boolean
# hasProperties( )

Check if this model have any properties.

Check if this model have any properties.

Returns

boolean
true if any property has been stored, false otherwise.
public string
# getProviderName( )

Return the data provider name.

Return the data provider name.

Returns

string
the name of the corresponding data provider.
public DcGeneral\Data\ModelInterface
# readFromPropertyValueBag( DcGeneral\Data\PropertyValueBagInterface $valueBag )

Read all values from a value bag.

Read all values from a value bag.

If the value is not present in the value bag, it will get skipped.

If the value for a property in the bag is invalid, an exception will get thrown.

Parameters

$valueBag
DcGeneral\Data\PropertyValueBagInterface
$valueBag The value bag where to read from.

Returns

DcGeneral\Data\ModelInterface

Throws

DcGeneral\Exception\DcGeneralInvalidArgumentException
When a property in the value bag has been marked as invalid.
public DcGeneral\Data\ModelInterface
# writeToPropertyValueBag( DcGeneral\Data\PropertyValueBagInterface $valueBag )

Write values to a value bag.

Write values to a value bag.

Parameters

$valueBag
DcGeneral\Data\PropertyValueBagInterface
$valueBag The value bag where to write to.

Returns

DcGeneral\Data\ModelInterface
Methods inherited from IteratorAggregate
getIterator()
contao-community-alliance/dc-general API documentation generated by ApiGen 2.8.0