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 47
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 58
public array
getAttributes()
Returns the assoc array of attributes.
All attribute names (keys) are lowercase.
in XMLElement at line 70
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 358
public
appendXml(DOMNode $node)
in XMLElement at line 127
public VendorInfo
addVendorInfo(mixed $data)
Sets an associated VendorInfo object.
in XMLElement at line 146
public VendorInfo
getVendorInfoForType($type)
Gets the any associated VendorInfo object.
in XMLElement at line 166
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 189
public
toString()
String representation of the current object.
This is an xml representation with the XML declaration removed.
in XMLElement at line 203
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 85
public
copy(Domain $domain)
Copy the values from current object into passed-in Domain.
at line 125
public
setDatabase(Database $database)
Sets the owning database object (if this domain is being setup via XML).
at line 134
public Database
getDatabase()
Gets the owning database object (if this domain was setup via XML).
at line 142
public string
getDescription()
at line 150
public
setDescription(string $description)
at line 158
public string
getName()
at line 166
public
setName(string $name)
at line 174
public string
getScale()
at line 182
public
setScale(string $scale)
at line 192
public
replaceScale(string $value)
Replaces the size if the new value is not null.
at line 202
public int
getSize()
at line 210
public
setSize(int $size)
at line 220
public
replaceSize(int $value)
Replaces the size if the new value is not null.
at line 230
public string
getType()
at line 238
public
setType(string $propelType)
at line 248
public
replaceType(string $value)
Replaces the type if the new value is not null.
at line 259
public ColumnDefaultValue
getDefaultValue()
Gets the default value object.
at line 270
public mixed
getPhpDefaultValue()
Gets the default value, type-casted for use in PHP OM.
at line 294
public
setDefaultValue(ColumnDefaultValue $value)
at line 304
public
replaceDefaultValue(ColumnDefaultValue $value = null)
Replaces the default value if the new value is not null.
at line 314
public string
getSqlType()
at line 322
public
setSqlType(string $sqlType)
at line 331
public
replaceSqlType(string $sqlType)
Replaces the SQL type if the new value is not null.
at line 344
public string
printSize()
Return the size and scale in brackets for use in an sql schema.