class Domain extends XMLElement
A class for holding data about a domain used in the schema.
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, string $sqlType = null, string $size = null, string $scale = null)
Creates a new Domain object. |
||
copy(Domain $domain)
Copy the values from current object into passed-in Domain. |
||
setDatabase(Database $database)
Sets the owning database object (if this domain is being setup via XML). |
||
Database |
getDatabase()
Gets the owning database object (if this domain was setup via XML). |
|
string |
getDescription()
|
|
setDescription(string $description)
|
||
string |
getName()
|
|
setName(string $name)
|
||
string |
getScale()
|
|
setScale(string $scale)
|
||
replaceScale(string $value)
Replaces the size if the new value is not null. |
||
int |
getSize()
|
|
setSize(int $size)
|
||
replaceSize(int $value)
Replaces the size if the new value is not null. |
||
string |
getType()
|
|
setType(string $propelType)
|
||
replaceType(string $value)
Replaces the type if the new value is not null. |
||
ColumnDefaultValue |
getDefaultValue()
Gets the default value object. |
|
mixed |
getPhpDefaultValue()
Gets the default value, type-casted for use in PHP OM. |
|
setDefaultValue(ColumnDefaultValue $value)
|
||
replaceDefaultValue(ColumnDefaultValue $value = null)
Replaces the default value if the new value is not null. |
||
string |
getSqlType()
|
|
setSqlType(string $sqlType)
|
||
replaceSqlType(string $sqlType)
Replaces the SQL type if the new value is not null. |
||
string |
printSize()
Return the size and scale in brackets for use in an sql schema. |
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.
in XMLElement at line 60
public array
getAttributes()
Returns the assoc array of attributes.
All attribute names (keys) are lowercase.
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.
at line 365
public
appendXml(DOMNode $node)
in XMLElement at line 134
public VendorInfo
addVendorInfo(mixed $data)
Sets an associated VendorInfo object.
in XMLElement at line 154
public VendorInfo
getVendorInfoForType($type)
Gets the any associated VendorInfo object.
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'
in XMLElement at line 199
public
toString()
String representation of the current object.
This is an xml representation with the XML declaration removed.
in XMLElement at line 214
public
__toString()
Magic string method
at line 73
public
__construct(string $type = null, string $sqlType = null, string $size = null, string $scale = null)
Creates a new Domain object.
If this domain needs a name, it must be specified manually.
at line 86
public
copy(Domain $domain)
Copy the values from current object into passed-in Domain.
at line 128
public
setDatabase(Database $database)
Sets the owning database object (if this domain is being setup via XML).
at line 138
public Database
getDatabase()
Gets the owning database object (if this domain was setup via XML).
at line 146
public string
getDescription()
at line 154
public
setDescription(string $description)
at line 162
public string
getName()
at line 170
public
setName(string $name)
at line 178
public string
getScale()
at line 186
public
setScale(string $scale)
at line 196
public
replaceScale(string $value)
Replaces the size if the new value is not null.
at line 206
public int
getSize()
at line 214
public
setSize(int $size)
at line 224
public
replaceSize(int $value)
Replaces the size if the new value is not null.
at line 234
public string
getType()
at line 242
public
setType(string $propelType)
at line 252
public
replaceType(string $value)
Replaces the type if the new value is not null.
at line 264
public ColumnDefaultValue
getDefaultValue()
Gets the default value object.
at line 276
public mixed
getPhpDefaultValue()
Gets the default value, type-casted for use in PHP OM.
at line 300
public
setDefaultValue(ColumnDefaultValue $value)
at line 310
public
replaceDefaultValue(ColumnDefaultValue $value = null)
Replaces the default value if the new value is not null.
at line 320
public string
getSqlType()
at line 328
public
setSqlType(string $sqlType)
at line 338
public
replaceSqlType(string $sqlType)
Replaces the SQL type if the new value is not null.
at line 351
public string
printSize()
Return the size and scale in brackets for use in an sql schema.