Class Pxxo

Description

Classe principale : Elle donne à tous les objets la notion de cache, de trace et de bench.

Located in /Pxxo.php (line 77)


	
			
Direct descendents
Class Description
Pxxo_Buffers Classe permet de stocker des Objets Pxxo_Buffers
Pxxo_Widget Classe mère de tous les widgets
Pxxo_Buffer Classe permet de gérer l'accès à des flux de données Un flux est par exemple une chaine de caractère, un fichier, mais cela pourait être une base de données, une zone mémoire, peu importe...
Pxxo_Xslt Encapsule une transformation XSL
Variable Summary
Benchmark_Timer $_bench
Zend_Cache $_cache
boolean $_caching
string $_debugging
integer $_idcache
array $_ids
integer $_levelcache
Method Summary
Pxxo __construct ()
void addCacheID (... 0)
void addCacheLevel (integer $level)
void cleanCache ()
void copyto (Pxxo $obj)
void delinCache ([string $id = null])
void disableCache ()
void disableDebug ()
void enableCache ()
void enableDebug ()
string getCacheID ()
void getCacheLevel (integer 0)
Zend_Cache getCacheObject ()
mixed getCacheOption ( $n)
mixed getDebugOption ( $n)
mixed getinCache (string $id, [string $level = P_C_USER])
void initCache ()
boolean isCaching ()
boolean isDebugging ()
void resetCache ()
void resetCacheID ()
void setBenchmarkProfiler (object $obj)
void setBenchmarkTimer (object $obj)
void setCacheID (mixed $i)
void setCacheLevel (integer $level)
void setCacheObject (Zend_Cache $obj)
void setCacheOption (string $n, string $v)
void setCacheOptions (array $a)
void setDebugOption (string $n, string $v)
mixed setinCache (string $dta, string $id,  $level)
void testCacheLevel (string $level)
void testinCache ([string $id = null])
void traceDebug (string $msg)
Variables
Benchmark_Timer $_bench = array('timer'=>null, 'profiler'=>null) (line 145)

Objet bench

  • access: protected
Zend_Cache $_cache = null (line 103)

Objet cache

  • access: private
array $_cache_options = array() (line 108)

Options du cache

  • access: private
array $_cache_options_default = array(
// Pxxo
'convertStringType' => 'strval',
'convertNumericType' => 'strval',
'convertArrayType' => 'array_md5',
'stats' => false,
'hits' => 'cache.hits',
'misses' => 'cache.misses',
'entries' => 'cache.entries',
'mode' => 'normal', // (normal | refresh | force | ignore)
'backend' => 'auto', // auto | File | APC
'frontendCore' => array(
'lifeTime' => 3600,
'logging' => false,
'write_control' => false,
'automatic_serialization' => false,
'automatic_cleaning_factor' => 100,
),'backendFile'=>array('cache_dir'=>'/tmp','file_locking'=>false,'read_control'=>true,'read_control_type'=>'strlen','hashed_directory_level'=>2,'file_name_prefix'=>'pxxo_cache',),'backendAPC'=>array(),)
(line 113)

Options du cache par défaut

  • access: private
boolean $_caching = null (line 84)

Cache actif ou non

  • access: private
string $_debugging = false (line 150)

mode debug actif ou non

  • access: private
array $_debug_options = array() (line 155)

Options pour le mode debug

  • access: private
array $_debug_options_default = array(
'filter' => 'cpnt', // Permet d'obtenir une regex prédéfinie : all, cpnt, none
'regex' => '', // Expression régulière permettant de filtrer les messages de trace
'show' => 'tree', // type d'affichage : tree, plain
'output' => 'html', // type de sortie : html, text, firebug
)
(line 160)

Options du cache par défaut

  • access: private
integer $_idcache = 0 (line 94)

Identifiant interne pour gérer le cache

  • access: private
array $_ids = array() (line 98)
  • var: tableau permettant de calculer un identifiant unique pour chaque action
  • access: private
integer $_levelcache (line 89)

Niveau de cache

  • access: private
Methods
Constructor __construct (line 171)

Constructeur

Pxxo __construct ()

Redefined in descendants as:
addCacheID (line 547)

Ajoute une ou plusierus valeurs discrimiantes pour le caclul de l'identifiant de cache

  • access: public
void addCacheID (... 0)
  • ... 0
addCacheLevel (line 340)

ajout un niveau du cache

  • access: public
void addCacheLevel (integer $level)
  • integer $level
cleanCache (line 421)

Supprime le cache courant

  • access: public
void cleanCache ()
copyto (line 715)

Methode permettant de copier les variables internes de l'objet vers un une autre instance du même type

  • access: public
void copyto (Pxxo $obj)
delinCache (line 511)

Supprime le cache courant relatif à un id

  • access: public
void delinCache ([string $id = null])
  • string $id: ID
disableCache (line 287)

désactive la mise en cache

  • access: public
void disableCache ()
disableDebug (line 193)

désactive le mode debug

  • access: public
void disableDebug ()
enableCache (line 278)

mise en route du cache

  • access: public
  • uses: Zend_Cache
void enableCache ()

Redefined in descendants as:
enableDebug (line 184)

active le mode debug

  • access: public
void enableDebug ()
getCacheID (line 438)

Retroune l'identifiant de cache courant Au passage on le calcul

  • access: public
string getCacheID ()
getCacheLevel (line 352)

retourne le niveau du cache

  • access: public
void getCacheLevel (integer 0)
  • integer 0
getCacheObject (line 589)

retourne l'objet cache utilisé

  • access: public
Zend_Cache getCacheObject ()
getCacheOption (line 600)

retourne la valeur d'une option du cache

  • access: public
mixed getCacheOption ( $n)
  • $n
getDebugOption (line 666)

retourne la valeur d'une option du debugging

  • access: public
mixed getDebugOption ( $n)
  • $n
getinCache (line 458)

recupere les données stockés dans le cache

  • return: DATA
  • access: public
mixed getinCache (string $id, [string $level = P_C_USER])
  • string $id: ID
  • string $level: LEVEL niveau de cache
initCache (line 392)

Création de l'objet de getsion du cache

  • access: protected
void initCache ()
isCaching (line 304)

Le cache est-il actif

true : le cache a été activé false : le cache a été désactivé null : le cache n' apas été réglé

  • return: true / false / null
  • access: public
boolean isCaching ()
isDebugging (line 315)

Le mode debug est-il actif

  • access: public
boolean isDebugging ()
resetCache (line 412)

Réinitilaise le cache (utile quand on a modifié en cours de route le paramètrage)

  • access: public
void resetCache ()
resetCacheID (line 383)

RAZ de l'identifiant de cache

  • access: public
void resetCacheID ()
setBenchmarkProfiler (line 705)

affection du profiler

  • see: Benchmark_Profiler
  • access: public
void setBenchmarkProfiler (object $obj)
  • object $obj
setBenchmarkTimer (line 694)

affection du timer

  • see: Benchmark_Timer
  • access: public
void setBenchmarkTimer (object $obj)
  • object $obj
setCacheID (line 374)

Choisir un identifiant de cache

  • access: public
void setCacheID (mixed $i)
  • mixed $i
setCacheLevel (line 326)

Changer le niveau du cache

  • access: public
void setCacheLevel (integer $level)
  • integer $level
setCacheObject (line 578)

Fixe une objet de cache spécifique

  • access: public
void setCacheObject (Zend_Cache $obj)
  • Zend_Cache $obj
setCacheOption (line 634)

fixe une option du cache

  • access: public
void setCacheOption (string $n, string $v)
  • string $n: nom
  • string $v: valeur
setCacheOptions (line 655)

fixe les options du cache si le cache a déjà été activé on en recrée un

  • access: public
void setCacheOptions (array $a)
  • array $a
setDebugOption (line 683)

fixe une option du debugging

  • access: public
void setDebugOption (string $n, string $v)
  • string $n: nom
  • string $v: valeur
setinCache (line 488)

stocke des données dans le cache

  • access: public
mixed setinCache (string $dta, string $id,  $level)
  • string $dta: ID
  • string $id: LEVEL niveau de cache
  • $level
testCacheLevel (line 363)

permet de savoir si un niveau de cache est actif

void testCacheLevel (string $level)
  • string $level
testinCache (line 528)

Test la présence dans le cache d'un id

  • access: public
void testinCache ([string $id = null])
  • string $id: ID
traceDebug (line 204)

Affichage d'un message de trace de Debug

  • access: public
void traceDebug (string $msg)
  • string $msg: un message

Documentation generated on Thu, 13 Mar 2008 22:03:19 +0100 by phpDocumentor 1.4.1