contenido\classes\class.frontend.groups.php

Show: PublicProtectedPrivateinherited
Table of Contents
Project: Contenido Content Management System

Description: Frontend groups class

Requirements:

Author
unknown  
Con_php_req
5.0  
Copyright
four for business AG  
License
http://www.contenido.org/license/LIZENZ.txt  
Link
http://www.4fb.de  
Link
http://www.contenido.org  
Package
Contenido Backend classes  
Since
file available since contenido release <= 4.6 {@internal created unknown modified 2008-06-30, Frederic Schneider, add security fix $Id: class.frontend.groups.php 425 2008-06-30 14:53:17Z frederic.schneider $: }}  
Version
1.6.1  

\FrontendGroup

Package: Default
Single FrontendGroup Item
Parent(s)
\Item
Author
Timo A. Hummel  
Copyright
four for business 2003  
Version
0.1  

Properties

>VPropertypublicarray $_arrInFilters = array('urlencode', 'conHtmlSpecialChars', 'addslashes')
inherited
Array storing the funcion names of the filters used when data is stored to the db
Inherited from: \Item::$$_arrInFilters
Default valuearray('urlencode', 'conHtmlSpecialChars', 'addslashes')Details
Type
array
Access
private  
Inherited_from
\Item::$$_arrInFilters  
>VPropertypublicarray $_arrOutFilters = array('stripslashes', 'htmldecode', 'urldecode')
inherited
Array storing the funcion names of the filters used when data is retrieved from the db
Inherited from: \Item::$$_arrOutFilters
Default valuearray('stripslashes', 'htmldecode', 'urldecode')Details
Type
array
Access
private  
Inherited_from
\Item::$$_arrOutFilters  
>VPropertypublic$_metaObject
inheritedInherited from: \Item::$$_metaObject
Details
Type
n/a
Inherited_from
\Item::$$_metaObject  
>VPropertypublicarray $cache
inherited
Cache the result items
Inherited from: \Item::$$cache
Details
Type
array
Access
private  
Inherited_from
\Item::$$cache  
>VPropertypublicobject $db
inherited
DB_Contenido instance
Inherited from: \Item::$$db
Details
Type
object
Access
private  
Inherited_from
\Item::$$db  
>VPropertypublicstring $lasterror
inherited
Storage of the last error
Inherited from: \Item::$$lasterror
Details
Type
string
Access
private  
Inherited_from
\Item::$$lasterror  
>VPropertypublicint $lifetime
inherited

Lifetime in seconds

Inherited from: \Item::$$lifetime
Details
Type
int
Access
private  
Inherited_from
\Item::$$lifetime  
>VPropertypublicarray $modifiedValues
inherited
Storage of the fields which were modified
Inherited from: \Item::$$modifiedValues
Details
Type
array
Access
private  
Inherited_from
\Item::$$modifiedValues  
>VPropertypublicstring $oldPrimaryKey
inherited
stores the old primary key, just in case somebody wants to change it
Inherited from: \Item::$$oldPrimaryKey
Details
Type
string
Access
private  
Inherited_from
\Item::$$oldPrimaryKey  
>VPropertypublicobject $primaryKey
inherited
Primary key of the table
Inherited from: \Item::$$primaryKey
Details
Type
object
Access
private  
Inherited_from
\Item::$$primaryKey  
>VPropertypublicobject $properties
inherited

PropertyCollection object

Inherited from: \Item::$$properties
Details
Type
object
Access
private  
Inherited_from
\Item::$$properties  
>VPropertypublicstring $table
inherited
Storage of the source table to use for the user informations
Inherited from: \Item::$$table
Details
Type
string
Access
private  
Inherited_from
\Item::$$table  
>VPropertypublicarray $values
inherited
Storage of the source table to use for the user informations
Inherited from: \Item::$$values
Details
Type
array
Access
private  
Inherited_from
\Item::$$values  
>VPropertypublicboolean $virgin
inherited
Checks for the virginity of this object.
Inherited from: \Item::$$virgin

If true, the object is virgin and no operations on it except load-Functions are allowed.

Details
Type
boolean
Access
private  
Inherited_from
\Item::$$virgin  

Methods

methodpublicFrontendGroup() : void

Constructor Function

methodpublicItem(string $table = "", string $primaryKey = "",  $lifetime = 10) : void
inherited

Constructor Function

Inherited from: \Item::Item()
Parameters
NameTypeDescription
$tablestring

The table to use as information source

$primaryKeystring

The primary key to use

$lifetime
methodpublic_inFilter(mixed $data) : mixed
inherited

Filters the passed data using the functions defines in the _arrInFilters array.

Inherited from: \Item::_inFilter()
Parameters
NameTypeDescription
$datamixed

Data to filter

Returns
TypeDescription
mixedFiltered data
Details
Access
private  
See
\setFilters  
methodpublic_onLoad() : \none
inherited

_onLoad ()

Inherited from: \Item::_onLoad()

Function which is called whenever an item is loaded. Inherited classes should override this function if desired.

Returns
TypeDescription
\none
methodpublic_outFilter(mixed $data) : mixed
inherited

Filters the passed data using the functions defines in the _arrOutFilters array.

Inherited from: \Item::_outFilter()
Parameters
NameTypeDescription
$datamixed

Data to filter

Returns
TypeDescription
mixedFiltered data
Details
Access
private  
See
\setFilters  
methodpublic_setMetaObject( $objectname) : void
inherited

Inherited from: \Item::_setMetaObject()
Parameters
NameTypeDescription
$objectname
methodpublicdeleteProperty(string $type, string $name) : void
inherited

deleteProperty ($type, $name) Deletes a custom property

Inherited from: \Item::deleteProperty()
Parameters
NameTypeDescription
$typestring

Specifies the type

$namestring

Specifies the name

methodpublicget(string $field) : mixed
inherited

get($field) Wrapper for getField (less to type)

Inherited from: \Item::get()
Parameters
NameTypeDescription
$fieldstring

Specifies the field to retrieve

Returns
TypeDescription
mixedValue of the field
methodpublicgetField(string $field) : mixed
inherited

getField($field) Gets the value of a specific field

Inherited from: \Item::getField()
Parameters
NameTypeDescription
$fieldstring

Specifies the field to retrieve

Returns
TypeDescription
mixedValue of the field
methodpublicgetMetaObject() : void
inherited

Inherited from: \Item::getMetaObject()
methodpublicgetProperty(string $type, string $name) : boolean
inherited

getProperty ($type, $name) Sets a custom property

Inherited from: \Item::getProperty()
Parameters
NameTypeDescription
$typestring

Specifies the type

$namestring

Specifies the name

Returns
TypeDescription
booleanValue of the given property
methodpublicloadBy(string $field, string $value, bool $bSafe = true) : bool
inherited

loadBy ($field, $value) Loads an item by colum/field from the database

Inherited from: \Item::loadBy()
Parameters
NameTypeDescription
$fieldstring

Specifies the field

$valuestring

Specifies the value

$bSafebool

use inFilter or not

Returns
TypeDescription
boolTrue if the load was successful
methodpublicloadByPrimaryKey(string $value) : bool
inherited

loadByPrimaryKey ($value) Loads an item by ID from the database

Inherited from: \Item::loadByPrimaryKey()
Parameters
NameTypeDescription
$valuestring

Specifies the primary key value

Returns
TypeDescription
boolTrue if the load was successful
methodpublicset(string $field, string $value,  $safe = true) : void
inherited

set($field, $value) Shortcut to setField

Inherited from: \Item::set()
Parameters
NameTypeDescription
$fieldstring

Specifies the field to set

$valuestring

Specifies the value to set

$safe
methodpublicsetField(string $field, string $value, boolean $safe = true) : void
inherited

setField($field, $value) Sets the value of a specific field

Inherited from: \Item::setField()
Parameters
NameTypeDescription
$fieldstring

Specifies the field to set

$valuestring

Specifies the value to set

$safeboolean

Speficies if we should translate characters

methodpublicsetFilters(array $arrInFilters = array(), array $arrOutFilters = array()) : void
inherited

Define the filter functions used when data is being stored or retrieved from the database.

Inherited from: \Item::setFilters()

Examples:

$obj->setFilters(array('addslashes'), array('stripslashes')); $obj->setFilters(array('htmlencode', 'addslashes'), array('stripslashes', 'htmlencode'));

Parameters
NameTypeDescription
$arrInFiltersarray

inFilters array with function names

$arrOutFiltersarray

outFilters array with function names

methodpublicsetProperty(string $type, string $name, string $value) : void
inherited

setProperty ($type, $name, $value) Sets a custom property

Inherited from: \Item::setProperty()
Parameters
NameTypeDescription
$typestring

Specifies the type

$namestring

Specifies the name

$valuestring

Specifies the value

methodpublicstore() : void
inherited

store() Stores the modified user object to the database

Inherited from: \Item::store()

\FrontendGroupCollection

Package: Default
Frontend group management class
Parent(s)
\ItemCollection
Author
Timo A. Hummel  
Copyright
four for business 2003  
Version
0.1  

Properties

>VPropertypublicarray $_JoinPartners
inherited

Reverse join partners for this data object

Inherited from: \ItemCollection::$$_JoinPartners
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_JoinPartners  
>VPropertypublicstring $_encoding
inherited

Encoding

Inherited from: \ItemCollection::$$_encoding
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$_encoding  
>VPropertypublicarray $_forwardJoinPartners
inherited

Forward join partners for this data object

Inherited from: \ItemCollection::$$_forwardJoinPartners
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_forwardJoinPartners  
>VPropertypublicarray $_groupConditions
inherited

Group conditions

Inherited from: \ItemCollection::$$_groupConditions
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_groupConditions  
>VPropertypublicarray $_innerGroupConditions = array()
inherited

Inner group conditions

Inherited from: \ItemCollection::$$_innerGroupConditions
Default valuearray()Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_innerGroupConditions  
>VPropertypublicstring $_itemClass
inherited

Single item class

Inherited from: \ItemCollection::$$_itemClass
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$_itemClass  
>VPropertypublicobject $_iteratorItem
inherited

Iterator object for the next() method

Inherited from: \ItemCollection::$$_iteratorItem
Details
Type
object
Access
private  
Inherited_from
\ItemCollection::$$_iteratorItem  
>VPropertypublicarray $_resultFields = array()
inherited

Result fields for the query

Inherited from: \ItemCollection::$$_resultFields
Default valuearray()Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_resultFields  
>VPropertypublicarray $_whereRestriction
inherited

Where restrictions for the query

Inherited from: \ItemCollection::$$_whereRestriction
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_whereRestriction  
>VPropertypublicarray $cache
inherited
Cache the result items
Inherited from: \ItemCollection::$$cache
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$cache  
>VPropertypublicobject $db
inherited
DB_Contenido instance
Inherited from: \ItemCollection::$$db
Details
Type
object
Access
private  
Inherited_from
\ItemCollection::$$db  
>VPropertypublicstring $lasterror
inherited
Storage of the last error
Inherited from: \ItemCollection::$$lasterror
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$lasterror  
>VPropertypublicint $lifetime
inherited

Lifetime in seconds

Inherited from: \ItemCollection::$$lifetime
Details
Type
int
Access
private  
Inherited_from
\ItemCollection::$$lifetime  
>VPropertypublicstring $objects
inherited
Storage of all result items
Inherited from: \ItemCollection::$$objects
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$objects  
>VPropertypublicstring $primaryKey
inherited
Storage of the primary key
Inherited from: \ItemCollection::$$primaryKey
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$primaryKey  
>VPropertypublicarray $properties
inherited

Property collection

Inherited from: \ItemCollection::$$properties
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$properties  
>VPropertypublicstring $table
inherited
Storage of the source table to use for the information
Inherited from: \ItemCollection::$$table
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$table  
>VPropertypublicarray $virgin
inherited

Is entry virgin?

Inherited from: \ItemCollection::$$virgin
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$virgin  

Methods

methodpublicFrontendGroupCollection() : void

Constructor Function

methodpublicItemCollection(string $table,  $primaryKey,  $lifetime = 10) : void
inherited

Constructor Function Note: Default lifetime is 10 seconds.

Inherited from: \ItemCollection::ItemCollection()
Parameters
NameTypeDescription
$tablestring

The table to use as information source

$primaryKey
$lifetime
methodpublic_buildGroupWhereStatements() : array
inherited

_buildGroupWhereStatements ()

Inherited from: \ItemCollection::_buildGroupWhereStatements()

Builds a where statement out of the setGroupWhere calls

Returns
TypeDescription
arraywith all where statements
methodpublic_buildWhereStatements() : array
inherited

_buildWhereStatements ()

Inherited from: \ItemCollection::_buildWhereStatements()

Builds a where statement out of the setWhere calls

Returns
TypeDescription
arraywith all where statements
methodpublic_fetchJoinTables(\none $ignore_root) : array
inherited

_fetchJoinTables ()

Inherited from: \ItemCollection::_fetchJoinTables()

Fetches all tables which will be joined later on.

The returned array has the following format:

array( array(fields), array(tables), array(joins), array(wheres) );

Notes: The table is the table name which needs to be added to the FROM clause The join statement which is inserted after the master table The where statement is combined with all other where statements The fields to select from

Parameters
NameTypeDescription
$ignore_root\none
Returns
TypeDescription
arraysee above
methodpublic_findReverseJoinPartner( $parentclass,  $classname) : void
Parameters
NameTypeDescription
$parentclass
$classname
methodpublic_initializeDriver( $bForceInit = false) : void
inherited

_initializeDriver: Initializes the driver to use with GenericDB.

Inherited from: \ItemCollection::_initializeDriver()
Parameters
NameTypeDescription
$bForceInit

boolean If true, forces the driver to initialize, even if it already exists.

methodpublic_recursiveStructuredFetch( $objects,  $array) : void
Parameters
NameTypeDescription
$objects
$array
methodpublic_resolveLinks() : void
inherited

Inherited from: \ItemCollection::_resolveLinks()
methodpublic_setItemClass(string $classname) : \none
inherited

_setItemClass: private method to set the accompanying item object.

Inherited from: \ItemCollection::_setItemClass()
Parameters
NameTypeDescription
$classnamestring

specifies the classname

Returns
TypeDescription
\none
methodpublic_setJoinPartner(string $foreignCollectionClass) : \none
inherited

_setJoinPartner: Defines the reverse links for this table.

Inherited from: \ItemCollection::_setJoinPartner()

Important: The class specified by $foreignCollectionClass needs to be a collection class and has to exist Define all links in the constructor of your object

Parameters
NameTypeDescription
$foreignCollectionClassstring

Specifies the foreign class to use

Returns
TypeDescription
\none
methodpublicaddResultField( $field) : void
inherited

Inherited from: \ItemCollection::addResultField()
Parameters
NameTypeDescription
$field
methodpubliccount() : integer
inherited

count () Returns the amount of returned items

Inherited from: \ItemCollection::count()
Returns
TypeDescription
integerNumber of rows
methodpubliccreate( $groupname) : void

Creates a new group

Parameters
NameTypeDescription
$groupname

string Specifies the groupname

methodpublicdelete( $itemID) : void

delete() Deletes an item in the table.

Parameters
NameTypeDescription
$itemID
methodpublicdeleteWhere( $field,  $restriction,  $operator = "=") : void
inherited

deleteWhere ($field, $restriction, $operator)

Inherited from: \ItemCollection::deleteWhere()

Restricts a query with a where clause

Parameters
NameTypeDescription
$field
$restriction
$operator
methodpublicdeleteWhereGroup( $group,  $field,  $restriction,  $operator = "=") : void
inherited

deleteWhereGroup ($group, $field, $restriction, $operator)

Inherited from: \ItemCollection::deleteWhereGroup()

Restricts a query with a where clause, groupable

Parameters
NameTypeDescription
$group
$field
$restriction
$operator
methodpublicexists(integer $id) : boolean
inherited

exists ($id) Checks if a specific entry exists

Inherited from: \ItemCollection::exists()
Parameters
NameTypeDescription
$idinteger

The id to check for

Returns
TypeDescription
booleantrue if object exists, false if not
methodpublicfetchArray( $key,  $fields) : array
inherited

fetchArray() Fetches an array of fields from the database.

Inherited from: \ItemCollection::fetchArray()

Example: $i = $object->fetchArray("idartlang", array("idlang", "name"));

could result in: $i[5] = array("idlang" => 5, "name" => "My Article");

Important: If you don't pass an array for fields, the function doesn't create an array.

Parameters
NameTypeDescription
$key

string Name of the field to use for the key

$fields

mixed String or array

Returns
TypeDescription
arrayResulting array
methodpublicfetchObject( $class) : void
inherited

Inherited from: \ItemCollection::fetchObject()
Parameters
NameTypeDescription
$class
methodpublicfetchTable( $fields = array(),  $objects = array()) : void
inherited

Inherited from: \ItemCollection::fetchTable()
Parameters
NameTypeDescription
$fields
$objects
methodpublicflexSelect(string $distinct = "", string $from = "", string $where = "", string $group_by = "", string $order_by = "", string $limit = "") : array
inherited

flexSelect ($distinct = "", $from = "", $where = "", $group_by = "", $order_by = "", $limit = "") Selects all entries from the database and returns them as DBObject-objects to the user.

Inherited from: \ItemCollection::flexSelect()

Objects are loaded using their primary key.

Parameters
NameTypeDescription
$distinctstring

Specifies if distinct will be added to the SQL statement ($distinct !== "" -> DISTINCT)

$fromstring

Specifies the additional from clause (e.g. "con_news_groups AS groups, con_news_groupmembers AS groupmembers").

$wherestring

Specifies the where clause.

$group_bystring

Specifies the group by clause.

$order_bystring

Specifies the order by clause.

$limitstring

Specifies the limit by clause.

Returns
TypeDescription
arrayArray of DBObject-Objects
Details
Author
HerrB  
methodpubliclink( $foreignClass) : void
inherited

sets the query to use foreign tables in the resultset

Inherited from: \ItemCollection::link()
Parameters
NameTypeDescription
$foreignClass
methodpublicloadItem( $itemID) : object

Loads an item by its ID (primary key)

Needs to be overridden by the extension class.

Parameters
NameTypeDescription
$itemID

integer Specifies the item ID to load

Returns
TypeDescription
objectThe newly created object
methodpublicnext() : object
inherited

next () Advances to the next item in the database.

Inherited from: \ItemCollection::next()
Returns
TypeDescription
objectThe next object, or false if no more objects
methodpublicquery() : void
inherited

Inherited from: \ItemCollection::query()
methodpublicqueryAndFetchStructured(\objects $objects) : array
inherited

fetchStructured Returns an array of arrays

Inherited from: \ItemCollection::queryAndFetchStructured()
Parameters
NameTypeDescription
$objects\objects

array with the correct order of the objects

Returns
TypeDescription
arrayresult
methodpublicremoveResultField( $field) : void
inherited

Inherited from: \ItemCollection::removeResultField()
Parameters
NameTypeDescription
$field
methodpublicresetQuery() : void
inherited

Inherited from: \ItemCollection::resetQuery()
methodpublicselect(string $where = "", string $group_by = "", string $order_by = "", string $limit = "") : array
inherited

select ($where = "", $group_by = "", $order_by = "", $limit = "") Selects all entries from the database and returns them as DBObject-objects to the user.

Inherited from: \ItemCollection::select()

Objects are loaded using their primary key.

Parameters
NameTypeDescription
$wherestring

Specifies the where clause.

$group_bystring

Specifies the group by clause.

$order_bystring

Specifies the order by clause.

$limitstring

Specifies the limit by clause.

Returns
TypeDescription
arrayArray of DBObject-Objects
methodpublicsetEncoding( $sEncoding) : void
inherited

Inherited from: \ItemCollection::setEncoding()
Parameters
NameTypeDescription
$sEncoding
methodpublicsetGroupCondition( $group1,  $group2,  $condition = "AND") : void
inherited

setGroupCondition ($group1, $group2, $condition)

Inherited from: \ItemCollection::setGroupCondition()

Defines how groups are linked to each other

Parameters
NameTypeDescription
$group1
$group2
$condition
methodpublicsetInnerGroupCondition( $group,  $condition = "AND") : void
inherited

setInnerGroupCondition ($group, $condition)

Inherited from: \ItemCollection::setInnerGroupCondition()

Defines how relations in one group are linked each together

Parameters
NameTypeDescription
$group
$condition
methodpublicsetLimit( $iRowStart,  $iRowCount) : void
inherited

Inherited from: \ItemCollection::setLimit()
Parameters
NameTypeDescription
$iRowStart
$iRowCount
methodpublicsetOrder( $order) : void
inherited

Inherited from: \ItemCollection::setOrder()
Parameters
NameTypeDescription
$order
methodpublicsetWhere( $field,  $restriction,  $operator = "=") : void
inherited

setWhere ($field, $restriction, $operator)

Inherited from: \ItemCollection::setWhere()

Restricts a query with a where clause

Parameters
NameTypeDescription
$field
$restriction
$operator
methodpublicsetWhereGroup( $group,  $field,  $restriction,  $operator = "=") : void
inherited

setWhereGroup ($group, $field, $restriction, $operator)

Inherited from: \ItemCollection::setWhereGroup()

Restricts a query with a where clause, groupable

Parameters
NameTypeDescription
$group
$field
$restriction
$operator

\FrontendGroupMember

Package: Default
Single FrontendGroup Item
Parent(s)
\Item
Author
Timo A. Hummel  
Copyright
four for business 2003  
Version
0.1  

Properties

>VPropertypublicarray $_arrInFilters = array('urlencode', 'conHtmlSpecialChars', 'addslashes')
inherited
Array storing the funcion names of the filters used when data is stored to the db
Inherited from: \Item::$$_arrInFilters
Default valuearray('urlencode', 'conHtmlSpecialChars', 'addslashes')Details
Type
array
Access
private  
Inherited_from
\Item::$$_arrInFilters  
>VPropertypublicarray $_arrOutFilters = array('stripslashes', 'htmldecode', 'urldecode')
inherited
Array storing the funcion names of the filters used when data is retrieved from the db
Inherited from: \Item::$$_arrOutFilters
Default valuearray('stripslashes', 'htmldecode', 'urldecode')Details
Type
array
Access
private  
Inherited_from
\Item::$$_arrOutFilters  
>VPropertypublic$_metaObject
inheritedInherited from: \Item::$$_metaObject
Details
Type
n/a
Inherited_from
\Item::$$_metaObject  
>VPropertypublicarray $cache
inherited
Cache the result items
Inherited from: \Item::$$cache
Details
Type
array
Access
private  
Inherited_from
\Item::$$cache  
>VPropertypublicobject $db
inherited
DB_Contenido instance
Inherited from: \Item::$$db
Details
Type
object
Access
private  
Inherited_from
\Item::$$db  
>VPropertypublicstring $lasterror
inherited
Storage of the last error
Inherited from: \Item::$$lasterror
Details
Type
string
Access
private  
Inherited_from
\Item::$$lasterror  
>VPropertypublicint $lifetime
inherited

Lifetime in seconds

Inherited from: \Item::$$lifetime
Details
Type
int
Access
private  
Inherited_from
\Item::$$lifetime  
>VPropertypublicarray $modifiedValues
inherited
Storage of the fields which were modified
Inherited from: \Item::$$modifiedValues
Details
Type
array
Access
private  
Inherited_from
\Item::$$modifiedValues  
>VPropertypublicstring $oldPrimaryKey
inherited
stores the old primary key, just in case somebody wants to change it
Inherited from: \Item::$$oldPrimaryKey
Details
Type
string
Access
private  
Inherited_from
\Item::$$oldPrimaryKey  
>VPropertypublicobject $primaryKey
inherited
Primary key of the table
Inherited from: \Item::$$primaryKey
Details
Type
object
Access
private  
Inherited_from
\Item::$$primaryKey  
>VPropertypublicobject $properties
inherited

PropertyCollection object

Inherited from: \Item::$$properties
Details
Type
object
Access
private  
Inherited_from
\Item::$$properties  
>VPropertypublicstring $table
inherited
Storage of the source table to use for the user informations
Inherited from: \Item::$$table
Details
Type
string
Access
private  
Inherited_from
\Item::$$table  
>VPropertypublicarray $values
inherited
Storage of the source table to use for the user informations
Inherited from: \Item::$$values
Details
Type
array
Access
private  
Inherited_from
\Item::$$values  
>VPropertypublicboolean $virgin
inherited
Checks for the virginity of this object.
Inherited from: \Item::$$virgin

If true, the object is virgin and no operations on it except load-Functions are allowed.

Details
Type
boolean
Access
private  
Inherited_from
\Item::$$virgin  

Methods

methodpublicFrontendGroupMember() : void

Constructor Function

methodpublicItem(string $table = "", string $primaryKey = "",  $lifetime = 10) : void
inherited

Constructor Function

Inherited from: \Item::Item()
Parameters
NameTypeDescription
$tablestring

The table to use as information source

$primaryKeystring

The primary key to use

$lifetime
methodpublic_inFilter(mixed $data) : mixed
inherited

Filters the passed data using the functions defines in the _arrInFilters array.

Inherited from: \Item::_inFilter()
Parameters
NameTypeDescription
$datamixed

Data to filter

Returns
TypeDescription
mixedFiltered data
Details
Access
private  
See
\setFilters  
methodpublic_onLoad() : \none
inherited

_onLoad ()

Inherited from: \Item::_onLoad()

Function which is called whenever an item is loaded. Inherited classes should override this function if desired.

Returns
TypeDescription
\none
methodpublic_outFilter(mixed $data) : mixed
inherited

Filters the passed data using the functions defines in the _arrOutFilters array.

Inherited from: \Item::_outFilter()
Parameters
NameTypeDescription
$datamixed

Data to filter

Returns
TypeDescription
mixedFiltered data
Details
Access
private  
See
\setFilters  
methodpublic_setMetaObject( $objectname) : void
inherited

Inherited from: \Item::_setMetaObject()
Parameters
NameTypeDescription
$objectname
methodpublicdeleteProperty(string $type, string $name) : void
inherited

deleteProperty ($type, $name) Deletes a custom property

Inherited from: \Item::deleteProperty()
Parameters
NameTypeDescription
$typestring

Specifies the type

$namestring

Specifies the name

methodpublicget(string $field) : mixed
inherited

get($field) Wrapper for getField (less to type)

Inherited from: \Item::get()
Parameters
NameTypeDescription
$fieldstring

Specifies the field to retrieve

Returns
TypeDescription
mixedValue of the field
methodpublicgetField(string $field) : mixed
inherited

getField($field) Gets the value of a specific field

Inherited from: \Item::getField()
Parameters
NameTypeDescription
$fieldstring

Specifies the field to retrieve

Returns
TypeDescription
mixedValue of the field
methodpublicgetMetaObject() : void
inherited

Inherited from: \Item::getMetaObject()
methodpublicgetProperty(string $type, string $name) : boolean
inherited

getProperty ($type, $name) Sets a custom property

Inherited from: \Item::getProperty()
Parameters
NameTypeDescription
$typestring

Specifies the type

$namestring

Specifies the name

Returns
TypeDescription
booleanValue of the given property
methodpublicloadBy(string $field, string $value, bool $bSafe = true) : bool
inherited

loadBy ($field, $value) Loads an item by colum/field from the database

Inherited from: \Item::loadBy()
Parameters
NameTypeDescription
$fieldstring

Specifies the field

$valuestring

Specifies the value

$bSafebool

use inFilter or not

Returns
TypeDescription
boolTrue if the load was successful
methodpublicloadByPrimaryKey(string $value) : bool
inherited

loadByPrimaryKey ($value) Loads an item by ID from the database

Inherited from: \Item::loadByPrimaryKey()
Parameters
NameTypeDescription
$valuestring

Specifies the primary key value

Returns
TypeDescription
boolTrue if the load was successful
methodpublicset(string $field, string $value,  $safe = true) : void
inherited

set($field, $value) Shortcut to setField

Inherited from: \Item::set()
Parameters
NameTypeDescription
$fieldstring

Specifies the field to set

$valuestring

Specifies the value to set

$safe
methodpublicsetField(string $field, string $value, boolean $safe = true) : void
inherited

setField($field, $value) Sets the value of a specific field

Inherited from: \Item::setField()
Parameters
NameTypeDescription
$fieldstring

Specifies the field to set

$valuestring

Specifies the value to set

$safeboolean

Speficies if we should translate characters

methodpublicsetFilters(array $arrInFilters = array(), array $arrOutFilters = array()) : void
inherited

Define the filter functions used when data is being stored or retrieved from the database.

Inherited from: \Item::setFilters()

Examples:

$obj->setFilters(array('addslashes'), array('stripslashes')); $obj->setFilters(array('htmlencode', 'addslashes'), array('stripslashes', 'htmlencode'));

Parameters
NameTypeDescription
$arrInFiltersarray

inFilters array with function names

$arrOutFiltersarray

outFilters array with function names

methodpublicsetProperty(string $type, string $name, string $value) : void
inherited

setProperty ($type, $name, $value) Sets a custom property

Inherited from: \Item::setProperty()
Parameters
NameTypeDescription
$typestring

Specifies the type

$namestring

Specifies the name

$valuestring

Specifies the value

methodpublicstore() : void
inherited

store() Stores the modified user object to the database

Inherited from: \Item::store()

\FrontendGroupMemberCollection

Package: Default
Frontend group member management class
Parent(s)
\ItemCollection
Author
Timo A. Hummel  
Copyright
four for business 2003  
Version
0.1  

Properties

>VPropertypublicarray $_JoinPartners
inherited

Reverse join partners for this data object

Inherited from: \ItemCollection::$$_JoinPartners
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_JoinPartners  
>VPropertypublicstring $_encoding
inherited

Encoding

Inherited from: \ItemCollection::$$_encoding
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$_encoding  
>VPropertypublicarray $_forwardJoinPartners
inherited

Forward join partners for this data object

Inherited from: \ItemCollection::$$_forwardJoinPartners
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_forwardJoinPartners  
>VPropertypublicarray $_groupConditions
inherited

Group conditions

Inherited from: \ItemCollection::$$_groupConditions
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_groupConditions  
>VPropertypublicarray $_innerGroupConditions = array()
inherited

Inner group conditions

Inherited from: \ItemCollection::$$_innerGroupConditions
Default valuearray()Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_innerGroupConditions  
>VPropertypublicstring $_itemClass
inherited

Single item class

Inherited from: \ItemCollection::$$_itemClass
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$_itemClass  
>VPropertypublicobject $_iteratorItem
inherited

Iterator object for the next() method

Inherited from: \ItemCollection::$$_iteratorItem
Details
Type
object
Access
private  
Inherited_from
\ItemCollection::$$_iteratorItem  
>VPropertypublicarray $_resultFields = array()
inherited

Result fields for the query

Inherited from: \ItemCollection::$$_resultFields
Default valuearray()Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_resultFields  
>VPropertypublicarray $_whereRestriction
inherited

Where restrictions for the query

Inherited from: \ItemCollection::$$_whereRestriction
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$_whereRestriction  
>VPropertypublicarray $cache
inherited
Cache the result items
Inherited from: \ItemCollection::$$cache
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$cache  
>VPropertypublicobject $db
inherited
DB_Contenido instance
Inherited from: \ItemCollection::$$db
Details
Type
object
Access
private  
Inherited_from
\ItemCollection::$$db  
>VPropertypublicstring $lasterror
inherited
Storage of the last error
Inherited from: \ItemCollection::$$lasterror
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$lasterror  
>VPropertypublicint $lifetime
inherited

Lifetime in seconds

Inherited from: \ItemCollection::$$lifetime
Details
Type
int
Access
private  
Inherited_from
\ItemCollection::$$lifetime  
>VPropertypublicstring $objects
inherited
Storage of all result items
Inherited from: \ItemCollection::$$objects
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$objects  
>VPropertypublicstring $primaryKey
inherited
Storage of the primary key
Inherited from: \ItemCollection::$$primaryKey
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$primaryKey  
>VPropertypublicarray $properties
inherited

Property collection

Inherited from: \ItemCollection::$$properties
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$properties  
>VPropertypublicstring $table
inherited
Storage of the source table to use for the information
Inherited from: \ItemCollection::$$table
Details
Type
string
Access
private  
Inherited_from
\ItemCollection::$$table  
>VPropertypublicarray $virgin
inherited

Is entry virgin?

Inherited from: \ItemCollection::$$virgin
Details
Type
array
Access
private  
Inherited_from
\ItemCollection::$$virgin  

Methods

methodpublicFrontendGroupMemberCollection() : void

Constructor Function

methodpublicItemCollection(string $table,  $primaryKey,  $lifetime = 10) : void
inherited

Constructor Function Note: Default lifetime is 10 seconds.

Inherited from: \ItemCollection::ItemCollection()
Parameters
NameTypeDescription
$tablestring

The table to use as information source

$primaryKey
$lifetime
methodpublic_buildGroupWhereStatements() : array
inherited

_buildGroupWhereStatements ()

Inherited from: \ItemCollection::_buildGroupWhereStatements()

Builds a where statement out of the setGroupWhere calls

Returns
TypeDescription
arraywith all where statements
methodpublic_buildWhereStatements() : array
inherited

_buildWhereStatements ()

Inherited from: \ItemCollection::_buildWhereStatements()

Builds a where statement out of the setWhere calls

Returns
TypeDescription
arraywith all where statements
methodpublic_fetchJoinTables(\none $ignore_root) : array
inherited

_fetchJoinTables ()

Inherited from: \ItemCollection::_fetchJoinTables()

Fetches all tables which will be joined later on.

The returned array has the following format:

array( array(fields), array(tables), array(joins), array(wheres) );

Notes: The table is the table name which needs to be added to the FROM clause The join statement which is inserted after the master table The where statement is combined with all other where statements The fields to select from

Parameters
NameTypeDescription
$ignore_root\none
Returns
TypeDescription
arraysee above
methodpublic_findReverseJoinPartner( $parentclass,  $classname) : void
Parameters
NameTypeDescription
$parentclass
$classname
methodpublic_initializeDriver( $bForceInit = false) : void
inherited

_initializeDriver: Initializes the driver to use with GenericDB.

Inherited from: \ItemCollection::_initializeDriver()
Parameters
NameTypeDescription
$bForceInit

boolean If true, forces the driver to initialize, even if it already exists.

methodpublic_recursiveStructuredFetch( $objects,  $array) : void
Parameters
NameTypeDescription
$objects
$array
methodpublic_resolveLinks() : void
inherited

Inherited from: \ItemCollection::_resolveLinks()
methodpublic_setItemClass(string $classname) : \none
inherited

_setItemClass: private method to set the accompanying item object.

Inherited from: \ItemCollection::_setItemClass()
Parameters
NameTypeDescription
$classnamestring

specifies the classname

Returns
TypeDescription
\none
methodpublic_setJoinPartner(string $foreignCollectionClass) : \none
inherited

_setJoinPartner: Defines the reverse links for this table.

Inherited from: \ItemCollection::_setJoinPartner()

Important: The class specified by $foreignCollectionClass needs to be a collection class and has to exist Define all links in the constructor of your object

Parameters
NameTypeDescription
$foreignCollectionClassstring

Specifies the foreign class to use

Returns
TypeDescription
\none
methodpublicaddResultField( $field) : void
inherited

Inherited from: \ItemCollection::addResultField()
Parameters
NameTypeDescription
$field
methodpubliccount() : integer
inherited

count () Returns the amount of returned items

Inherited from: \ItemCollection::count()
Returns
TypeDescription
integerNumber of rows
methodpubliccreate( $idfrontendgroup,  $idfrontenduser) : void

Creates a new association

Parameters
NameTypeDescription
$idfrontendgroup

int specifies the frontend group

$idfrontenduser

int specifies the frontend user

methodpublicdelete( $id) : void
inherited

delete() Deletes an item in the table.

Inherited from: \ItemCollection::delete()
Parameters
NameTypeDescription
$id
methodpublicdeleteWhere( $field,  $restriction,  $operator = "=") : void
inherited

deleteWhere ($field, $restriction, $operator)

Inherited from: \ItemCollection::deleteWhere()

Restricts a query with a where clause

Parameters
NameTypeDescription
$field
$restriction
$operator
methodpublicdeleteWhereGroup( $group,  $field,  $restriction,  $operator = "=") : void
inherited

deleteWhereGroup ($group, $field, $restriction, $operator)

Inherited from: \ItemCollection::deleteWhereGroup()

Restricts a query with a where clause, groupable

Parameters
NameTypeDescription
$group
$field
$restriction
$operator
methodpublicexists(integer $id) : boolean
inherited

exists ($id) Checks if a specific entry exists

Inherited from: \ItemCollection::exists()
Parameters
NameTypeDescription
$idinteger

The id to check for

Returns
TypeDescription
booleantrue if object exists, false if not
methodpublicfetchArray( $key,  $fields) : array
inherited

fetchArray() Fetches an array of fields from the database.

Inherited from: \ItemCollection::fetchArray()

Example: $i = $object->fetchArray("idartlang", array("idlang", "name"));

could result in: $i[5] = array("idlang" => 5, "name" => "My Article");

Important: If you don't pass an array for fields, the function doesn't create an array.

Parameters
NameTypeDescription
$key

string Name of the field to use for the key

$fields

mixed String or array

Returns
TypeDescription
arrayResulting array
methodpublicfetchObject( $class) : void
inherited

Inherited from: \ItemCollection::fetchObject()
Parameters
NameTypeDescription
$class
methodpublicfetchTable( $fields = array(),  $objects = array()) : void
inherited

Inherited from: \ItemCollection::fetchTable()
Parameters
NameTypeDescription
$fields
$objects
methodpublicflexSelect(string $distinct = "", string $from = "", string $where = "", string $group_by = "", string $order_by = "", string $limit = "") : array
inherited

flexSelect ($distinct = "", $from = "", $where = "", $group_by = "", $order_by = "", $limit = "") Selects all entries from the database and returns them as DBObject-objects to the user.

Inherited from: \ItemCollection::flexSelect()

Objects are loaded using their primary key.

Parameters
NameTypeDescription
$distinctstring

Specifies if distinct will be added to the SQL statement ($distinct !== "" -> DISTINCT)

$fromstring

Specifies the additional from clause (e.g. "con_news_groups AS groups, con_news_groupmembers AS groupmembers").

$wherestring

Specifies the where clause.

$group_bystring

Specifies the group by clause.

$order_bystring

Specifies the order by clause.

$limitstring

Specifies the limit by clause.

Returns
TypeDescription
arrayArray of DBObject-Objects
Details
Author
HerrB  
methodpublicgetUsersInGroup( $idfrontendgroup,  $asObjects = true) : array

Returns all users in a single group

Parameters
NameTypeDescription
$idfrontendgroup

int specifies the frontend group

$asObjects

boolean specifies if the function should return objects

Returns
TypeDescription
arrayFrontendUser items
methodpubliclink( $foreignClass) : void
inherited

sets the query to use foreign tables in the resultset

Inherited from: \ItemCollection::link()
Parameters
NameTypeDescription
$foreignClass
methodpublicloadItem( $itemID) : object

Loads an item by its ID (primary key)

Needs to be overridden by the extension class.

Parameters
NameTypeDescription
$itemID

integer Specifies the item ID to load

Returns
TypeDescription
objectThe newly created object
methodpublicnext() : object
inherited

next () Advances to the next item in the database.

Inherited from: \ItemCollection::next()
Returns
TypeDescription
objectThe next object, or false if no more objects
methodpublicquery() : void
inherited

Inherited from: \ItemCollection::query()
methodpublicqueryAndFetchStructured(\objects $objects) : array
inherited

fetchStructured Returns an array of arrays

Inherited from: \ItemCollection::queryAndFetchStructured()
Parameters
NameTypeDescription
$objects\objects

array with the correct order of the objects

Returns
TypeDescription
arrayresult
methodpublicremove( $idfrontendgroup,  $idfrontenduser) : void

Removes an association

Parameters
NameTypeDescription
$idfrontendgroup

int specifies the frontend group

$idfrontenduser

int specifies the frontend user

methodpublicremoveResultField( $field) : void
inherited

Inherited from: \ItemCollection::removeResultField()
Parameters
NameTypeDescription
$field
methodpublicresetQuery() : void
inherited

Inherited from: \ItemCollection::resetQuery()
methodpublicselect(string $where = "", string $group_by = "", string $order_by = "", string $limit = "") : array
inherited

select ($where = "", $group_by = "", $order_by = "", $limit = "") Selects all entries from the database and returns them as DBObject-objects to the user.

Inherited from: \ItemCollection::select()

Objects are loaded using their primary key.

Parameters
NameTypeDescription
$wherestring

Specifies the where clause.

$group_bystring

Specifies the group by clause.

$order_bystring

Specifies the order by clause.

$limitstring

Specifies the limit by clause.

Returns
TypeDescription
arrayArray of DBObject-Objects
methodpublicsetEncoding( $sEncoding) : void
inherited

Inherited from: \ItemCollection::setEncoding()
Parameters
NameTypeDescription
$sEncoding
methodpublicsetGroupCondition( $group1,  $group2,  $condition = "AND") : void
inherited

setGroupCondition ($group1, $group2, $condition)

Inherited from: \ItemCollection::setGroupCondition()

Defines how groups are linked to each other

Parameters
NameTypeDescription
$group1
$group2
$condition
methodpublicsetInnerGroupCondition( $group,  $condition = "AND") : void
inherited

setInnerGroupCondition ($group, $condition)

Inherited from: \ItemCollection::setInnerGroupCondition()

Defines how relations in one group are linked each together

Parameters
NameTypeDescription
$group
$condition
methodpublicsetLimit( $iRowStart,  $iRowCount) : void
inherited

Inherited from: \ItemCollection::setLimit()
Parameters
NameTypeDescription
$iRowStart
$iRowCount
methodpublicsetOrder( $order) : void
inherited

Inherited from: \ItemCollection::setOrder()
Parameters
NameTypeDescription
$order
methodpublicsetWhere( $field,  $restriction,  $operator = "=") : void
inherited

setWhere ($field, $restriction, $operator)

Inherited from: \ItemCollection::setWhere()

Restricts a query with a where clause

Parameters
NameTypeDescription
$field
$restriction
$operator
methodpublicsetWhereGroup( $group,  $field,  $restriction,  $operator = "=") : void
inherited

setWhereGroup ($group, $field, $restriction, $operator)

Inherited from: \ItemCollection::setWhereGroup()

Restricts a query with a where clause, groupable

Parameters
NameTypeDescription
$group
$field
$restriction
$operator
Documentation was generated by phpDocumentor 2.0.0a12.