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) : voidConstructor.
| Name | Type | Description |
|---|---|---|
| $oDb | \DB_Contenido | |
| $aCfg | array |
- Access
- public
- Author
- Rudi Bieller

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

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

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

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

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

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

load(array $aCategoryIds, boolean $bIncludeLanguage = false, int $iIdlang = -1) : voidLoads 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) : booleanInterface method for ArrayAccess.
| Name | Type | Description |
|---|---|---|
| $mOffset | int |
| Type | Description |
|---|---|
| boolean |
- Access
- public
- Author
- Rudi Bieller

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

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

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

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

setDebug(boolean $bDebug = true, string $sDebugMode = 'visible') : voidSet 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) : voidSet 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) : voidConstructor.
| Name | Type | Description |
|---|---|---|
| $oDb | \DB_Contenido | |
| $aCfg | array |
- Access
- public
- Author
- Rudi Bieller

_getSubCategories(int $iIdcat, boolean $bIncludeLanguage = false, int $iIdlang = -1) : \Contenido_CategoriesLoads 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) : arrayReturn 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) : booleanLoads 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') : voidSet 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) : voidSet 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) : voidConstructor.
| Name | Type | Description |
|---|---|---|
| $oDb | \DB_Contenido | |
| $aCfg | array |
- Access
- public
- Author
- Rudi Bieller

load(int $iIdCatLang = null) : booleanLoad 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') : voidSet 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