contenido\classes\class.purge.php

Show: PublicProtectedPrivateinherited
Table of Contents
Description: Contenido Purge class to reset some datas and files.
Author
Munkh-Ulzii Balidar  
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.8.12 $Id:  
Version
1.0.0  

\Purge

Package: Default
class Purge

Properties

>VPropertyprivatearray $aCronjobFileTypes
Details
Type
array
>VPropertyprivatearray $aLogFileTypes
Details
Type
array
>VPropertyprivate\$cfg $cfg
Details
Type
\$cfg
>VPropertyprivate\$cfgClient $cfgClient
Details
Type
\$cfgClient
>VPropertyprivate\$oDb $oDb
Details
Type
\$oDb
>VPropertyprivatestring $sDefaultCacheDir = 'cache/'
Default value'cache/'Details
Type
string
>VPropertyprivatestring $sDefaultCronjobDir = 'cronjobs/'
Default value'cronjobs/'Details
Type
string
>VPropertyprivatestring $sDefaultLogDir = 'logs/'
Default value'logs/'Details
Type
string
>VPropertyprivatestring $sDefaultVersionDir = 'version/'
Default value'version/'Details
Type
string

Methods

methodpublic__construct(object $db, array $cfg, array $cfgClient) : void

Constructor of class

Parameters
NameTypeDescription
$dbobject
$cfgarray
$cfgClientarray
methodpublicclearClientCache( $iClientId,  $sCacheDir = 'cache/') : boolean

Clear the cache directory for a client

Parameters
NameTypeDescription
$iClientId
$sCacheDir
Returns
TypeDescription
boolean
methodpublicclearClientHistory( $iClientId,  $bKeep,  $iFileNumber,  $sVersionDir = 'version/') : boolean

Clear the cache directory for a client

Parameters
NameTypeDescription
$iClientId
$bKeep
$iFileNumber
$sVersionDir
Returns
TypeDescription
boolean
methodpublicclearClientLog(int $iClientId, string $sLogDir = 'logs/') : boolean

Clear client log file

Parameters
NameTypeDescription
$iClientIdint
$sLogDirstring
Returns
TypeDescription
boolean
methodpublicclearConCache( $sCacheDir = 'cache/') : boolean

Clear the cache directory for a client

Parameters
NameTypeDescription
$sCacheDir
Returns
TypeDescription
boolean
methodpublicclearConCronjob( $sCronjobDir = 'cronjobs/') : boolean

Clear contenido log files

Parameters
NameTypeDescription
$sCronjobDir
Returns
TypeDescription
boolean
methodpublicclearConLog(string $sLogDir = 'logs/') : boolean

Clear contenido log files

Parameters
NameTypeDescription
$sLogDirstring
Returns
TypeDescription
boolean
methodpublicclearDir(string $sDirPath, string $sTmpDirPath, boolean $bKeep = false, array $aTmpFileList = array()) : boolean

Delete all files and sub directories in a directory

Parameters
NameTypeDescription
$sDirPathstring
$sTmpDirPathstring
  • root directory not deleted
$bKeepboolean
$aTmpFileListarray
  • files are temporarily saved
Returns
TypeDescription
boolean
methodpublicemptyFile( $sDirPath,  $aTypes) : boolean

Empty a file content

Parameters
NameTypeDescription
$sDirPath
$aTypes
Returns
TypeDescription
boolean
methodpublicgetClientDir(int $iClientId) : string

Get frontend directory name for a client

Parameters
NameTypeDescription
$iClientIdint
Returns
TypeDescription
string$sClientDir
methodpublicresetClientConCatArt(int $iClientId) : boolean

Reset the table con_cat_art for a client

Parameters
NameTypeDescription
$iClientIdint
Returns
TypeDescription
boolean
methodpublicresetClientConCode(int $iClientId) : boolean

Reset the table con_code for a client

Parameters
NameTypeDescription
$iClientIdint
Returns
TypeDescription
boolean
methodpublicresetConInuse() : boolean

Reset the table con_inuse

Returns
TypeDescription
boolean
methodpublicresetPHPLibActiveSession() : boolean

Reset the table con_phplib_active_sessions

Returns
TypeDescription
boolean
methodpublicresetUnusedSession() : boolean

Reset the table con_inuse

Returns
TypeDescription
boolean
methodpublicsetCronjobFileTypes(array $aTypes) : void

Set cronjob file types

Parameters
NameTypeDescription
$aTypesarray
methodpublicsetLogFileTypes(array $aTypes) : void

Set log file types

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