Propel 2 API
Class

Propel\Generator\Model\ScopedMappingModel

abstract class ScopedMappingModel extends MappingModel

Data about an element with a name and optional namespace, schema and package attributes.

Methods

__construct()

Constructs a new scoped model object.

loadMapping(array $attributes)

Loads a mapping definition from an array.

from MappingModel
array getAttributes()

Returns all definition attributes.

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

Returns a particular attribute by a case-insensitive name.

from MappingModel
appendXml(DOMNode $node)

Appends DOM elements to represent this object in XML.

from MappingModel
VendorInfo addVendorInfo(VendorInfo|array $vendor)

Adds a new VendorInfo instance to this current model object.

from MappingModel
VendorInfo getVendorInfoForType(string $type)

Returns a VendorInfo object by its type.

from MappingModel
string getConfiguredBehavior(string $behavior)

Returns the best class name for a given behavior.

from MappingModel
string toString()

String representation of the current object.

from MappingModel
string __toString()

String representation of the current object.

from MappingModel
string getNamespace()

Returns the namespace.

setNamespace(string $namespace)

Sets the namespace.

boolean isAbsoluteNamespace(string $namespace)

Returns whether or not the namespace is absolute.

string getPackage()

Returns the package name.

setPackage(string $package)

Sets the package name.

string getSchema()

Returns the schema name.

setSchema(string $schema)

Sets the schema name.

Details

at line 31
public __construct()

Constructs a new scoped model object.

in MappingModel at line 38
public loadMapping(array $attributes)

Loads a mapping definition from an array.

Parameters

array $attributes

in MappingModel at line 58
public array getAttributes()

Returns all definition attributes.

All attribute names (keys) are lowercase.

Return Value

array

in MappingModel 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

in MappingModel at line 130
abstract public appendXml(DOMNode $node)

Appends DOM elements to represent this object in XML.

Parameters

DOMNode $node

in MappingModel 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

in MappingModel at line 158
public VendorInfo getVendorInfoForType(string $type)

Returns a VendorInfo object by its type.

Parameters

string $type

Return Value

VendorInfo

in MappingModel 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

in MappingModel at line 198
public string toString()

String representation of the current object.

Return Value

string

in MappingModel at line 213
public string __toString()

String representation of the current object.

Return Value

string

at line 57
public string getNamespace()

Returns the namespace.

Return Value

string

at line 67
public setNamespace(string $namespace)

Sets the namespace.

Parameters

string $namespace

at line 90
public boolean isAbsoluteNamespace(string $namespace)

Returns whether or not the namespace is absolute.

A namespace is absolute if it starts with a "\".

Parameters

string $namespace

Return Value

boolean

at line 100
public string getPackage()

Returns the package name.

Return Value

string

at line 110
public setPackage(string $package)

Sets the package name.

Parameters

string $package

at line 125
public string getSchema()

Returns the schema name.

Return Value

string

at line 135
public setSchema(string $schema)

Sets the schema name.

Parameters

string $schema