contenido\classes\Contenido_Category\Contenido_Category.class.php
Description: Objects for Category handling.
Requirements:
- Author
- Rudi Bieller
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- {@internal created 2008-02-15 modified 2008-02-22 Contenido_Categories now implements Countable modified 2008-08-20 Removed unnecessary/redundant security fixes (typecasting is already done in getter methods) that were made during security fixing phase changed method setDebug() in Contenido_Category_Base to allow all debug modes available modified 2009-01-05 Bugfix in Contenido_Categories::load() Subcategories will be loaded only if set so. modified 2009-01-14 Removed duplicate row in sql select at method load() $Id: Contenido_Category.class.php 1218 2010-10-04 08:49:23Z timo.trautmann $: }}
- Package
- Contenido Backend classes
- Version
- 0.8.2
\Contenido_Categories
- Implements
- Parent(s)
- \Contenido_Category_Base
- Author
- Rudi Bieller
- Copyright
- four for business AG
{@internal created 2008-02-15 modified 2008-02-25 Implemented ArrayAccess; added methods reverse(), ksort() and krsort(). }} - Version
- 0.9.0
Properties


array $aCfg
- Type
- array
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$aCfg


boolean $bDbg
- Type
- boolean
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$bDbg


\obj $oDb
- Type
- \obj
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$oDb


\obj $oDbg
- Type
- \obj
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$oDbg


string $sDbgMode
- Type
- string
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$sDbgMode
Methods


__construct(\DB_Contenido $oDb, array $aCfg) : void
Constructor.
Name | Type | Description |
---|---|---|
$oDb | \DB_Contenido | |
$aCfg | array |
- Access
- public
- Author
- Rudi Bieller


add(\Contenido_Category $oContenidoCategory, int $iOffset = null) : void
Add a Contenido_Category object into internal array ("Collection")
Name | Type | Description |
---|---|---|
$oContenidoCategory | \Contenido_Category | |
$iOffset | int |
- Access
- public
- Author
- Rudi Bieller


count() : int
Interface method for Countable.
Type | Description |
---|---|
int |
- Access
- public
- Author
- Rudi Bieller


getIdLang() : int
Get internal property for Contenido-Idlang
Type | Description |
---|---|
int |
- Access
- public
- Author
- Rudi Bieller


getIterator() : \ArrayObject
Interface method for Iterator.
Type | Description |
---|---|
\ArrayObject |
- Access
- public
- Author
- Rudi Bieller


krsort() : void
Sort list of Contenido_Category objects by assigned key in reverse order
- Access
- public
- Author
- Rudi Bieller


ksort() : void
Sort list of Contenido_Category objects by assigned key
- Access
- public
- Author
- Rudi Bieller


load(array $aCategoryIds, boolean $bIncludeLanguage = false, int $iIdlang = -1) : void
Loads a range of Category-IDs.
Name | Type | Description |
---|---|---|
$aCategoryIds | array | |
$bIncludeLanguage | boolean | |
$iIdlang | int | If $bIncludeLanguage is set to true, you must set this value, too or use setIdLang() before! |
- Access
- public
- Author
- Rudi Bieller


offsetExists(int $mOffset) : boolean
Interface method for ArrayAccess.
Name | Type | Description |
---|---|---|
$mOffset | int |
Type | Description |
---|---|
boolean |
- Access
- public
- Author
- Rudi Bieller


offsetGet(int $mOffset) : \obj
Interface method for ArrayAccess.
Name | Type | Description |
---|---|---|
$mOffset | int |
Type | Description |
---|---|
\obj |
- Access
- public
- Author
- Rudi Bieller


offsetSet(int $mOffset, mixed $mValue) : void
Interface method for ArrayAccess.
Name | Type | Description |
---|---|---|
$mOffset | int | |
$mValue | mixed |
- Access
- public
- Author
- Rudi Bieller


offsetUnset(int $mOffset) : void
Interface method for ArrayAccess.
Name | Type | Description |
---|---|---|
$mOffset | int |
- Access
- public
- Author
- Rudi Bieller


reverse() : void
Sort list of Contenido_Category objects in reverse order
- Access
- public
- Author
- Rudi Bieller


setDebug(boolean $bDebug = true, string $sDebugMode = 'visible') : void
Set internal property for debugging on/off and choose appropriate debug object
Inherited from: \Contenido_Category_Base::setDebug()Name | Type | Description |
---|---|---|
$bDebug | boolean | |
$sDebugMode | string |
- Access
- public
- Author
- Rudi Bieller


setIdLang(int $iIdlang) : void
Set internal property for Contenido-Idlang
Name | Type | Description |
---|---|---|
$iIdlang | int |
- Access
- public
- Author
- Rudi Bieller
\Contenido_Category
- Parent(s)
- \Contenido_Category_Base
- Author
- Rudi Bieller
- Copyright
- four for business AG
{@internal created 2008-02-15 }} - Version
- 0.9.0
Properties


array $aCfg
- Type
- array
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$aCfg


boolean $bDbg
- Type
- boolean
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$bDbg


\obj $oDb
- Type
- \obj
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$oDb


\obj $oDbg
- Type
- \obj
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$oDbg


string $sDbgMode
- Type
- string
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$sDbgMode
Methods


__construct(\DB_Contenido $oDb, array $aCfg) : void
Constructor.
Name | Type | Description |
---|---|---|
$oDb | \DB_Contenido | |
$aCfg | array |
- Access
- public
- Author
- Rudi Bieller


_getSubCategories(int $iIdcat, boolean $bIncludeLanguage = false, int $iIdlang = -1) : \Contenido_Categories
Loads SubCategories depending on values for $this->bLoadSubCategories and $this->iSubCategoriesLoadDepth
Name | Type | Description |
---|---|---|
$iIdcat | int | |
$bIncludeLanguage | boolean | If set to true, also creates Contenido_Category_Language object |
$iIdlang | int | If $bIncludeLanguage is set to true, you must set this value, too or use setIdLang() before! |
Type | Description |
---|---|
\Contenido_Categories |
- Access
- private
- Author
- Rudi Bieller


_getSubCategoriesAsArray(int $iIdcat) : array
Return array with idcats of subcategories of given idcat
Name | Type | Description |
---|---|---|
$iIdcat | int |
Type | Description |
---|---|
array |
- Access
- private
- Author
- Rudi Bieller


load(int $iIdCat, boolean $bIncludeLanguage = false, int $iIdlang = -1) : boolean
Loads properties for a given idcat.
Optionally, also properties from catlang will be loaded into object.
Name | Type | Description |
---|---|---|
$iIdCat | int | |
$bIncludeLanguage | boolean | If set to true, also creates Contenido_Category_Language object |
$iIdlang | int | If $bIncludeLanguage is set to true, you must set this value, too or use setIdLang() before! |
Type | Description |
---|---|
boolean |
Exception | Description |
---|---|
\InvalidArgumentException | |
\Exception | TODO |
- Access
- public
- Author
- Rudi Bieller


setDebug(boolean $bDebug = true, string $sDebugMode = 'visible') : void
Set internal property for debugging on/off and choose appropriate debug object
Inherited from: \Contenido_Category_Base::setDebug()Name | Type | Description |
---|---|---|
$bDebug | boolean | |
$sDebugMode | string |
- Access
- public
- Author
- Rudi Bieller


setSubCategories(\Contenido_Categories $oCategories) : void
Set internal property with SubCategories of current Category
Name | Type | Description |
---|---|---|
$oCategories | \Contenido_Categories |
- Access
- public
- Author
- Rudi Bieller
\Contenido_Category_Base
- Children
- \Contenido_Category
- \Contenido_Categories
- \Contenido_Category_Language
- \Contenido_Category_Articles
- Author
- Rudi Bieller
- Copyright
- four for business AG
{@internal created 2008-02-15 }} - Version
- 0.9.0
Properties
Methods
\Contenido_Category_Language
- Parent(s)
- \Contenido_Category_Base
- Author
- Rudi Bieller
- Copyright
- four for business AG
{@internal created 2008-02-15 }} - Version
- 0.9.0
Properties


array $aCfg
- Type
- array
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$aCfg


boolean $bDbg
- Type
- boolean
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$bDbg


\obj $oDb
- Type
- \obj
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$oDb


\obj $oDbg
- Type
- \obj
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$oDbg


string $sDbgMode
- Type
- string
- Access
- protected
- Inherited_from
- \Contenido_Category_Base::$$sDbgMode
Methods


__construct(\DB_Contenido $oDb, array $aCfg) : void
Constructor.
Name | Type | Description |
---|---|---|
$oDb | \DB_Contenido | |
$aCfg | array |
- Access
- public
- Author
- Rudi Bieller


load(int $iIdCatLang = null) : boolean
Load cat_lang for a given idcat.
Name | Type | Description |
---|---|---|
$iIdCatLang | int |
Type | Description |
---|---|
boolean |
- Access
- public
- Author
- Rudi Bieller


setDebug(boolean $bDebug = true, string $sDebugMode = 'visible') : void
Set internal property for debugging on/off and choose appropriate debug object
Inherited from: \Contenido_Category_Base::setDebug()Name | Type | Description |
---|---|---|
$bDebug | boolean | |
$sDebugMode | string |
- Access
- public
- Author
- Rudi Bieller