Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
S
stats-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
stats-facil
Validations
a1575d1b
Valider
a1575d1b
rédigé
11 years ago
par
diosmosis
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Documented core/SettingsPiwik.php.
parent
91f64982
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
core/SettingsPiwik.php
+25
-17
25 ajouts, 17 suppressions
core/SettingsPiwik.php
avec
25 ajouts
et
17 suppressions
core/SettingsPiwik.php
+
25
−
17
Voir le fichier @
a1575d1b
...
@@ -13,10 +13,9 @@ namespace Piwik;
...
@@ -13,10 +13,9 @@ namespace Piwik;
use
Exception
;
use
Exception
;
/**
/**
* Class SettingsPiwik
* Contains helper methods that can be used to get common Piwik settings.
*
* @package Piwik
* @package Piwik
*
* @api
*/
*/
class
SettingsPiwik
class
SettingsPiwik
{
{
...
@@ -52,11 +51,12 @@ class SettingsPiwik
...
@@ -52,11 +51,12 @@ class SettingsPiwik
public
static
$cachedKnownSegmentsToArchive
=
null
;
public
static
$cachedKnownSegmentsToArchive
=
null
;
/**
/**
*
Segments to pre-process
*
Returns the list of stored segments to pre-process for all sites when executing cron archiving.
*
*
* @return string
* @return array The list of stored segments that apply to all sites.
* @api
*/
*/
static
publ
ic
function
getKnownSegmentsToArchive
()
public
stat
ic
function
getKnownSegmentsToArchive
()
{
{
if
(
self
::
$cachedKnownSegmentsToArchive
===
null
)
{
if
(
self
::
$cachedKnownSegmentsToArchive
===
null
)
{
$segments
=
Config
::
getInstance
()
->
Segments
;
$segments
=
Config
::
getInstance
()
->
Segments
;
...
@@ -75,7 +75,13 @@ class SettingsPiwik
...
@@ -75,7 +75,13 @@ class SettingsPiwik
return
self
::
$cachedKnownSegmentsToArchive
;
return
self
::
$cachedKnownSegmentsToArchive
;
}
}
/**
* Returns the list of stored segments to pre-process for an individual site when executing
* cron archiving.
*
* @param int $idSite The ID of the site to get stored segments for.
* @return string The list of stored segments that apply to the requested site.
*/
public
static
function
getKnownSegmentsToArchiveForSite
(
$idSite
)
public
static
function
getKnownSegmentsToArchiveForSite
(
$idSite
)
{
{
$segments
=
array
();
$segments
=
array
();
...
@@ -110,12 +116,10 @@ class SettingsPiwik
...
@@ -110,12 +116,10 @@ class SettingsPiwik
static
public
$piwikUrlCache
=
null
;
static
public
$piwikUrlCache
=
null
;
/**
/**
* Returns the cached the Piwik URL, eg. http://demo.piwik.org/ or http://example.org/piwik/
* Returns the URL to this Piwik instance, eg. http://demo.piwik.org/ or http://example.org/piwik/.
* If not found, then tries to cache it and returns the value.
*
* If the Piwik URL changes (eg. Piwik moved to new server), the value will automatically be refreshed in the cache.
*
*
* @return string
* @return string
* @api
*/
*/
public
static
function
getPiwikUrl
()
public
static
function
getPiwikUrl
()
{
{
...
@@ -149,9 +153,10 @@ class SettingsPiwik
...
@@ -149,9 +153,10 @@ class SettingsPiwik
}
}
/**
/**
* Returns true if
S
egmentation is allowed for this user
* Returns true if
s
egmentation is allowed for this user
, false if otherwise.
*
*
* @return bool
* @return bool
* @api
*/
*/
public
static
function
isSegmentationEnabled
()
public
static
function
isSegmentationEnabled
()
{
{
...
@@ -160,12 +165,15 @@ class SettingsPiwik
...
@@ -160,12 +165,15 @@ class SettingsPiwik
}
}
/**
/**
* Should we process and display Unique Visitors?
* Returns true if unique visitors should be processed for the given period type.
* -> Always process for day/week/month periods
*
* For Year and Range, only process if it was enabled in the config file,
* Unique visitor processing is controlled by the **[General] enable_processing_unique_visitors_...**
* INI config options. By default, day/week/month periods always process unique visitors and
* year/range are not.
*
*
* @param string $periodLabel
Period label (e.g., 'day')
* @param string $periodLabel
`"day"`, `"week"`, `"month"`, `"year"` or `"range"`
* @return bool
* @return bool
* @api
*/
*/
public
static
function
isUniqueVisitorsEnabled
(
$periodLabel
)
public
static
function
isUniqueVisitorsEnabled
(
$periodLabel
)
{
{
...
@@ -213,4 +221,4 @@ class SettingsPiwik
...
@@ -213,4 +221,4 @@ class SettingsPiwik
return
$path
;
return
$path
;
}
}
}
}
\ No newline at end of file
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter