Class

VendorInfo

class VendorInfo extends XMLElement

Object to hold vendor-specific info.

Methods

loadFromXML(array $attributes)

This is the entry point method for loading data from XML.

from XMLElement
array getAttributes()

Returns the assoc array of attributes.

from XMLElement
mixed getAttribute(string $name, mixed $defaultValue = null)

Gets a particular attribute by [case-insensitive] name.

from XMLElement
appendXml(DOMNode $node)

VendorInfo addVendorInfo(mixed $data)

Sets an associated VendorInfo object.

from XMLElement
VendorInfo getVendorInfoForType($type)

Gets the any associated VendorInfo object.

from XMLElement
string getConfiguredBehavior(string $bname)

Find the best class name for a given behavior Looks in build.properties for path like propel.behavior.[bname].class If not found, tries to autoload [Bname]Behavior If no success, returns 'Behavior'

from XMLElement
toString()

String representation of the current object.

from XMLElement
__toString()

Magic string method

from XMLElement
__construct(string $type = null)

Creates a new VendorInfo instance.

setType(string $v)

Set RDBMS type for this vendor-specific info.

string getType()

Get RDBMS type for this vendor-specific info.

addParameter(array $attrib)

Adds a new vendor parameter to this object.

setParameter(string $name, mixed $value)

Sets parameter value.

mixed getParameter(string $name)

Gets parameter value.

bool hasParameter(string $name)

Whether parameter exists.

setParameters(array $params = array())

Sets assoc array of parameters for vendor specific info.

array getParameters()

Gets assoc array of parameters for venfor specific info.

boolean isEmpty()

Tests whether this vendor info is empty

VendorInfo getMergedVendorInfo(VendorInfo $merge)

Gets a new merged VendorInfo object.

Details

in XMLElement at line 48
public loadFromXML(array $attributes)

This is the entry point method for loading data from XML.

It calls a setupObject() method that must be implemented by the child class.

Parameters

array $attributes The attributes for the XML tag.

in XMLElement at line 60
public array getAttributes()

Returns the assoc array of attributes.

All attribute names (keys) are lowercase.

Return Value

array

in XMLElement at line 74
public mixed getAttribute(string $name, mixed $defaultValue = null)

Gets a particular attribute by [case-insensitive] name.

If attribute is not set then the $defaultValue is returned.

Parameters

string $name The [case-insensitive] name of the attribute to lookup.
mixed $defaultValue The default value to use in case the attribute is not set.

Return Value

mixed The value of the attribute or $defaultValue if not set.

at line 177
public appendXml(DOMNode $node)

Parameters

DOMNode $node

See also

XMLElement::appendXml(DOMNode)

in XMLElement at line 134
public VendorInfo addVendorInfo(mixed $data)

Sets an associated VendorInfo object.

Parameters

mixed $data VendorInfo object or XML attrib data (array)

Return Value

VendorInfo

in XMLElement at line 154
public VendorInfo getVendorInfoForType($type)

Gets the any associated VendorInfo object.

Parameters

$type

Return Value

VendorInfo

in XMLElement at line 176
public string getConfiguredBehavior(string $bname)

Find the best class name for a given behavior Looks in build.properties for path like propel.behavior.[bname].class If not found, tries to autoload [Bname]Behavior If no success, returns 'Behavior'

Parameters

string $bname behavior name, e.g. 'timestampable'

Return Value

string behavior class name, e.g. 'TimestampableBehavior'

Exceptions

InvalidArgumentException

in XMLElement at line 199
public toString()

String representation of the current object.

This is an xml representation with the XML declaration removed.

See also

appendXml()

in XMLElement at line 214
public __toString()

Magic string method

See also

toString()

at line 43
public __construct(string $type = null)

Creates a new VendorInfo instance.

Parameters

string $type RDBMS type (optional)

at line 63
public setType(string $v)

Set RDBMS type for this vendor-specific info.

Parameters

string $v

at line 73
public string getType()

Get RDBMS type for this vendor-specific info.

Return Value

string

at line 83
public addParameter(array $attrib)

Adds a new vendor parameter to this object.

Parameters

array $attrib Attributes from XML.

at line 95
public setParameter(string $name, mixed $value)

Sets parameter value.

Parameters

string $name
mixed $value The value for the parameter.

at line 107
public mixed getParameter(string $name)

Gets parameter value.

Parameters

string $name

Return Value

mixed Paramter value.

at line 123
public bool hasParameter(string $name)

Whether parameter exists.

Parameters

string $name

Return Value

bool

at line 133
public setParameters(array $params = array())

Sets assoc array of parameters for vendor specific info.

Parameters

array $params Parameter data.

at line 143
public array getParameters()

Gets assoc array of parameters for venfor specific info.

Return Value

array

at line 153
public boolean isEmpty()

Tests whether this vendor info is empty

Return Value

boolean

at line 165
public VendorInfo getMergedVendorInfo(VendorInfo $merge)

Gets a new merged VendorInfo object.

Parameters

VendorInfo $merge

Return Value

VendorInfo new object with merged parameters