class Column extends XMLElement
A Class for holding data about a column used in an Application.
Constants
DEFAULT_TYPE |
|
DEFAULT_VISIBILITY |
|
Properties
static | $valid_visibilities |
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($name = null)
Creates a new column and set the name |
||
static |
makeList($columns, PropelPlatformInterface $platform)
Return a comma delimited string listing the specified columns. |
|
getDomain()
Gets domain for this column, creating a new empty domain object if none is set. |
||
setDomain(Domain $domain)
Sets domain for this column |
||
getFullyQualifiedName()
Returns table.column |
||
getName()
Get the name of the column |
||
setName($newName)
Set the name of the column |
||
isNamePlural()
Determines whether a column name is plural |
||
getSingularName()
Gets the singular name for the column |
||
getDescription()
Get the description for the Table |
||
setDescription($newDescription)
Set the description for the Table |
||
getPhpName()
Get name to use in PHP sources. |
||
setPhpName($phpName = null)
Set name to use in PHP sources. |
||
getStudlyPhpName()
Get studly version of PHP name. |
||
getAccessorVisibility()
Get the visibility of the accessors of this column / attribute |
||
setAccessorVisibility($newVisibility)
Set the visibility of the accessor methods for this column / attribute |
||
getMutatorVisibility()
Get the visibility of the mutator of this column / attribute |
||
setMutatorVisibility($newVisibility)
Set the visibility of the mutator methods for this column / attribute |
||
getConstantName()
Get the column constant name (e.g. |
||
getConstantColumnName() | ||
getPeerName()
Get the Peer constant name that will identify this column. |
||
setPeerName($name)
Set the Peer constant name that will identify this column. |
||
getPhpType()
Get type to use in PHP sources. |
||
getPosition()
Get the location of this column within the table (one-based). |
||
setPosition($v)
Get the location of this column within the table (one-based). |
||
setTable(Table $parent)
Set the parent Table of the column |
||
getTable()
Get the parent Table of the column |
||
getTableName()
Returns the Name of the table the column is in |
||
addInheritance($inhdata)
Adds a new inheritance definition to the inheritance list and set the parent column of the inheritance to the current column |
||
getChildren()
Get the inheritance definitions. |
||
isInheritance()
Determine if this column is a normal property or specifies a the classes that are represented in the table containing this column. |
||
isEnumeratedClasses()
Determine if possible classes have been enumerated in the xml file. |
||
isNotNull()
Return the isNotNull property of the column |
||
setNotNull($status)
Set the isNotNull property of the column |
||
getNotNullString()
Return NOT NULL String for this column |
||
setPrimaryString($v)
Set whether the column is the primary string, i.e. |
||
isPrimaryString()
Return true if the column is the primary string, i.e. |
||
setPrimaryKey($v)
Set whether the column is a primary key or not. |
||
isPrimaryKey()
Return true if the column is a primary key |
||
setNodeKey($nk)
Set if the column is the node key of a tree |
||
isNodeKey()
Return true if the column is a node key of a tree |
||
setNodeKeySep($sep)
Set if the column is the node key of a tree |
||
getNodeKeySep()
Return true if the column is a node key of a tree |
||
setNestedSetLeftKey($nslk)
Set if the column is the nested set left key of a tree |
||
isNestedSetLeftKey()
Return true if the column is a nested set key of a tree |
||
setNestedSetRightKey($nsrk)
Set if the column is the nested set right key of a tree |
||
isNestedSetRightKey()
Return true if the column is a nested set right key of a tree |
||
setTreeScopeKey($tsk)
Set if the column is the scope key of a tree |
||
isTreeScopeKey()
Return true if the column is a scope key of a tree |
||
setUnique($u)
Set true if the column is UNIQUE |
||
isUnique()
Get the UNIQUE property. |
||
requiresTransactionInPostgres()
Return true if the column requires a transaction in Postgres |
||
isForeignKey()
Utility method to determine if this column is a foreign key. |
||
hasMultipleFK()
Whether this column is a part of more than one foreign key. |
||
getForeignKeys()
Get the foreign key objects for this column (if it is a foreign key or part of a foreign key) |
||
addReferrer(ForeignKey $fk)
Adds the foreign key from another table that refers to this column. |
||
getReferrers()
Get list of references to this column. |
||
hasReferrers() | ||
hasReferrer(ForeignKey $fk) | ||
clearReferrers() | ||
clearInheritanceList() | ||
setDomainForType($propelType)
Sets the domain up for specified Propel type. |
||
setType($propelType)
Sets the propel colunm type. |
||
getType()
Returns the Propel column type as a string. |
||
getPDOType()
Returns the column PDO type integer for this column's Propel type. |
||
getPropelType()
Returns the column type as given in the schema as an object |
||
isDefaultSqlType(PropelPlatformInterface $platform = null) | ||
isLobType()
Utility method to know whether column needs Blob/Lob handling. |
||
isTextType()
Utility method to see if the column is text type. |
||
isNumericType()
Utility method to see if the column is numeric type. |
||
isBooleanType()
Utility method to see if the column is boolean type. |
||
isTemporalType()
Utility method to know whether column is a temporal column. |
||
isEnumType()
Utility method to know whether column is an ENUM column. |
||
setValueSet(array $valueSet)
Sets the list of possible values for an ENUM column |
||
array |
getValueSet()
Returns the list of possible values for an ENUM column |
|
getSize()
Returns the size of the column |
||
setSize($newSize)
Set the size of the column |
||
getScale()
Returns the scale of the column |
||
setScale($newScale)
Set the scale of the column |
||
printSize()
Return the size in brackets for use in an sql schema if the type is String. |
||
getDefaultSetting()
Return a string that will give this column a default value in SQL |
||
getDefaultValueString()
Return a string that will give this column a default value in PHP |
||
setDefaultValue(ColumnDefaultValue|scalar $def)
Set a string that will give this column a default value. |
||
getDefaultValue()
Get the default value object for this column. |
||
getPhpDefaultValue()
Get the default value suitable for use in PHP. |
||
isAutoIncrement()
Return auto increment/sequence string for the target database. |
||
isLazyLoad()
Return true if the columns has to be lazy loaded, i.e. |
||
getAutoIncrementString()
Gets the auto-increment string. |
||
setAutoIncrement($value)
Set the auto increment value. |
||
setTypeFromString($typeName, $size)
Set the column type from a string property (normally a string from an sql input file) |
||
getPhpNative()
Return a string representation of the native PHP type which corresponds to the propel type of this column. |
||
isPhpPrimitiveType()
Returns true if the column's PHP native type is an boolean, int, long, float, double, string. |
||
isPhpPrimitiveNumericType()
Return true if column's PHP native type is an boolean, int, long, float, double. |
||
isPhpObjectType()
Returns true if the column's PHP native type is a class name. |
||
getPlatform()
Get the platform/adapter impl. |
||
hasPlatform() | ||
getValidator() | ||
__clone() | ||
static | generatePhpName($name, $phpNamingMethod = PhpNameGenerator::CONV_METHOD_CLEAN, $namePrefix = null) |
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 947
public
appendXml(DOMNode $node)
in XMLElement at line 106
public VendorInfo
addVendorInfo(mixed $data)
Sets an associated VendorInfo object.
in XMLElement at line 123
public VendorInfo
getVendorInfoForType($type)
Gets the any associated VendorInfo object.
in XMLElement at line 142
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 165
public
toString()
String representation of the current object.
This is an xml representation with the XML declaration removed.
in XMLElement at line 178
public
__toString()
Magic string method
at line 105
public
__construct($name = null)
Creates a new column and set the name
at line 117
static public
makeList($columns, PropelPlatformInterface $platform)
Return a comma delimited string listing the specified columns.
at line 252
public
getDomain()
Gets domain for this column, creating a new empty domain object if none is set.
at line 264
public
setDomain(Domain $domain)
Sets domain for this column
at line 272
public
getFullyQualifiedName()
Returns table.column
at line 280
public
getName()
Get the name of the column
at line 288
public
setName($newName)
Set the name of the column
at line 296
public
isNamePlural()
Determines whether a column name is plural
at line 304
public
getSingularName()
Gets the singular name for the column
at line 312
public
getDescription()
Get the description for the Table
at line 322
public
setDescription($newDescription)
Set the description for the Table
at line 333
public
getPhpName()
Get name to use in PHP sources.
It will set & return
a self-generated phpName from it's name if it's
not already set.
at line 349
public
setPhpName($phpName = null)
Set name to use in PHP sources.
It will generate a phpName from it's name if no
$phpName is passed.
at line 365
public
getStudlyPhpName()
Get studly version of PHP name.
The studly name is the PHP name with the first character lowercase.
at line 379
public
getAccessorVisibility()
Get the visibility of the accessors of this column / attribute
at line 391
public
setAccessorVisibility($newVisibility)
Set the visibility of the accessor methods for this column / attribute
at line 404
public
getMutatorVisibility()
Get the visibility of the mutator of this column / attribute
at line 416
public
setMutatorVisibility($newVisibility)
Set the visibility of the mutator methods for this column / attribute
at line 430
public
getConstantName()
Get the column constant name (e.g.
PeerName::COLUMN_NAME).
at line 437
public
getConstantColumnName()
at line 451
public
getPeerName()
Get the Peer constant name that will identify this column.
at line 459
public
setPeerName($name)
Set the Peer constant name that will identify this column.
at line 471
public
getPhpType()
Get type to use in PHP sources.
If no type has been specified, then uses results of getPhpNative().
at line 483
public
getPosition()
Get the location of this column within the table (one-based).
at line 492
public
setPosition($v)
Get the location of this column within the table (one-based).
at line 500
public
setTable(Table $parent)
Set the parent Table of the column
at line 508
public
getTable()
Get the parent Table of the column
at line 516
public
getTableName()
Returns the Name of the table the column is in
at line 526
public
addInheritance($inhdata)
Adds a new inheritance definition to the inheritance list and set the parent column of the inheritance to the current column
at line 547
public
getChildren()
Get the inheritance definitions.
at line 556
public
isInheritance()
Determine if this column is a normal property or specifies a the classes that are represented in the table containing this column.
at line 564
public
isEnumeratedClasses()
Determine if possible classes have been enumerated in the xml file.
at line 572
public
isNotNull()
Return the isNotNull property of the column
at line 580
public
setNotNull($status)
Set the isNotNull property of the column
at line 590
public
getNotNullString()
Return NOT NULL String for this column
at line 600
public
setPrimaryString($v)
Set whether the column is the primary string, i.e.
whether its value is the default string representation of the table
at line 609
public
isPrimaryString()
Return true if the column is the primary string, i.e.
if its value is the default string representation of the table
at line 618
public
setPrimaryKey($v)
Set whether the column is a primary key or not.
at line 626
public
isPrimaryKey()
Return true if the column is a primary key
at line 634
public
setNodeKey($nk)
Set if the column is the node key of a tree
at line 642
public
isNodeKey()
Return true if the column is a node key of a tree
at line 650
public
setNodeKeySep($sep)
Set if the column is the node key of a tree
at line 658
public
getNodeKeySep()
Return true if the column is a node key of a tree
at line 666
public
setNestedSetLeftKey($nslk)
Set if the column is the nested set left key of a tree
at line 674
public
isNestedSetLeftKey()
Return true if the column is a nested set key of a tree
at line 682
public
setNestedSetRightKey($nsrk)
Set if the column is the nested set right key of a tree
at line 690
public
isNestedSetRightKey()
Return true if the column is a nested set right key of a tree
at line 698
public
setTreeScopeKey($tsk)
Set if the column is the scope key of a tree
at line 707
public
isTreeScopeKey()
Return true if the column is a scope key of a tree
at line 716
public
setUnique($u)
Set true if the column is UNIQUE
at line 725
public
isUnique()
Get the UNIQUE property.
at line 734
public
requiresTransactionInPostgres()
Return true if the column requires a transaction in Postgres
at line 743
public
isForeignKey()
Utility method to determine if this column is a foreign key.
at line 752
public
hasMultipleFK()
Whether this column is a part of more than one foreign key.
at line 761
public
getForeignKeys()
Get the foreign key objects for this column (if it is a foreign key or part of a foreign key)
at line 769
public
addReferrer(ForeignKey $fk)
Adds the foreign key from another table that refers to this column.
at line 780
public
getReferrers()
Get list of references to this column.
at line 788
public
hasReferrers()
at line 793
public
hasReferrer(ForeignKey $fk)
at line 798
public
clearReferrers()
at line 803
public
clearInheritanceList()
at line 816
public
setDomainForType($propelType)
Sets the domain up for specified Propel type.
Calling this method will implicitly overwrite any previously set type,
size, scale (or other domain attributes).
at line 826
public
setType($propelType)
Sets the propel colunm type.
at line 839
public
getType()
Returns the Propel column type as a string.
at line 848
public
getPDOType()
Returns the column PDO type integer for this column's Propel type.
at line 856
public
getPropelType()
Returns the column type as given in the schema as an object
at line 861
public
isDefaultSqlType(PropelPlatformInterface $platform = null)
at line 877
public
isLobType()
Utility method to know whether column needs Blob/Lob handling.
at line 885
public
isTextType()
Utility method to see if the column is text type.
at line 894
public
isNumericType()
Utility method to see if the column is numeric type.
at line 903
public
isBooleanType()
Utility method to see if the column is boolean type.
at line 912
public
isTemporalType()
Utility method to know whether column is a temporal column.
at line 921
public
isEnumType()
Utility method to know whether column is an ENUM column.
at line 930
public
setValueSet(array $valueSet)
Sets the list of possible values for an ENUM column
at line 939
public array
getValueSet()
Returns the list of possible values for an ENUM column
at line 1024
public
getSize()
Returns the size of the column
at line 1033
public
setSize($newSize)
Set the size of the column
at line 1042
public
getScale()
Returns the scale of the column
at line 1051
public
setScale($newScale)
Set the scale of the column
at line 1060
public
printSize()
Return the size in brackets for use in an sql schema if the type is String.
Otherwise return an empty string
at line 1070
public
getDefaultSetting()
Return a string that will give this column a default value in SQL
at line 1079
public
getDefaultValueString()
Return a string that will give this column a default value in PHP
at line 1103
public
setDefaultValue(ColumnDefaultValue|scalar $def)
Set a string that will give this column a default value.
at line 1118
public
getDefaultValue()
Get the default value object for this column.
at line 1128
public
getPhpDefaultValue()
Get the default value suitable for use in PHP.
at line 1137
public
isAutoIncrement()
Return auto increment/sequence string for the target database.
We need to
pass in the props for the target database!
at line 1146
public
isLazyLoad()
Return true if the columns has to be lazy loaded, i.e.
if a runtime query
on the table doesn't hydrate this column, but a getter does.
at line 1155
public
getAutoIncrementString()
Gets the auto-increment string.
at line 1174
public
setAutoIncrement($value)
Set the auto increment value.
Use isAutoIncrement() to find out if it is set or not.
at line 1185
public
setTypeFromString($typeName, $size)
Set the column type from a string property (normally a string from an sql input file)
at line 1217
public
getPhpNative()
Return a string representation of the native PHP type which corresponds to the propel type of this column.
Use in the generation of Base objects.
at line 1227
public
isPhpPrimitiveType()
Returns true if the column's PHP native type is an boolean, int, long, float, double, string.
at line 1237
public
isPhpPrimitiveNumericType()
Return true if column's PHP native type is an boolean, int, long, float, double.
at line 1247
public
isPhpObjectType()
Returns true if the column's PHP native type is a class name.
at line 1257
public
getPlatform()
Get the platform/adapter impl.