Propel 2 API
Class

Propel\Generator\Model\MappingModel

abstract class MappingModel implements MappingModelInterface

An abstract model class to represent objects that belongs to a schema like databases, tables, columns, indices, unices, foreign keys...

Methods

__construct()

loadMapping(array $attributes)

Loads a mapping definition from an array.

array getAttributes()

Returns all definition attributes.

mixed getAttribute(string $name, mixed $default = null)

Returns a particular attribute by a case-insensitive name.

appendXml(DOMNode $node)

Appends DOM elements to represent this object in XML.

VendorInfo addVendorInfo(VendorInfo|array $vendor)

Adds a new VendorInfo instance to this current model object.

VendorInfo getVendorInfoForType(string $type)

Returns a VendorInfo object by its type.

string getConfiguredBehavior(string $behavior)

Returns the best class name for a given behavior.

string toString()

String representation of the current object.

string __toString()

String representation of the current object.

Details

at line 27
public __construct()

at line 38
public loadMapping(array $attributes)

Loads a mapping definition from an array.

Parameters

array $attributes

at line 58
public array getAttributes()

Returns all definition attributes.

All attribute names (keys) are lowercase.

Return Value

array

at line 73
public mixed getAttribute(string $name, mixed $default = null)

Returns a particular attribute by a case-insensitive name.

If the attribute is not set, then the second default value is
returned instead.

Parameters

string $name
mixed $default

Return Value

mixed

at line 130
abstract public appendXml(DOMNode $node)

Appends DOM elements to represent this object in XML.

Parameters

DOMNode $node

at line 138
public VendorInfo addVendorInfo(VendorInfo|array $vendor)

Adds a new VendorInfo instance to this current model object.

Parameters

VendorInfo|array $vendor

Return Value

VendorInfo

at line 158
public VendorInfo getVendorInfoForType(string $type)

Returns a VendorInfo object by its type.

Parameters

string $type

Return Value

VendorInfo

at line 176
public string getConfiguredBehavior(string $behavior)

Returns the best class name for a given behavior.

If not found, the method tries to autoload \Propel\Generator\Behavior\[Bname]\[Bname]Behavior

Parameters

string $behavior The behavior name (ie: timestampable)

Return Value

string $class The behavior fully qualified class name

Exceptions

BehaviorNotFoundException

at line 198
public string toString()

String representation of the current object.

Return Value

string

at line 213
public string __toString()

String representation of the current object.

Return Value

string