Database column list
This defines the public methods for adding database columns to a collection and retrieving the columns from the collection as a formatted list
category | Database |
---|---|
package | Formaid |
author | Dieter Adriaenssens |
copyright | 2006-2013 Dieter Adriaenssens |
license | GPL |
link | http://formaid.sourceforge.net/ |
todo | implement displayPrefix and displaySuffix in Logic mode |
__construct() : void
access | public |
---|
add(\DbColumnInterface $dbColumn) : void
If the object is of the property class, add it to the collection. If the object is not a class, create a new Formaid_Property instance, of the type provided by parameter type and set current value and default value.
display() : void
inherited_from | \Formaid_Collection::display() |
---|---|
inherited_from | \Formaid_Properties::display() |
getDisplayListSeparator() : string
string
String separating columnsgetDisplayMode() : string
string
display modegetDisplayPrefix() : string
inherited_from | \Formaid_Collection::getDisplayPrefix() |
---|---|
inherited_from | \Formaid_Properties::getDisplayPrefix() |
string
Prefix string when displaying collection itemsgetDisplayString(bool $withValue, bool $discardEmptyValue) : string
A displaystring is generated from all objects in the collection, all empty strings are removed and the remaining ones are chained together with the listSeparator.
todo | make withValue and discardEmptyValue properties of the class |
---|---|
todo | implement setDisplaymode on collection level |
todo | inherit from Collection::getDisplayString (relies on two other todo's) |
bool
append value to column (optional, default : true)
bool
discard columns with empty values (optional, default : false)
string
getDisplaySuffix() : string
inherited_from | \Formaid_Collection::getDisplaySuffix() |
---|---|
inherited_from | \Formaid_Properties::getDisplaySuffix() |
string
Suffix string when displaying collection itemsgetName(string $name) : string
inherited_from | \Formaid_Collection::getName() |
---|---|
inherited_from | \Formaid_Properties::getName() |
string
object name
string
object namegetNames() : array
inherited_from | \Formaid_Collection::getNames() |
---|---|
inherited_from | \Formaid_Properties::getNames() |
array
object namesgetObject(string $name) : object
inherited_from | \Formaid_Collection::getObject() |
---|---|
inherited_from | \Formaid_Properties::getObject() |
string
object name
object
getObjects() : array
inherited_from | \Formaid_Collection::getObjects() |
---|---|
inherited_from | \Formaid_Properties::getObjects() |
array
objectsgetValue(string $name) : string
inherited_from | \Formaid_Properties::getValue() |
---|
string
property name
string
returns current value of propertyisEmpty(string $name) : bool
inherited_from | \Formaid_Properties::isEmpty() |
---|
string
property name
bool
true if emptyisNameEmpty(string $name) : bool
inherited_from | \Formaid_Collection::isNameEmpty() |
---|---|
inherited_from | \Formaid_Properties::isNameEmpty() |
string
object name
bool
true if emptynumItems() : int
inherited_from | \Formaid_Collection::numItems() |
---|---|
inherited_from | \Formaid_Properties::numItems() |
int
number of objects in collectionremove(string $name) : void
inherited_from | \Formaid_Collection::remove() |
---|---|
inherited_from | \Formaid_Properties::remove() |
string
object name
resetAll() : void
inherited_from | \Formaid_Properties::resetAll() |
---|
resetValue(string $name) : void
inherited_from | \Formaid_Properties::resetValue() |
---|
string
property name
setDefault(string $name, string $value) : void
inherited_from | \Formaid_Properties::setDefault() |
---|
string
property name
string
new default value
setDisplayAffixes(string $prefix, string $suffix) : void
inherited_from | \Formaid_Collection::setDisplayAffixes() |
---|---|
inherited_from | \Formaid_Properties::setDisplayAffixes() |
string
prefix string when displaying collection items
string
suffix string when displaying collection items
setDisplayListSeparator(string $separator) : void
inherited_from | \DbColumnListInterface::setDisplayListSeparator() |
---|
string
string separating columns
setDisplayLogicSeparator(string $separator) : void
string
string separating columns
setDisplayMode(string $mode, string $separator) : void
string
display mode : list, (binary )logic
string
string separating columns
setDisplayPrefix(string $prefix) : void
inherited_from | \Formaid_Collection::setDisplayPrefix() |
---|---|
inherited_from | \Formaid_Properties::setDisplayPrefix() |
string
prefix string when displaying collection items
setDisplaySuffix(string $suffix) : void
inherited_from | \Formaid_Collection::setDisplaySuffix() |
---|---|
inherited_from | \Formaid_Properties::setDisplaySuffix() |
string
suffix string when displaying collection items
setName(string $name, string $new_name) : void
inherited_from | \Formaid_Collection::setName() |
---|---|
inherited_from | \Formaid_Properties::setName() |
string
object name
string
new name
setValue(string $name, string $new_value) : void
inherited_from | \Formaid_Properties::setValue() |
---|
string
property name
string
new value
show() : void
The show method of every object is called. These functions print the object (name, value, ...) to stdout.
inherited_from | \Formaid_Collection::show() |
---|---|
inherited_from | \Formaid_Properties::show() |
addDisplayAffixes(string $displayString, int $numItems) : string
The pre- and suffix should only be displayed in binary logic mode and when more than one item will be displayed
string
String with columns to be displayed
int
Number of columns in displayString
string
String separating columnscallbackDisplayString(object $object) : string
It calls the getDisplayString() method of the instance
static | |
---|---|
inherited_from | \Formaid_Collection::callbackDisplayString() |
inherited_from | \Formaid_Properties::callbackDisplayString() |
object
Instance to apply the method to
string
Displaystring of object$collection : array
access | protected |
---|---|
inherited_from | \Formaid_Collection::$$collection |
inherited_from | \Formaid_Properties::$$collection |
$_displayListSeparator : string
access | private |
---|---|
inherited_from | \Formaid_Collection::$$_displayListSeparator |
inherited_from | \Formaid_Properties::$$_displayListSeparator |
$_displayLogicSeparator : string
access | private |
---|
$_displayMode : string
access | private |
---|
$_displayPrefix : string
access | private |
---|---|
inherited_from | \Formaid_Collection::$$_displayPrefix |
inherited_from | \Formaid_Properties::$$_displayPrefix |
$_displaySuffix : string
access | private |
---|---|
inherited_from | \Formaid_Collection::$$_displaySuffix |
inherited_from | \Formaid_Properties::$$_displaySuffix |