class Domain extends MappingModel
A class for holding data about a domain used in the schema.
Methods
__construct(string $type = null, string $sqlType = null, string $size = null, string $scale = null)
Creates a new Domain 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. |
||
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 |
copy(Domain $domain)
Copies 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()
Returns the owning database object (if this domain was setup via XML). |
|
string |
getDescription()
Returns the domain description. |
|
setDescription(string $description)
Sets the domain description. |
||
string |
getName()
Returns the domain description. |
|
setName(string $name)
Sets the domain name. |
||
integer |
getScale()
Returns the scale value. |
|
setScale(integer $scale)
Sets the scale value. |
||
replaceScale(integer $scale)
Replaces the size if the new value is not null. |
||
integer |
getSize()
Returns the size. |
|
setSize(integer $size)
Sets the size. |
||
replaceSize(integer $size)
Replaces the size if the new value is not null. |
||
string |
getType()
Returns the mapping type. |
|
setType(string $mappingType)
Sets the mapping type. |
||
replaceType(string $mappingType)
Replaces the mapping type if the new value is not null. |
||
ColumnDefaultValue |
getDefaultValue()
Returns the default value object. |
|
mixed |
getPhpDefaultValue()
Returns the default value, type-casted for use in PHP OM. |
|
setDefaultValue(ColumnDefaultValue $value)
Sets the default value. |
||
replaceDefaultValue(ColumnDefaultValue $value = null)
Replaces the default value if the new value is not null. |
||
string |
getSqlType()
Returns the SQL type. |
|
setSqlType(string $sqlType)
Sets the SQL type. |
||
replaceSqlType(string $sqlType)
Replaces the SQL type if the new value is not null. |
||
string |
getSizeDefinition()
Returns the size and scale in brackets for use in an sql schema. |
Details
at line 43
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.
in MappingModel at line 38
public
loadMapping(array $attributes)
Loads a mapping definition from an array.
in MappingModel at line 58
public array
getAttributes()
Returns all definition attributes.
All attribute names (keys) are lowercase.
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.
at line 363
public
appendXml(DOMNode $node)
Appends DOM elements to represent this object in XML.
in MappingModel at line 138
public VendorInfo
addVendorInfo(VendorInfo|array $vendor)
Adds a new VendorInfo instance to this current model object.
in MappingModel at line 158
public VendorInfo
getVendorInfoForType(string $type)
Returns a VendorInfo object by its type.
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
in MappingModel at line 198
public string
toString()
String representation of the current object.
in MappingModel at line 213
public string
__toString()
String representation of the current object.
at line 67
public
copy(Domain $domain)
Copies the values from current object into passed-in Domain.
at line 104
public
setDatabase(Database $database)
Sets the owning database object (if this domain is being setup via XML).
at line 114
public Database
getDatabase()
Returns the owning database object (if this domain was setup via XML).
at line 124
public string
getDescription()
Returns the domain description.
at line 134
public
setDescription(string $description)
Sets the domain description.
at line 144
public string
getName()
Returns the domain description.
at line 154
public
setName(string $name)
Sets the domain name.
at line 164
public integer
getScale()
Returns the scale value.
at line 174
public
setScale(integer $scale)
Sets the scale value.
at line 184
public
replaceScale(integer $scale)
Replaces the size if the new value is not null.
at line 196
public integer
getSize()
Returns the size.
at line 206
public
setSize(integer $size)
Sets the size.
at line 216
public
replaceSize(integer $size)
Replaces the size if the new value is not null.
at line 228
public string
getType()
Returns the mapping type.
at line 238
public
setType(string $mappingType)
Sets the mapping type.
at line 248
public
replaceType(string $mappingType)
Replaces the mapping type if the new value is not null.
at line 260
public ColumnDefaultValue
getDefaultValue()
Returns the default value object.
at line 270
public mixed
getPhpDefaultValue()
Returns the default value, type-casted for use in PHP OM.
at line 296
public
setDefaultValue(ColumnDefaultValue $value)
Sets the default value.
at line 306
public
replaceDefaultValue(ColumnDefaultValue $value = null)
Replaces the default value if the new value is not null.
at line 318
public string
getSqlType()
Returns the SQL type.
at line 328
public
setSqlType(string $sqlType)
Sets the SQL type.
at line 338
public
replaceSqlType(string $sqlType)
Replaces the SQL type if the new value is not null.
at line 350
public string
getSizeDefinition()
Returns the size and scale in brackets for use in an sql schema.