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 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)
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. |
|
Platform |
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 992
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 105
public
__construct($name = null)
Creates a new column and set the name
at line 119
static public string
makeList($columns, PropelPlatformInterface $platform)
Return a comma delimited string listing the specified columns.
at line 271
public Domain
getDomain()
Gets domain for this column, creating a new empty domain object if none is set.
at line 284
public
setDomain(Domain $domain)
Sets domain for this column
at line 292
public
getFullyQualifiedName()
Returns table.column
at line 300
public
getName()
Get the name of the column
at line 308
public
setName($newName)
Set the name of the column
at line 316
public
isNamePlural()
Determines whether a column name is plural
at line 324
public
getSingularName()
Gets the singular name for the column
at line 332
public
getDescription()
Get the description for the Table
at line 342
public
setDescription($newDescription)
Set the description for the Table
at line 353
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 370
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 386
public string
getStudlyPhpName()
Get studly version of PHP name.
The studly name is the PHP name with the first character lowercase.
at line 401
public string
getAccessorVisibility()
Get the visibility of the accessors of this column / attribute
at line 414
public
setAccessorVisibility($newVisibility $newVisibility)
Set the visibility of the accessor methods for this column / attribute
at line 428
public string
getMutatorVisibility()
Get the visibility of the mutator of this column / attribute
at line 441
public
setMutatorVisibility($newVisibility $newVisibility)
Set the visibility of the mutator methods for this column / attribute
at line 456
public string
getConstantName()
Get the column constant name (e.g.
PeerName::COLUMN_NAME).
at line 464
public
getConstantColumnName()
at line 478
public string
getPeerName()
Get the Peer constant name that will identify this column.
at line 487
public
setPeerName($name $name)
Set the Peer constant name that will identify this column.
at line 500
public string
getPhpType()
Get type to use in PHP sources.
If no type has been specified, then uses results of getPhpNative().
at line 513
public int
getPosition()
Get the location of this column within the table (one-based).
at line 522
public
setPosition(int $v)
Get the location of this column within the table (one-based).
at line 530
public
setTable(Table $parent)
Set the parent Table of the column
at line 538
public
getTable()
Get the parent Table of the column
at line 546
public
getTableName()
Returns the Name of the table the column is in
at line 558
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 581
public
getChildren()
Get the inheritance definitions.
at line 590
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 598
public
isEnumeratedClasses()
Determine if possible classes have been enumerated in the xml file.
at line 606
public
isNotNull()
Return the isNotNull property of the column
at line 614
public
setNotNull($status)
Set the isNotNull property of the column
at line 624
public "NOT
getNotNullString()
Return NOT NULL String for this column
at line 634
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 643
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 652
public
setPrimaryKey(boolean $v)
Set whether the column is a primary key or not.
at line 660
public
isPrimaryKey()
Return true if the column is a primary key
at line 668
public
setNodeKey($nk)
Set if the column is the node key of a tree
at line 676
public
isNodeKey()
Return true if the column is a node key of a tree
at line 684
public
setNodeKeySep($sep)
Set if the column is the node key of a tree
at line 692
public
getNodeKeySep()
Return true if the column is a node key of a tree
at line 700
public
setNestedSetLeftKey($nslk)
Set if the column is the nested set left key of a tree
at line 708
public
isNestedSetLeftKey()
Return true if the column is a nested set key of a tree
at line 716
public
setNestedSetRightKey($nsrk)
Set if the column is the nested set right key of a tree
at line 724
public
isNestedSetRightKey()
Return true if the column is a nested set right key of a tree
at line 732
public
setTreeScopeKey($tsk)
Set if the column is the scope key of a tree
at line 741
public boolean
isTreeScopeKey()
Return true if the column is a scope key of a tree
at line 750
public
setUnique(boolean $u)
Set true if the column is UNIQUE
at line 759
public boolean
isUnique()
Get the UNIQUE property.
at line 768
public boolean
requiresTransactionInPostgres()
Return true if the column requires a transaction in Postgres
at line 777
public boolean
isForeignKey()
Utility method to determine if this column is a foreign key.
at line 786
public boolean
hasMultipleFK()
Whether this column is a part of more than one foreign key.
at line 795
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 803
public
addReferrer(ForeignKey $fk)
Adds the foreign key from another table that refers to this column.
at line 814
public
getReferrers()
Get list of references to this column.
at line 823
public
hasReferrers()
at line 828
public
hasReferrer(ForeignKey $fk)
at line 833
public
clearReferrers()
at line 838
public
clearInheritanceList()
at line 851
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 861
public
setType(string $propelType)
Sets the propel colunm type.
at line 874
public string
getType()
Returns the Propel column type as a string.
at line 883
public int
getPDOType()
Returns the column PDO type integer for this column's Propel type.
at line 891
public
getPropelType()
Returns the column type as given in the schema as an object
at line 896
public
isDefaultSqlType(PropelPlatformInterface $platform = null)
at line 913
public boolean
isLobType()
Utility method to know whether column needs Blob/Lob handling.
at line 921
public
isTextType()
Utility method to see if the column is text type.
at line 930
public boolean
isNumericType()
Utility method to see if the column is numeric type.
at line 939
public boolean
isBooleanType()
Utility method to see if the column is boolean type.
at line 948
public boolean
isTemporalType()
Utility method to know whether column is a temporal column.
at line 957
public boolean
isPhpArrayType()
Utility method to know whether column is an array column.
at line 966
public boolean
isEnumType()
Utility method to know whether column is an ENUM column.
at line 975
public
setValueSet(array $valueSet)
Sets the list of possible values for an ENUM column
at line 984
public array
getValueSet()
Returns the list of possible values for an ENUM column
at line 1069
public string
getSize()
Returns the size of the column
at line 1078
public
setSize(string $newSize)
Set the size of the column
at line 1087
public string
getScale()
Returns the scale of the column
at line 1096
public
setScale(string $newScale)
Set the scale of the column
at line 1105
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 1115
public string
getDefaultSetting()
Return a string that will give this column a default value in SQL
at line 1124
public string
getDefaultValueString()
Return a string that will give this column a default value in PHP
at line 1151
public Column
setDefaultValue(ColumnDefaultValue|int|float|bool|string $def)
Set a string that will give this column a default value.
at line 1166
public ColumnDefaultValue
getDefaultValue()
Get the default value object for this column.
at line 1176
public mixed
getPhpDefaultValue()
Get the default value suitable for use in PHP.
at line 1185
public
isAutoIncrement()
Return auto increment/sequence string for the target database.
We need to
pass in the props for the target database!
at line 1194
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 1204
public string
getAutoIncrementString()
Gets the auto-increment string.
at line 1223
public
setAutoIncrement($value)
Set the auto increment value.
Use isAutoIncrement() to find out if it is set or not.
at line 1234
public
setTypeFromString($typeName, $size)
Set the column type from a string property (normally a string from an sql input file)
at line 1266
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 1276
public boolean
isPhpPrimitiveType()
Returns true if the column's PHP native type is an boolean, int, long, float, double, string.
at line 1286
public boolean
isPhpPrimitiveNumericType()
Return true if column's PHP native type is an boolean, int, long, float, double.
at line 1296
public boolean
isPhpObjectType()
Returns true if the column's PHP native type is a class name.
at line 1306
public Platform
getPlatform()
Get the platform/adapter impl.