contenido\classes\Contenido_Category\Contenido_Category.class.php

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

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

Package: Default
Implementation of a "Collection" of 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

>VPropertyprotectedarray $aCfg
inherited
Inherited from: \Contenido_Category_Base::$$aCfg
Details
Type
array
Access
protected  
Inherited_from
\Contenido_Category_Base::$$aCfg  
>VPropertyprotectedarray $aContenidoCategories
Details
Type
array
Access
protected  
>VPropertyprotectedboolean $bDbg
inherited
Inherited from: \Contenido_Category_Base::$$bDbg
Details
Type
boolean
Access
protected  
Inherited_from
\Contenido_Category_Base::$$bDbg  
>VPropertyprotectedboolean $bLoadSubCategories
Details
Type
boolean
Access
protected  
>VPropertyprotectedint $iIdLang
Details
Type
int
Access
protected  
>VPropertyprotectedint $iSubCategoriesLoadDepth
Details
Type
int
Access
protected  
>VPropertyprotected\obj $oDb
inherited
Inherited from: \Contenido_Category_Base::$$oDb
Details
Type
\obj
Access
protected  
Inherited_from
\Contenido_Category_Base::$$oDb  
>VPropertyprotected\obj $oDbg
inherited
Inherited from: \Contenido_Category_Base::$$oDbg
Details
Type
\obj
Access
protected  
Inherited_from
\Contenido_Category_Base::$$oDbg  
>VPropertyprotectedstring $sDbgMode
inherited
Inherited from: \Contenido_Category_Base::$$sDbgMode
Details
Type
string
Access
protected  
Inherited_from
\Contenido_Category_Base::$$sDbgMode  

Methods

methodpublic__construct(\DB_Contenido $oDb, array $aCfg) : void

Constructor.

Parameters
NameTypeDescription
$oDb\DB_Contenido
$aCfgarray
Details
Access
public  
Author
Rudi Bieller  
methodpublicadd(\Contenido_Category $oContenidoCategory, int $iOffset = null) : void

Add a Contenido_Category object into internal array ("Collection")

Parameters
NameTypeDescription
$oContenidoCategory\Contenido_Category
$iOffsetint
Details
Access
public  
Author
Rudi Bieller  
methodpubliccount() : int

Interface method for Countable.

Returns
TypeDescription
int
Details
Access
public  
Author
Rudi Bieller  
methodpublicgetIdLang() : int

Get internal property for Contenido-Idlang

Returns
TypeDescription
int
Details
Access
public  
Author
Rudi Bieller  
methodpublicgetIterator() : \ArrayObject

Interface method for Iterator.

Returns
TypeDescription
\ArrayObject
Details
Access
public  
Author
Rudi Bieller  
methodpublickrsort() : void

Sort list of Contenido_Category objects by assigned key in reverse order

Details
Access
public  
Author
Rudi Bieller  
methodpublicksort() : void

Sort list of Contenido_Category objects by assigned key

Details
Access
public  
Author
Rudi Bieller  
methodpublicload(array $aCategoryIds, boolean $bIncludeLanguage = false, int $iIdlang = -1) : void

Loads a range of Category-IDs.

Parameters
NameTypeDescription
$aCategoryIdsarray
$bIncludeLanguageboolean
$iIdlangint

If $bIncludeLanguage is set to true, you must set this value, too or use setIdLang() before!

Details
Access
public  
Author
Rudi Bieller  
methodpublicoffsetExists(int $mOffset) : boolean

Interface method for ArrayAccess.

Parameters
NameTypeDescription
$mOffsetint
Returns
TypeDescription
boolean
Details
Access
public  
Author
Rudi Bieller  
methodpublicoffsetGet(int $mOffset) : \obj

Interface method for ArrayAccess.

Parameters
NameTypeDescription
$mOffsetint
Returns
TypeDescription
\obj
Details
Access
public  
Author
Rudi Bieller  
methodpublicoffsetSet(int $mOffset, mixed $mValue) : void

Interface method for ArrayAccess.

Parameters
NameTypeDescription
$mOffsetint
$mValuemixed
Details
Access
public  
Author
Rudi Bieller  
methodpublicoffsetUnset(int $mOffset) : void

Interface method for ArrayAccess.

Parameters
NameTypeDescription
$mOffsetint
Details
Access
public  
Author
Rudi Bieller  
methodpublicreverse() : void

Sort list of Contenido_Category objects in reverse order

Details
Access
public  
Author
Rudi Bieller  
methodpublicsetDebug(boolean $bDebug = true, string $sDebugMode = 'visible') : void
inherited

Set internal property for debugging on/off and choose appropriate debug object

Inherited from: \Contenido_Category_Base::setDebug()
Parameters
NameTypeDescription
$bDebugboolean
$sDebugModestring
Details
Access
public  
Author
Rudi Bieller  
methodpublicsetIdLang(int $iIdlang) : void

Set internal property for Contenido-Idlang

Parameters
NameTypeDescription
$iIdlangint
Details
Access
public  
Author
Rudi Bieller  
methodpublicsetloadSubCategories(boolean $bLoad = false, int $iLoadDepth = 0) : void

If you need to load SubCategories, set to true and set how deep SubCategories should be loaded

Parameters
NameTypeDescription
$bLoadboolean
$iLoadDepthint
Details
Access
public  
Author
Rudi Bieller  

\Contenido_Category

Package: Default
Implementation of a 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

>VPropertyprivate\obj $_oDb

DB_Contenido

Details
Type
\obj
Access
private  
>VPropertyprotectedarray $aCfg
inherited
Inherited from: \Contenido_Category_Base::$$aCfg
Details
Type
array
Access
protected  
Inherited_from
\Contenido_Category_Base::$$aCfg  
>VPropertyprotectedboolean $bDbg
inherited
Inherited from: \Contenido_Category_Base::$$bDbg
Details
Type
boolean
Access
protected  
Inherited_from
\Contenido_Category_Base::$$bDbg  
>VPropertyprotectedboolean $bHasSubCategories
Details
Type
boolean
Access
protected  
>VPropertyprotectedboolean $bLoadSubCategories
Details
Type
boolean
Access
protected  
>VPropertyprotectedint $iCurrentSubCategoriesLoadDepth
Details
Type
int
Access
protected  
>VPropertyprotected$iIdCat
Details
Type
n/a
>VPropertyprotected$iIdClient
Details
Type
n/a
>VPropertyprotectedint $iIdLang
Details
Type
int
Access
protected  
>VPropertyprotected$iIdParent
Details
Type
n/a
>VPropertyprotected$iIdPost
Details
Type
n/a
>VPropertyprotected$iIdPre
Details
Type
n/a
>VPropertyprotected$iStatus
Details
Type
n/a
>VPropertyprotectedint $iSubCategoriesLoadDepth
Details
Type
int
Access
protected  
>VPropertyprotected\obj $oCategoryLanguage
Details
Type
\obj
Access
protected  
>VPropertyprotected\obj $oDb
inherited
Inherited from: \Contenido_Category_Base::$$oDb
Details
Type
\obj
Access
protected  
Inherited_from
\Contenido_Category_Base::$$oDb  
>VPropertyprotected\obj $oDbg
inherited
Inherited from: \Contenido_Category_Base::$$oDbg
Details
Type
\obj
Access
protected  
Inherited_from
\Contenido_Category_Base::$$oDbg  
>VPropertyprotected\obj $oSubCategories
Details
Type
\obj
Access
protected  
>VPropertyprotected$sAuthor
Details
Type
n/a
>VPropertyprotected$sCreated
Details
Type
n/a
>VPropertyprotectedstring $sDbgMode
inherited
Inherited from: \Contenido_Category_Base::$$sDbgMode
Details
Type
string
Access
protected  
Inherited_from
\Contenido_Category_Base::$$sDbgMode  
>VPropertyprotected$sModified
Details
Type
n/a

Methods

methodpublic__construct(\DB_Contenido $oDb, array $aCfg) : void

Constructor.

Parameters
NameTypeDescription
$oDb\DB_Contenido
$aCfgarray
Details
Access
public  
Author
Rudi Bieller  
methodprivate_getSubCategories(int $iIdcat, boolean $bIncludeLanguage = false, int $iIdlang = -1) : \Contenido_Categories

Loads SubCategories depending on values for $this->bLoadSubCategories and $this->iSubCategoriesLoadDepth

Parameters
NameTypeDescription
$iIdcatint
$bIncludeLanguageboolean

If set to true, also creates Contenido_Category_Language object

$iIdlangint

If $bIncludeLanguage is set to true, you must set this value, too or use setIdLang() before!

Returns
TypeDescription
\Contenido_Categories
Details
Access
private  
Author
Rudi Bieller  
methodprivate_getSubCategoriesAsArray(int $iIdcat) : array

Return array with idcats of subcategories of given idcat

Parameters
NameTypeDescription
$iIdcatint
Returns
TypeDescription
array
Details
Access
private  
Author
Rudi Bieller  
methodpublicgetAuthor() : void

methodpublicgetCategoryLanguage() : void

methodpublicgetDateCreated() : void

methodpublicgetDateModified() : void

methodpublicgetIdCat() : void

methodpublicgetIdClient() : void

methodpublicgetIdLang() : void

methodpublicgetIdParent() : void

methodpublicgetIdPost() : void

methodpublicgetIdPre() : void

methodpublicgetStatus() : void

methodpublicgetSubCategories() : void

methodpublicload(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.

Parameters
NameTypeDescription
$iIdCatint
$bIncludeLanguageboolean

If set to true, also creates Contenido_Category_Language object

$iIdlangint

If $bIncludeLanguage is set to true, you must set this value, too or use setIdLang() before!

Returns
TypeDescription
boolean
Throws
ExceptionDescription
\InvalidArgumentException
\ExceptionTODO
Details
Access
public  
Author
Rudi Bieller  
methodpublicsetAuthor( $sAuthor) : void

Parameters
NameTypeDescription
$sAuthor
methodpublicsetCategoryLanguage( $oCatLang) : void

Parameters
NameTypeDescription
$oCatLang
methodpublicsetDateCreated( $sDateCreated) : void

Parameters
NameTypeDescription
$sDateCreated
methodpublicsetDateModified( $sDateModified) : void

Parameters
NameTypeDescription
$sDateModified
methodpublicsetDebug(boolean $bDebug = true, string $sDebugMode = 'visible') : void
inherited

Set internal property for debugging on/off and choose appropriate debug object

Inherited from: \Contenido_Category_Base::setDebug()
Parameters
NameTypeDescription
$bDebugboolean
$sDebugModestring
Details
Access
public  
Author
Rudi Bieller  
methodpublicsetIdCat( $iIdcat) : void

Parameters
NameTypeDescription
$iIdcat
methodpublicsetIdClient( $iIdcient) : void

Parameters
NameTypeDescription
$iIdcient
methodpublicsetIdLang( $iIdlang) : void

Parameters
NameTypeDescription
$iIdlang
methodpublicsetIdParent( $iIdcatParent) : void

Parameters
NameTypeDescription
$iIdcatParent
methodpublicsetIdPost( $iIdcatPost) : void

Parameters
NameTypeDescription
$iIdcatPost
methodpublicsetIdPre( $iIdcatPre) : void

Parameters
NameTypeDescription
$iIdcatPre
methodpublicsetStatus( $iStatus) : void

Parameters
NameTypeDescription
$iStatus
methodpublicsetSubCategories(\Contenido_Categories $oCategories) : void

Set internal property with SubCategories of current Category

Parameters
NameTypeDescription
$oCategories\Contenido_Categories
Details
Access
public  
Author
Rudi Bieller  
methodpublicsetloadSubCategories(boolean $bLoad = false, int $iLoadDepth = 0) : void

If you need to load SubCategories, set to true and set how deep SubCategories should be loaded

Parameters
NameTypeDescription
$bLoadboolean
$iLoadDepthint
Details
Access
public  
Author
Rudi Bieller  

\Contenido_Category_Base

Package: Default
Base class for Contenido_Category, Contenido_Categories, Contenido_Category_Language.
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

>VPropertyprotectedarray $aCfg
Details
Type
array
Access
protected  
>VPropertyprotectedboolean $bDbg
Details
Type
boolean
Access
protected  
>VPropertyprotected\obj $oDb
Details
Type
\obj
Access
protected  
>VPropertyprotected\obj $oDbg
Details
Type
\obj
Access
protected  
>VPropertyprotectedstring $sDbgMode
Details
Type
string
Access
protected  

Methods

methodpublic__construct(\DB_Contenido $oDb, array $aCfg) : void

Constructor.

Parameters
NameTypeDescription
$oDb\DB_Contenido
$aCfgarray
Details
Access
public  
Author
Rudi Bieller  
methodpublicsetDebug(boolean $bDebug = true, string $sDebugMode = 'visible') : void

Set internal property for debugging on/off and choose appropriate debug object

Parameters
NameTypeDescription
$bDebugboolean
$sDebugModestring
Details
Access
public  
Author
Rudi Bieller  

\Contenido_Category_Language

Package: Default
Implementation of a Contenido Category for a given Contenido Language.
Parent(s)
\Contenido_Category_Base
Author
Rudi Bieller  
Copyright
four for business AG {@internal created 2008-02-15 }}  
Version
0.9.0  

Properties

>VPropertyprotectedarray $aCfg
inherited
Inherited from: \Contenido_Category_Base::$$aCfg
Details
Type
array
Access
protected  
Inherited_from
\Contenido_Category_Base::$$aCfg  
>VPropertyprotectedboolean $bDbg
inherited
Inherited from: \Contenido_Category_Base::$$bDbg
Details
Type
boolean
Access
protected  
Inherited_from
\Contenido_Category_Base::$$bDbg  
>VPropertyprotected$iIdCat
Details
Type
n/a
>VPropertyprotected$iIdCatlang
Details
Type
n/a
>VPropertyprotected$iIdLang
Details
Type
n/a
>VPropertyprotected$iIdTplcfg
Details
Type
n/a
>VPropertyprotected$iPublic
Details
Type
n/a
>VPropertyprotectedint $iStartIdartlang
Details
Type
int
Access
protected  
>VPropertyprotected$iStatus
Details
Type
n/a
>VPropertyprotected$iVisible
Details
Type
n/a
>VPropertyprotected\obj $oDb
inherited
Inherited from: \Contenido_Category_Base::$$oDb
Details
Type
\obj
Access
protected  
Inherited_from
\Contenido_Category_Base::$$oDb  
>VPropertyprotected\obj $oDbg
inherited
Inherited from: \Contenido_Category_Base::$$oDbg
Details
Type
\obj
Access
protected  
Inherited_from
\Contenido_Category_Base::$$oDbg  
>VPropertyprotected$sAlias
Details
Type
n/a
>VPropertyprotected$sAuthor
Details
Type
n/a
>VPropertyprotected$sDateCreated
Details
Type
n/a
>VPropertyprotected$sDateModified
Details
Type
n/a
>VPropertyprotectedstring $sDbgMode
inherited
Inherited from: \Contenido_Category_Base::$$sDbgMode
Details
Type
string
Access
protected  
Inherited_from
\Contenido_Category_Base::$$sDbgMode  
>VPropertyprotectedstring $sName
Details
Type
string
Access
protected  
>VPropertyprotectedstring $sUrlname
Details
Type
string
Access
protected  

Methods

methodpublic__construct(\DB_Contenido $oDb, array $aCfg) : void

Constructor.

Parameters
NameTypeDescription
$oDb\DB_Contenido
$aCfgarray
Details
Access
public  
Author
Rudi Bieller  
methodpublicgetAlias() : void

methodpublicgetAuthor() : void

methodpublicgetDateCreated() : void

methodpublicgetDateLastModified() : void

methodpublicgetIdCat() : void

methodpublicgetIdCatLang() : void

methodpublicgetIdLang() : void

methodpublicgetIdTemplateConfig() : void

methodpublicgetName() : void

methodpublicgetPublic() : void

methodpublicgetStartIdLang() : void

methodpublicgetStatus() : void

methodpublicgetUrlName() : void

methodpublicgetVisible() : void

methodpublicload(int $iIdCatLang = null) : boolean

Load cat_lang for a given idcat.

Parameters
NameTypeDescription
$iIdCatLangint
Returns
TypeDescription
boolean
Details
Access
public  
Author
Rudi Bieller  
methodpublicsetAlias( $sAlias) : void

Parameters
NameTypeDescription
$sAlias
methodpublicsetAuthor( $sAuthor) : void

Parameters
NameTypeDescription
$sAuthor
methodpublicsetDateCreated( $sDateCreated) : void

Parameters
NameTypeDescription
$sDateCreated
methodpublicsetDateLastModified( $sDateLastModified) : void

Parameters
NameTypeDescription
$sDateLastModified
methodpublicsetDebug(boolean $bDebug = true, string $sDebugMode = 'visible') : void
inherited

Set internal property for debugging on/off and choose appropriate debug object

Inherited from: \Contenido_Category_Base::setDebug()
Parameters
NameTypeDescription
$bDebugboolean
$sDebugModestring
Details
Access
public  
Author
Rudi Bieller  
methodpublicsetIdCat( $iIdcat) : void

Parameters
NameTypeDescription
$iIdcat
methodpublicsetIdCatLang( $iIdcatlang) : void

Parameters
NameTypeDescription
$iIdcatlang
methodpublicsetIdLang( $iIdlang) : void

Parameters
NameTypeDescription
$iIdlang
methodpublicsetIdTemplateConfig( $iIdTplcfg) : void

Parameters
NameTypeDescription
$iIdTplcfg
methodpublicsetName( $sName) : void

Parameters
NameTypeDescription
$sName
methodpublicsetPublic( $iPublic) : void

Parameters
NameTypeDescription
$iPublic
methodpublicsetStartIdLang( $iStartIdlang) : void

Parameters
NameTypeDescription
$iStartIdlang
methodpublicsetStatus( $iStatus) : void

Parameters
NameTypeDescription
$iStatus
methodpublicsetUrlName( $sUrlName) : void

Parameters
NameTypeDescription
$sUrlName
methodpublicsetVisible( $iVisible) : void

Parameters
NameTypeDescription
$iVisible
Documentation was generated by phpDocumentor 2.0.0a12.