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(string $name = null)
Creates a new column and set the name |
||
static string |
makeList($columns, PropelPlatformInterface $platform)
Return a comma delimited string listing the specified columns. |
|
Domain |
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 $newDescription)
Set the description for the Table |
||
string |
getPhpName()
Get name to use in PHP sources. |
|
setPhpName(String $phpName = null)
Set name to use in PHP sources. |
||
string |
getStudlyPhpName()
Get studly version of PHP name. |
|
string |
getAccessorVisibility()
Get the visibility of the accessors of this column / attribute |
|
setAccessorVisibility($newVisibility $newVisibility)
Set the visibility of the accessor methods for this column / attribute |
||
string |
getMutatorVisibility()
Get the visibility of the mutator of this column / attribute |
|
setMutatorVisibility($newVisibility $newVisibility)
Set the visibility of the mutator methods for this column / attribute |
||
string |
getConstantName()
Get the column constant name (e.g. |
|
getConstantColumnName()
|
||
string |
getPeerName()
Get the Peer constant name that will identify this column. |
|
setPeerName($name $name)
Set the Peer constant name that will identify this column. |
||
string |
getPhpType()
Get type to use in PHP sources. |
|
int |
getPosition()
Get the location of this column within the table (one-based). |
|
setPosition(int $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 |
||
Inheritance |
addInheritance(Inheritance|string $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 |
||
"NOT |
getNotNullString()
Return NOT NULL String for this column |
|
setPrimaryString(boolean $v)
Set whether the column is the primary string, i.e. |
||
isPrimaryString()
Return true if the column is the primary string, i.e. |
||
setPrimaryKey(boolean $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 |
||
boolean |
isTreeScopeKey()
Return true if the column is a scope key of a tree |
|
setUnique(boolean $u)
Set true if the column is UNIQUE |
||
boolean |
isUnique()
Get the UNIQUE property. |
|
boolean |
requiresTransactionInPostgres()
Return true if the column requires a transaction in Postgres |
|
boolean |
isForeignKey()
Utility method to determine if this column is a foreign key. |
|
boolean |
hasMultipleFK()
Whether this column is a part of more than one foreign key. |
|
array |
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(string $propelType)
Sets the domain up for specified Propel type. |
||
setType(string $propelType)
Sets the propel colunm type. |
||
string |
getType()
Returns the Propel column type as a string. |
|
int |
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)
|
||
boolean |
isLobType()
Utility method to know whether column needs Blob/Lob handling. |
|
isTextType()
Utility method to see if the column is text type. |
||
boolean |
isNumericType()
Utility method to see if the column is numeric type. |
|
boolean |
isBooleanType()
Utility method to see if the column is boolean type. |
|
boolean |
isTemporalType()
Utility method to know whether column is a temporal column. |
|
boolean |
isPhpArrayType()
Utility method to know whether column is an array column. |
|
boolean |
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 |
|
string |
getSize()
Returns the size of the column |
|
setSize(string $newSize)
Set the size of the column |
||
string |
getScale()
Returns the scale of the column |
|
setScale(string $newScale)
Set the scale of the column |
||
printSize()
Return the size in brackets for use in an sql schema if the type is String. |
||
string |
getDefaultSetting()
Return a string that will give this column a default value in SQL |
|
string |
getDefaultValueString()
Return a string that will give this column a default value in PHP |
|
Column |
setDefaultValue(ColumnDefaultValue|int|float|bool|string $def)
Set a string that will give this column a default value. |
|
ColumnDefaultValue |
getDefaultValue()
Get the default value object for this column. |
|
mixed |
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. |
||
string |
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) |
||
string |
getPhpNative()
Return a string representation of the native PHP type which corresponds to the propel type of this column. |
|
boolean |
isPhpPrimitiveType()
Returns true if the column's PHP native type is an boolean, int, long, float, double, string. |
|
boolean |
isPhpPrimitiveNumericType()
Return true if column's PHP native type is an boolean, int, long, float, double. |
|
boolean |
isPhpObjectType()
Returns true if the column's PHP native type is a class name. |
|
PropelPlatformInterface |
getPlatform()
Get the platform/adapter impl. |
|
hasPlatform()
|
||
getValidator()
|
||
__clone()
|
||
static |
generatePhpName($name, $phpNamingMethod = PhpNameGenerator::CONV_METHOD_CLEAN, $namePrefix = null)
|
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 1029
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 111
public
__construct(string $name = null)
Creates a new column and set the name
at line 125
static public string
makeList($columns, PropelPlatformInterface $platform)
Return a comma delimited string listing the specified columns.
at line 278
public Domain
getDomain()
Gets domain for this column, creating a new empty domain object if none is set.
at line 292
public
setDomain(Domain $domain)
Sets domain for this column
at line 300
public
getFullyQualifiedName()
Returns table.column
at line 308
public
getName()
Get the name of the column
at line 316
public
setName($newName)
Set the name of the column
at line 324
public
isNamePlural()
Determines whether a column name is plural
at line 332
public
getSingularName()
Gets the singular name for the column
at line 340
public
getDescription()
Get the description for the Table
at line 350
public
setDescription(newDescription $newDescription)
Set the description for the Table
at line 362
public string
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 379
public
setPhpName(String $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 395
public string
getStudlyPhpName()
Get studly version of PHP name.
The studly name is the PHP name with the first character lowercase.
at line 411
public string
getAccessorVisibility()
Get the visibility of the accessors of this column / attribute
at line 425
public
setAccessorVisibility($newVisibility $newVisibility)
Set the visibility of the accessor methods for this column / attribute
at line 439
public string
getMutatorVisibility()
Get the visibility of the mutator of this column / attribute
at line 453
public
setMutatorVisibility($newVisibility $newVisibility)
Set the visibility of the mutator methods for this column / attribute
at line 467
public string
getConstantName()
Get the column constant name (e.g.
PeerName::COLUMN_NAME).
at line 475
public
getConstantColumnName()
at line 490
public string
getPeerName()
Get the Peer constant name that will identify this column.
at line 500
public
setPeerName($name $name)
Set the Peer constant name that will identify this column.
at line 513
public string
getPhpType()
Get type to use in PHP sources.
If no type has been specified, then uses results of getPhpNative().
at line 527
public int
getPosition()
Get the location of this column within the table (one-based).
at line 537
public
setPosition(int $v)
Get the location of this column within the table (one-based).
at line 545
public
setTable(Table $parent)
Set the parent Table of the column
at line 553
public
getTable()
Get the parent Table of the column
at line 561
public
getTableName()
Returns the Name of the table the column is in
at line 574
public Inheritance
addInheritance(Inheritance|string $inhdata)
Adds a new inheritance definition to the inheritance list and set the parent column of the inheritance to the current column
at line 597
public
getChildren()
Get the inheritance definitions.
at line 606
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 614
public
isEnumeratedClasses()
Determine if possible classes have been enumerated in the xml file.
at line 622
public
isNotNull()
Return the isNotNull property of the column
at line 630
public
setNotNull($status)
Set the isNotNull property of the column
at line 640
public "NOT
getNotNullString()
Return NOT NULL String for this column
at line 651
public
setPrimaryString(boolean $v)
Set whether the column is the primary string, i.e.
whether its value is the default string representation of the table
at line 660
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 670
public
setPrimaryKey(boolean $v)
Set whether the column is a primary key or not.
at line 678
public
isPrimaryKey()
Return true if the column is a primary key
at line 686
public
setNodeKey($nk)
Set if the column is the node key of a tree
at line 694
public
isNodeKey()
Return true if the column is a node key of a tree
at line 702
public
setNodeKeySep($sep)
Set if the column is the node key of a tree
at line 710
public
getNodeKeySep()
Return true if the column is a node key of a tree
at line 718
public
setNestedSetLeftKey($nslk)
Set if the column is the nested set left key of a tree
at line 726
public
isNestedSetLeftKey()
Return true if the column is a nested set key of a tree
at line 734
public
setNestedSetRightKey($nsrk)
Set if the column is the nested set right key of a tree
at line 742
public
isNestedSetRightKey()
Return true if the column is a nested set right key of a tree
at line 750
public
setTreeScopeKey($tsk)
Set if the column is the scope key of a tree
at line 760
public boolean
isTreeScopeKey()
Return true if the column is a scope key of a tree
at line 770
public
setUnique(boolean $u)
Set true if the column is UNIQUE
at line 780
public boolean
isUnique()
Get the UNIQUE property.
at line 790
public boolean
requiresTransactionInPostgres()
Return true if the column requires a transaction in Postgres
at line 800
public boolean
isForeignKey()
Utility method to determine if this column is a foreign key.
at line 810
public boolean
hasMultipleFK()
Whether this column is a part of more than one foreign key.
at line 820
public array
getForeignKeys()
Get the foreign key objects for this column (if it is a foreign key or part of a foreign key)
at line 828
public
addReferrer(ForeignKey $fk)
Adds the foreign key from another table that refers to this column.
at line 839
public
getReferrers()
Get list of references to this column.
at line 848
public
hasReferrers()
at line 853
public
hasReferrer(ForeignKey $fk)
at line 858
public
clearReferrers()
at line 863
public
clearInheritanceList()
at line 876
public
setDomainForType(string $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 888
public
setType(string $propelType)
Sets the propel colunm type.
at line 902
public string
getType()
Returns the Propel column type as a string.
at line 912
public int
getPDOType()
Returns the column PDO type integer for this column's Propel type.
at line 920
public
getPropelType()
Returns the column type as given in the schema as an object
at line 925
public
isDefaultSqlType(PropelPlatformInterface $platform = null)
at line 943
public boolean
isLobType()
Utility method to know whether column needs Blob/Lob handling.
at line 951
public
isTextType()
Utility method to see if the column is text type.
at line 961
public boolean
isNumericType()
Utility method to see if the column is numeric type.
at line 971
public boolean
isBooleanType()
Utility method to see if the column is boolean type.
at line 981
public boolean
isTemporalType()
Utility method to know whether column is a temporal column.
at line 991
public boolean
isPhpArrayType()
Utility method to know whether column is an array column.
at line 1001
public boolean
isEnumType()
Utility method to know whether column is an ENUM column.
at line 1011
public
setValueSet(array $valueSet)
Sets the list of possible values for an ENUM column
at line 1021
public array
getValueSet()
Returns the list of possible values for an ENUM column
at line 1107
public string
getSize()
Returns the size of the column
at line 1117
public
setSize(string $newSize)
Set the size of the column
at line 1127
public string
getScale()
Returns the scale of the column
at line 1137
public
setScale(string $newScale)
Set the scale of the column
at line 1146
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 1157
public string
getDefaultSetting()
Return a string that will give this column a default value in SQL
at line 1167
public string
getDefaultValueString()
Return a string that will give this column a default value in PHP
at line 1194
public Column
setDefaultValue(ColumnDefaultValue|int|float|bool|string $def)
Set a string that will give this column a default value.
at line 1210
public ColumnDefaultValue
getDefaultValue()
Get the default value object for this column.
at line 1221
public mixed
getPhpDefaultValue()
Get the default value suitable for use in PHP.
at line 1230
public
isAutoIncrement()
Return auto increment/sequence string for the target database.
We need to pass in the props for the target database!
at line 1239
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 1250
public string
getAutoIncrementString()
Gets the auto-increment string.
at line 1269
public
setAutoIncrement($value)
Set the auto increment value.
Use isAutoIncrement() to find out if it is set or not.
at line 1280
public
setTypeFromString($typeName, $size)
Set the column type from a string property (normally a string from an sql input file)
at line 1312
public string
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 1323
public boolean
isPhpPrimitiveType()
Returns true if the column's PHP native type is an boolean, int, long, float, double, string.
at line 1334
public boolean
isPhpPrimitiveNumericType()
Return true if column's PHP native type is an boolean, int, long, float, double.
at line 1345
public boolean
isPhpObjectType()
Returns true if the column's PHP native type is a class name.
at line 1355
public PropelPlatformInterface
getPlatform()
Get the platform/adapter impl.
at line 1360
public
hasPlatform()
at line 1365
public
getValidator()
at line 1374
public
__clone()
at line 1379
static public
generatePhpName($name, $phpNamingMethod = PhpNameGenerator::CONV_METHOD_CLEAN, $namePrefix = null)