[ Index ]
 

Code source de phpMyVisites 2.3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/core/include/ -> ArchiveDay.class.php (sommaire)

(pas de description)

Poids: 1609 lignes (46 kb)
Inclus ou requis: 1 fois
Référencé: 0 fois
Nécessite: 2 fichiers
 core/include/ArchiveCategory.class.php
 core/include/ArchiveTable.class.php

Définit 1 class

ArchiveDay:: (12 méthodes):
  ArchiveDay()
  setDate()
  reset()
  isArchived()
  compute()
  deleteOldRecords()
  computeGroupPageInfo()
  walkAndSumArray()
  sumArray()
  getInterestValuesSum()
  computeReferer()
  getArchived()


Classe: ArchiveDay  - X-Ref

Class that manages Day archives
Used by Archive and used for a simple day archiving

ArchiveDay($site, $s_date = '')   X-Ref
constructor

param: object $site
param: string $s_date

setDate($s_date)   X-Ref
set dates to the object, after reseting the datas to the previous date.
It also sets the date2 value to current time + 10 min.
Used during the check of archives state, to know if we need to compute again.

param: string $s_date
return: void

reset()   X-Ref
resets current date info
It doesn't reset the objects values because by changing the date,
we do not want to compute objects values again!

return: void

isArchived()   X-Ref
verify if the current day is archived, and if the archive is not too old

return: bool

compute()   X-Ref
compute all current day information, from the logs
Complex processus, and beatiful arithmetic


deleteOldRecords()   X-Ref
Pas de description

computeGroupPageInfo()   X-Ref
Computes all info relative to pages, groups, and files
Arrays computed contain sum by group (and subgroups), for pages and files


walkAndSumArray(&$array)   X-Ref
Recursively go through the array of pages/groups/files and sum all values, arrays

param: array $array passed by reference
return: array array('file' => array_values, 'page' => array_values)

sumArray($return, $a)   X-Ref
Computes the arrays sum, considering the very special of arrays to sum

param: array $return array1 containing the previous sum
param: array $a array2 to sum to array1
return: array two arrays sumed

getInterestValuesSum($a_values, $s, $sumpage, $onepage, $sumtime)   X-Ref
computes sum of the array a_values and the new values to add

param: array $a_values Contains current values
param: int $s Hits
param: int $sumpage Number of pages views
param: int $onepage Number of one page visit
param: int $sumtime Total time spent on all the $s visits
return: array $a_values array $a_values with new values sumed

computeReferer()   X-Ref
Computes all info relative to referer
Detects for each different referer URL (or each entry page, when no referer URLs), the name (and keyword),
the domain, the precise page, the partner, the newsletter

Saves in var toRecord all precomputed values. Isn't that great ?

getArchived()   X-Ref
returns "select *" of the day var date, after being computed if necessary




Généré le : Mon Nov 26 14:10:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics