Holds all information for one column of an RSDEngineDBTable.
The access restriction for this class should be treated as 'friendly' - only accessable by classes in the same package.
Located in /code/framework/RSDEngine/RSDEngineDBTable.php (line 4146)
The prefix of this column name. Often f_. Providing a column prefix makes the generated code more readable because the prefix can be remove where appropriate.
If non-empty this value is used in the generated insert method. Is set in the construtor method.
If non-empty this value is used in the generated update method. Is set in the construtor method.
The sql definition of this column. Gets set inside the constructor.
Whether no input filed should be generated for this column in the create template. Is set in the construtor method.
Whether this columns should not be selected (displayed via a template). Is set in the construtor method.
Whether no input filed should be generated for this column in the update template. Is set in the construtor method.
If this property contains any elements the LiveUser area stored in this column by ID is made editable through a generated template and controller.
This property gets set to an array of strings (option definitions) inside the constructor method and updated inside parseLiveUserOptions() to an array of RSDEngineEditLiveUserAreaOption.
If this property contains any elements the LiveUser group stored in this column by ID is made editable through a generated template and controller.
This property gets set to an array of strings (option definitions) inside the constructor method and updated inside parseLiveUserOptions() to an array of RSDEngineEditLiveUserGroupOption.
If this property contains any elements the LiveUser right stored in this column by ID is made editable through a generated template and controller.
This property gets set to an array of strings (option definitions) inside the constructor method and updated inside parseLiveUserOptions() to an array of RSDEngineEditLiveUserRightOption.
Where this column that is defined as a foreign key references to. If this column is not a foreign key this property is ignored.
The input type for this column. Is set in the construtor method.
The the input type data (e.g. the options for a select box) for this column. Is set in the construtor method.
If this column is a foreign key.
If this column is a primary key.
If this column is an undefined key.
The isValid defintion of this column. Is set in the construtor method.
The name of this column. Is set in the construtor method.
The RSDEngineDBTable instance that created this instance.
The name of the sequence from which to fetch the next id. Pass an empty string if no sequence should be used. Is set in the construtor method.
The name of the table that contains this column. Is set in the construtor method.
Indicates whether the values for this column must be unique. Is set in the construtor method.
An associative array holding the validation options for this column.
Gets set by setIsValidFileOptions if this column is defined as isValid:file.
The constructor that initializes this instance.
Generates and Returns the getNext* method for this column.
Returns the name of the getNext* method for this column.
Returns the name of the getStored* method for this column.
Generates and Returns the isValid* method for this column.
Returns the name of the isValid* method for this column.
Returns the name of the removeStored* method for this column.
Returns the name of the storeUploaded* method for this column.
Generates the methods for granting a right to/revoking it from a user/group.
These four methods should only be created if this column was defined with any editLiveUserRight option.
Returns the column name suitable for including it in a method name.
This is done like this:
1 function getColumnNameForPartialMethodName()
2 {
3 $str = ucfirst(strtolower($this->getColumnNameWithoutPrefix()));
4 //the e modifier makes the second argument to be parsed as PHP-Code!
5 return preg_replace("/_([a-z0-9])/ie","strtoupper('\\1')",$str);
6 }
Returns the column name suitable for use as an identifyer name.
This is done like this:
1 function getColumnNameForVariableName()
2 {
3 $str = strtolower($this->getColumnNameWithoutPrefix());
4 //the e modifier makes the second argument to be parsed as PHP-Code!
5 return preg_replace("/_([a-z0-9])/ie","strtoupper('\\1')", $str);
6 }
Returns the column name without the prifix.
Returns the value of the property foreignKeyTarget.
Returns the validation options for this column if it was defined as isValid:file.
Returns the sequence name suitable for use as an identifyer name.
Returns true if this column is a primary, foreign or undefined key.
This method will parse all editLiveUserRight, editLiveUserGroup and editLiveUserGroupOptions.
Sets the property foreignKeyTarget makes this column a foreign key.
If the argument passed is not equal to (!==) the boolean value false setKey is called with the parameter 'foreign'.
Sets the validation options for this column that was defined as isValid:file.
Sets the properties isPrimaryKey, isForeignKey and isUndefinedKey based on the string passed as argument.
Boolean values are assignd to these three properies:
1 function setKey($key)
2 {
3 $this->isPrimaryKey = ($key == "primary");
4 $this->isForeignKey = ($key == "foreign");
5 $this->isUndefinedKey = ($key == "undefined");
6 if ($this->isPrimaryKey) {
7 $this->unique = true;
8 $this->doNotUpdate = true;
9 if ($this->sequenceName == '') { //&& $makeSequenceAssumption
10 $this->sequenceName = 'seq_' .
11 strtolower($this->rsdEngineDBTable->rsdEngineDB->config['projectName']) .
12 '_' .
13 $this->rsdEngineDBTable->getTableNameWithoutPrefix() .
14 "_" .
15 $this->getColumnNameWithoutPrefix();
16 }
17 if($this->sequenceName != '') {
18 $this->defaultInsertValue = '$this->' . $this->generateGetNextMethodName() . "()";
19 }
20 }
21 }
Returns a literal representation of this column.
Format:
1 function toString()
2 {
3 return $this->fullName;
4 }
Documentation generated on Mon, 8 Dec 2003 13:12:17 +0100 by phpDocumentor 1.2.3