Subversion Repositories Applications.framework

Compare Revisions

No changes between revisions

Ignore whitespace Rev 468 → Rev 469

/branches/v0.3-aleaume/doc/genererDoc.sh
File deleted
\ No newline at end of file
/branches/v0.3-aleaume/doc/envoyerDoc.sh
New file
0,0 → 1,54
#!/bin/bash
########################################################################################################################
# But : mise en ligne automatique sur le serveur par ftp, de la dernière version de la doc du Framework.
# Auteur : Jean-Pascal Milcent <jpm@tela-botanica.org>
# License : GPL v3
# Création : 12 mars 2014
# Version: 1
# Exemple : ./envoyerDoc.sh -h 193.54.123.169 -u telabotaa -p mot_de_passe
########################################################################################################################
# Constante
NBREPARAM=$#
CIBLE="./"
FTP_CIBLE="/www/doc/framework"
 
# Aide
E_OPTERR=65
if [ "$1" = '--help' ]
then # Le script a besoin d'au moins un argument sur la ligne de commande
echo "Usage $0 -[parameters -u, -p ]"
echo "Paramétres : "
echo " -h: indiquer l'hote ftp"
echo " -u: indiquer le nom de l'utilisateur ftp"
echo " -p: indiquer le mot de passe de l'utilisateur ftp"
echo " -v: indiquer la version du Framework"
exit $E_OPTERR
fi
 
# Récupération des paramètres et des options de la ligne de commande
TEMP=`getopt -o u:p:h:v: -l help: -- "$@"`
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
eval set -- "$TEMP"
while [ ! -z "$1" ] ; do
#echo $1" # "$2
case "$1" in
-h) HOST=$2;;
-u) FTP_USER=$2;;
-p) FTP_PASSWD=$2;;
-v) VERSION=$2;;
--) shift ; break ;;
*) echo "Internal error!" ; exit 1 ;;
esac
shift 2
done
 
FTP_CIBLE="$FTP_CIBLE/$VERSION"
 
if [ $NBREPARAM -eq 0 ]; then
echo "Utiliser --help pour voir les options de transfert."
elif [ "$VERSION" = "" ]; then
echo "Vous n'avez pas indiqué la version du Framework. Utiliser --help pour voir les paramètres."
else
echo "Transfert sur le serveur '$HOST' dans '$FTP_CIBLE' :";
lftp ftp://$FTP_USER:$FTP_PASSWD@$HOST -e "set ftp:passive off; mirror -e -R -L -x .svn -x genererPhpDoc.sh -x envoyerDoc.sh $CIBLE $FTP_CIBLE ; quit"
fi;
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-45/phpdoc-cache-file_93ae2e97933b2bd1f1736cb409d8eace.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-45/phpdoc-cache-file_93ae2e97933b2bd1f1736cb409d8eace.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-67/phpdoc-cache-file_13a195b76a5d6e2af05535eef2a59606.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-67/phpdoc-cache-file_13a195b76a5d6e2af05535eef2a59606.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-69/phpdoc-cache-file_6fa00f6ef4b386081d5af8788aeb273e.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-69/phpdoc-cache-file_6fa00f6ef4b386081d5af8788aeb273e.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/index.html
New file
0,0 → 1,433
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="css/prism.css" rel="stylesheet" media="all"/>
<link href="css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="js/jquery.smooth-scroll.js"></script>
<script src="js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<link rel="shortcut icon" href="images/favicon.ico"/>
<link rel="apple-touch-icon" href="images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2015430836"></a>
<a href="namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-2015430836" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="classes/Url.html">Url</a></li>
<li class="class"><a href="classes/Debug.html">Debug</a></li>
<li class="class"><a href="classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="classes/Cache.html">Cache</a></li>
<li class="class"><a href="classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="classes/Script.html">Script</a></li>
<li class="class"><a href="classes/Registre.html">Registre</a></li>
<li class="class"><a href="classes/RestService.html">RestService</a></li>
<li class="class"><a href="classes/Cli.html">Cli</a></li>
<li class="class"><a href="classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="classes/I18n.html">I18n</a></li>
<li class="class"><a href="classes/Config.html">Config</a></li>
<li class="class"><a href="classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="classes/Log.html">Log</a></li>
<li class="class"><a href="classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="classes/Framework.html">Framework</a></li>
<li class="class"><a href="classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content namespace">
<nav>
</nav>
<h1><small></small>\</h1>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="classes/Url.html">Url</a></td>
<td><em>Classe Url, gérant le découpage des paramètres, leurs modification etc.</em></td>
</tr>
<tr>
<td><a href="classes/Debug.html">Debug</a></td>
<td><em>Classe fournissant des fonctions de débogage équivalante à var_dump et print_r.</em></td>
</tr>
<tr>
<td><a href="classes/Chronometre.html">Chronometre</a></td>
<td><em>Chronometre permet de stocker et d&#039;afficher les temps d&#039;éxécution de script.</em></td>
</tr>
<tr>
<td><a href="classes/RestServeur.html">RestServeur</a></td>
<td><em>Classe principale gérant les services web de type (@link(REST, http://fr.wikipedia.org/wiki/Rest).</em></td>
</tr>
<tr>
<td><a href="classes/SquelettePhp.html">SquelettePhp</a></td>
<td><em>Classe SquelettePhp, traitant les squelette Php utilisant la syntaxe courte php ou pas.</em></td>
</tr>
<tr>
<td><a href="classes/Controleur.html">Controleur</a></td>
<td><em>Classe Controleur, coeur d&#039;une application, c&#039;est normalement la seule classe d&#039;une application
qui devrait être appelée de l&#039;extérieur.</em></td>
</tr>
<tr>
<td><a href="classes/Cache.html">Cache</a></td>
<td><em>Classe Cache permettant de mettre en cache des données.</em></td>
</tr>
<tr>
<td><a href="classes/RestClient.html">RestClient</a></td>
<td><em>Classe client permettant d&#039;interroger des services web REST.</em></td>
</tr>
<tr>
<td><a href="classes/GestionnaireException.html">GestionnaireException</a></td>
<td><em>Classe de gestion des exceptions.</em></td>
</tr>
<tr>
<td><a href="classes/Script.html">Script</a></td>
<td><em>Script est une classe abstraite qui doit être implémenté par les classes éxecutant des scripts en ligne de commande.</em></td>
</tr>
<tr>
<td><a href="classes/Registre.html">Registre</a></td>
<td><em>Classe Registre, qui permet un accès à différentes variables et paramètres à travers les autres classes.</em></td>
</tr>
<tr>
<td><a href="classes/RestService.html">RestService</a></td>
<td><em>Classe principale gérant les services.</em></td>
</tr>
<tr>
<td><a href="classes/Cli.html">Cli</a></td>
<td><em>CLI permet de récupérer les paramètres passés en ligne de commande pour instancier une classe héritant de la classe abstraite
Script.</em></td>
</tr>
<tr>
<td><a href="classes/Encodage.html">Encodage</a></td>
<td><em>Classe fournissant des méthodes statiques concernant l&#039;encodage et le décodage des caractères de variable.</em></td>
</tr>
<tr>
<td><a href="classes/Tableau.html">Tableau</a></td>
<td><em>Classe fournissant des méthodes statiques de manipulation des tableaux (Array).</em></td>
</tr>
<tr>
<td><a href="classes/Pattern.html">Pattern</a></td>
<td><em>Classe fournissant des constantes correspondant à des expressions régulières de vérification très courrantes.</em></td>
</tr>
<tr>
<td><a href="classes/Chaine.html">Chaine</a></td>
<td><em>Classe fournissant des méthodes statiques de manipulation des chaînes de caractères (String).</em></td>
</tr>
<tr>
<td><a href="classes/Fichier.html">Fichier</a></td>
<td><em>Classe fournissant des méthodes statiques de manipulation des fichiers.</em></td>
</tr>
<tr>
<td><a href="classes/I18n.html">I18n</a></td>
<td><em>I18n permet de traduire une application à partir de données stockées dans des fichiers ini.</em></td>
</tr>
<tr>
<td><a href="classes/Config.html">Config</a></td>
<td><em>Config permet de charger automatiquement les fichiers ini du Framework et de l&#039;application.</em></td>
</tr>
<tr>
<td><a href="classes/CacheSqlite.html">CacheSqlite</a></td>
<td><em></em></td>
</tr>
<tr>
<td><a href="classes/Bdd.html">Bdd</a></td>
<td><em>Classe Bdd, d&#039;accés au base de données.</em></td>
</tr>
<tr>
<td><a href="classes/Log.html">Log</a></td>
<td><em>Classe permettant de logger des messages dans les fichier situés dans le dossier de log.</em></td>
</tr>
<tr>
<td><a href="classes/CacheFichier.html">CacheFichier</a></td>
<td><em></em></td>
</tr>
<tr>
<td><a href="classes/Framework.html">Framework</a></td>
<td><em>Classe de base du Framework :
- fournissant des infos sur l&#039;application,
- paramétrant l&#039;environnement de l&#039;appli et du framework,
- réalisant des traitements sur les variables globales ($_GET, $_POST, $_COOKIE.</em></td>
</tr>
<tr>
<td><a href="classes/CacheSimple.html">CacheSimple</a></td>
<td><em>Classe Cache permettant de mettre en cache des données de façon extremement simple.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
<dt>Namespace hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\</div>
</dd>
</dl>
</aside>
</div>
 
<div class="row-fluid">
<section class="span8 content namespace">
<h2>Constants</h2>
</section>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_DS" name="constant_DS" class="anchor"></a>
<article id="constant_DS" class="constant">
<h3 class="">DS</h3>
<pre class="signature">DS</pre>
<p><em>Redéfinition de la constante DIRECTORY_SEPARATOR en version abrégée DS</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_PS" name="constant_PS" class="anchor"></a>
<article id="constant_PS" class="constant">
<h3 class="">PS</h3>
<pre class="signature">PS</pre>
<p><em>Redéfinition de la constante PATH_SEPARATOR en version abrégée PS</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<section class="span8 content namespace">
<h2>Functions</h2>
</section>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyerSlashProfond" name="method_nettoyerSlashProfond" class="anchor"></a>
<article class="method">
<h3 class=" ">nettoyerSlashProfond()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyerSlashProfond( <span class="argument">$valeur</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$valeur</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="reports/errors.html">Errors</a></li>
<li><a href="reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-a0/phpdoc-cache-file_fc563432a226bf5a590f5de8884da4af.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-a0/phpdoc-cache-file_fc563432a226bf5a590f5de8884da4af.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-a0/phpdoc-cache-file_c23d622764f451eb27c248b6edeeb09c.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-a0/phpdoc-cache-file_c23d622764f451eb27c248b6edeeb09c.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-a1/phpdoc-cache-file_d2acb2f58b7875e449bfc97005d1b5c1.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-a1/phpdoc-cache-file_d2acb2f58b7875e449bfc97005d1b5c1.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-e0/phpdoc-cache-file_3c8af7beabeb6a60edbadada7524d7ed.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-e0/phpdoc-cache-file_3c8af7beabeb6a60edbadada7524d7ed.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-3c/phpdoc-cache-file_0f8f35c8eae86e86fc8742d3a5134c15.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-3c/phpdoc-cache-file_0f8f35c8eae86e86fc8742d3a5134c15.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-1f/phpdoc-cache-file_9f2bd6a7e9dcd3958d86cf14c94230b3.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-1f/phpdoc-cache-file_9f2bd6a7e9dcd3958d86cf14c94230b3.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-e4/phpdoc-cache-file_5f5ad2f8f7f8dab5daffd639f8da7d02.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-e4/phpdoc-cache-file_5f5ad2f8f7f8dab5daffd639f8da7d02.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/graphs/class.html
New file
0,0 → 1,165
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<link href="../css/jquery.iviewer.css" rel="stylesheet" media="all"/>
<style>
#viewer {
position: relative;
width: 100%;
}
.wrapper {
overflow: hidden;
}
</style>
 
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
<script src="../js/jquery.iviewer.js" type="text/javascript"></script>
<script type="text/javascript">
$(window).resize(function(){
$("#viewer").height($(window).height() - 100);
});
 
$(document).ready(function() {
$("#viewer").iviewer({src: '../graphs/classes.svg', zoom_animation: false});
$('#viewer img').bind('dragstart', function(event){
event.preventDefault();
});
$(window).resize();
});
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="wrapper">
<div id="viewer" class="viewer"></div>
</div>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-9a/phpdoc-cache-file_93fb3191e18da5e5dd0648f61d92959e.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-9a/phpdoc-cache-file_93fb3191e18da5e5dd0648f61d92959e.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-10/phpdoc-cache-file_c0a000a74ba9d6fbb1338a30824c0cfe.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-10/phpdoc-cache-file_c0a000a74ba9d6fbb1338a30824c0cfe.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/reports/deprecated.html
New file
0,0 → 1,285
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title> &raquo; Deprecated elements
</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<div class="row-fluid">
 
<div class="span2 sidebar">
<ul class="side-nav nav nav-list">
<li class="nav-header">Navigation</li>
</ul>
</div>
 
<div class="span10 offset2">
<ul class="breadcrumb">
<li><a href="../"><i class="icon-stop"></i></a><span class="divider">\</span></li>
<li>Deprecated elements</li>
</ul>
 
<div id="marker-accordion">
<a name="" id=""></a>
<h3>
<i class="icon-file"></i>
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>deprecated</td>
<td></td>
<td></td>
</tr>
</table>
</div>
<a name="" id=""></a>
<h3>
<i class="icon-file"></i>
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>deprecated</td>
<td></td>
<td>Utiliser la methode getBdd().</td>
</tr>
</table>
</div>
<a name="" id=""></a>
<h3>
<i class="icon-file"></i>
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>deprecated</td>
<td></td>
<td>Utiliser la méthode trierMD()</td>
</tr>
</table>
</div>
<a name="" id=""></a>
<h3>
<i class="icon-file"></i>
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>deprecated</td>
<td></td>
<td>changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see requeter</td>
</tr>
</table>
</div>
<a name="" id=""></a>
<h3>
<i class="icon-file"></i>
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>deprecated</td>
<td></td>
<td>changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see recuperer</td>
</tr>
</table>
</div>
<a name="" id=""></a>
<h3>
<i class="icon-file"></i>
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>deprecated</td>
<td></td>
<td>changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see recupererTous</td>
</tr>
</table>
</div>
<a name="" id=""></a>
<h3>
<i class="icon-file"></i>
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>deprecated</td>
<td></td>
<td>changement de nom. Deviendra &quot;private&quot; dans la version 0.5. Utiliser à la place : @see proteger</td>
</tr>
</table>
</div>
</div>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/reports/markers.html
New file
0,0 → 1,298
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title> &raquo; Markers
</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<ul class="side-nav nav nav-list">
<li class="nav-header">Navigation</li>
<li><a href="#RestServeur.php"><i class="icon-file"></i> RestServeur.php</a></li>
<li><a href="#Script.php"><i class="icon-file"></i> Script.php</a></li>
<li><a href="#CacheSqlite.php"><i class="icon-file"></i> CacheSqlite.php</a></li>
<li><a href="#CacheFichier.php"><i class="icon-file"></i> CacheFichier.php</a></li>
<li><a href="#CacheSimple.php"><i class="icon-file"></i> CacheSimple.php</a></li>
</ul>
</div>
 
<div class="span10 offset2">
 
<ul class="breadcrumb">
<li><a href="../"><i class="icon-map-marker"></i></a><span class="divider">\</span></li>
<li>Markers</li>
</ul>
 
<div id="marker-accordion">
<div class="package-contents">
<a name="RestServeur.php" id="RestServeur.php"></a>
<h3>
<i class="icon-file"></i>
RestServeur.php
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>TODO</td>
<td>41</td>
<td>: gerer les retours : dans ce controleur : code retour et envoi ...</td>
</tr>
</table>
</div>
</div>
<div class="package-contents">
<a name="Script.php" id="Script.php"></a>
<h3>
<i class="icon-file"></i>
Script.php
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>TODO</td>
<td>240</td>
<td>: lancer le log</td>
</tr>
</table>
</div>
</div>
<div class="package-contents">
<a name="CacheSqlite.php" id="CacheSqlite.php"></a>
<h3>
<i class="icon-file"></i>
CacheSqlite.php
<small style="float: right;padding-right: 10px;">4</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>FIXME</td>
<td>143</td>
<td>: si l&#039;extension n&#039;est pas installée, le cache passe tout de même par cette fonction et s&#039;arrête à cet endroit.</td>
</tr>
<tr>
<td>TODO</td>
<td>152</td>
<td>: ajouter un log sauver() : impossible de stocker le cache d&#039;id &#039;$id&#039;</td>
</tr>
<tr>
<td>TODO</td>
<td>486</td>
<td>: ajouter un log -&gt; impossible d&#039;enregistrer le tag=$tag pour le cache id=$id&quot;);</td>
</tr>
<tr>
<td>TODO</td>
<td>527</td>
<td>: ajouter un log CacheSqlite::verifierBddStructureVersion() : vielle version de la structure de la base de données de cache détectée =&gt; le cache est entrain d&#039;être supprimé</td>
</tr>
</table>
</div>
</div>
<div class="package-contents">
<a name="CacheFichier.php" id="CacheFichier.php"></a>
<h3>
<i class="icon-file"></i>
CacheFichier.php
<small style="float: right;padding-right: 10px;">4</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>TODO</td>
<td>152</td>
<td>: loguer le pb de sécu</td>
</tr>
<tr>
<td>TODO</td>
<td>215</td>
<td>: ajouter un log</td>
</tr>
<tr>
<td>TODO</td>
<td>512</td>
<td>: ajouter un log</td>
</tr>
<tr>
<td>TODO</td>
<td>702</td>
<td>: ajoute un log</td>
</tr>
</table>
</div>
</div>
<div class="package-contents">
<a name="CacheSimple.php" id="CacheSimple.php"></a>
<h3>
<i class="icon-file"></i>
CacheSimple.php
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
<tr>
<td>TODO</td>
<td>22</td>
<td>: voir ce qui est le plus pratique : error_log ou le gestionnaire de bogue du framework</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</section>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/reports/errors.html
New file
0,0 → 1,2063
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title> &raquo; Compilation errors
</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
 
<ul class="side-nav nav nav-list">
<li class="nav-header">Navigation</li>
<li><a href="#Url.php"><i class="icon-file"></i> Url.php</a></li>
<li><a href="#Debug.php"><i class="icon-file"></i> Debug.php</a></li>
<li><a href="#Chronometre.php"><i class="icon-file"></i> Chronometre.php</a></li>
<li><a href="#RestServeur.php"><i class="icon-file"></i> RestServeur.php</a></li>
<li><a href="#SquelettePhp.php"><i class="icon-file"></i> SquelettePhp.php</a></li>
<li><a href="#Controleur.php"><i class="icon-file"></i> Controleur.php</a></li>
<li><a href="#Cache.php"><i class="icon-file"></i> Cache.php</a></li>
<li><a href="#RestClient.php"><i class="icon-file"></i> RestClient.php</a></li>
<li><a href="#GestionnaireException.php"><i class="icon-file"></i> GestionnaireException.php</a></li>
<li><a href="#Script.php"><i class="icon-file"></i> Script.php</a></li>
<li><a href="#Registre.php"><i class="icon-file"></i> Registre.php</a></li>
<li><a href="#RestService.php"><i class="icon-file"></i> RestService.php</a></li>
<li><a href="#Cli.php"><i class="icon-file"></i> Cli.php</a></li>
<li><a href="#utilitaires/Encodage.php"><i class="icon-file"></i> utilitaires/Encodage.php</a></li>
<li><a href="#utilitaires/Tableau.php"><i class="icon-file"></i> utilitaires/Tableau.php</a></li>
<li><a href="#utilitaires/Pattern.php"><i class="icon-file"></i> utilitaires/Pattern.php</a></li>
<li><a href="#utilitaires/Chaine.php"><i class="icon-file"></i> utilitaires/Chaine.php</a></li>
<li><a href="#utilitaires/Fichier.php"><i class="icon-file"></i> utilitaires/Fichier.php</a></li>
<li><a href="#I18n.php"><i class="icon-file"></i> I18n.php</a></li>
<li><a href="#Config.php"><i class="icon-file"></i> Config.php</a></li>
<li><a href="#CacheSqlite.php"><i class="icon-file"></i> CacheSqlite.php</a></li>
<li><a href="#Bdd.php"><i class="icon-file"></i> Bdd.php</a></li>
<li><a href="#Log.php"><i class="icon-file"></i> Log.php</a></li>
<li><a href="#CacheFichier.php"><i class="icon-file"></i> CacheFichier.php</a></li>
<li><a href="#Framework.php"><i class="icon-file"></i> Framework.php</a></li>
<li><a href="#CacheSimple.php"><i class="icon-file"></i> CacheSimple.php</a></li>
</ul>
</div>
 
<div class="span10 offset2">
<ul class="breadcrumb">
<li><a href="../"><i class="icon-remove-sign"></i></a><span class="divider">\</span></li>
<li>Compilation Errors</li>
</ul>
 
<div class="package-contents">
<a name="Url.php" id="Url.php"></a>
<h3>
<i class="icon-file"></i>
Url.php
<small style="float: right;padding-right: 10px;">10</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>62</td>
<td>No summary for property $schema</td>
</tr>
<tr>
<td>error</td>
<td>67</td>
<td>No summary for property $infoUtilisateur</td>
</tr>
<tr>
<td>error</td>
<td>72</td>
<td>No summary for property $hote</td>
</tr>
<tr>
<td>error</td>
<td>77</td>
<td>No summary for property $port</td>
</tr>
<tr>
<td>error</td>
<td>82</td>
<td>No summary for property $chemin</td>
</tr>
<tr>
<td>error</td>
<td>87</td>
<td>No summary for property $requete</td>
</tr>
<tr>
<td>error</td>
<td>92</td>
<td>No summary for property $fragment</td>
</tr>
<tr>
<td>error</td>
<td>101</td>
<td>No summary for method __construct()</td>
</tr>
<tr>
<td>error</td>
<td>196</td>
<td>No summary for method setAutorite()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="Debug.php" id="Debug.php"></a>
<h3>
<i class="icon-file"></i>
Debug.php
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="Chronometre.php" id="Chronometre.php"></a>
<h3>
<i class="icon-file"></i>
Chronometre.php
<small style="float: right;padding-right: 10px;">8</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>19</td>
<td>No summary for property $pointArretNumero</td>
</tr>
<tr>
<td>error</td>
<td>20</td>
<td>No summary for property $temps</td>
</tr>
<tr>
<td>error</td>
<td>48</td>
<td>Argument $cle is missing from the Docblock of setTemps()</td>
</tr>
<tr>
<td>error</td>
<td>62</td>
<td>Argument $cle is missing from the Docblock of chrono()</td>
</tr>
<tr>
<td>error</td>
<td>86</td>
<td>Argument $cle is missing from the Docblock of afficherChrono()</td>
</tr>
<tr>
<td>error</td>
<td>133</td>
<td>Argument $utps is missing from the Docblock of getMicroTime()</td>
</tr>
<tr>
<td>error</td>
<td>133</td>
<td>No summary for method getMicroTime()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="RestServeur.php" id="RestServeur.php"></a>
<h3>
<i class="icon-file"></i>
RestServeur.php
<small style="float: right;padding-right: 10px;">25</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>291</td>
<td>No summary for method initialiserMethode()</td>
</tr>
<tr>
<td>error</td>
<td>299</td>
<td>No summary for method initialiserRequeteDonnees()</td>
</tr>
<tr>
<td>error</td>
<td>310</td>
<td>No summary for method decouperUrlChemin()</td>
</tr>
<tr>
<td>error</td>
<td>336</td>
<td>Argument $apiVersion is missing from the Docblock of initialiserApiVersion()</td>
</tr>
<tr>
<td>error</td>
<td>336</td>
<td>No summary for method initialiserApiVersion()</td>
</tr>
<tr>
<td>error</td>
<td>351</td>
<td>Argument $apiVersion is missing from the Docblock of verifierApiVersion()</td>
</tr>
<tr>
<td>error</td>
<td>351</td>
<td>No summary for method verifierApiVersion()</td>
</tr>
<tr>
<td>error</td>
<td>359</td>
<td>Argument $serviceNom is missing from the Docblock of initialiserServiceNom()</td>
</tr>
<tr>
<td>error</td>
<td>359</td>
<td>No summary for method initialiserServiceNom()</td>
</tr>
<tr>
<td>error</td>
<td>372</td>
<td>Argument $serviceNom is missing from the Docblock of verifierServiceNom()</td>
</tr>
<tr>
<td>error</td>
<td>372</td>
<td>No summary for method verifierServiceNom()</td>
</tr>
<tr>
<td>error</td>
<td>380</td>
<td>Argument $serviceNom is missing from the Docblock of traiterNomService()</td>
</tr>
<tr>
<td>error</td>
<td>380</td>
<td>No summary for method traiterNomService()</td>
</tr>
<tr>
<td>error</td>
<td>384</td>
<td>Argument $urlParts is missing from the Docblock of initialiserRessource()</td>
</tr>
<tr>
<td>error</td>
<td>384</td>
<td>No summary for method initialiserRessource()</td>
</tr>
<tr>
<td>error</td>
<td>395</td>
<td>No summary for method initialiserParametres()</td>
</tr>
<tr>
<td>error</td>
<td>400</td>
<td>No summary for method recupererParametresGet()</td>
</tr>
<tr>
<td>error</td>
<td>405</td>
<td>No summary for method nettoyerParametres()</td>
</tr>
<tr>
<td>error</td>
<td>418</td>
<td>No summary for method recupererParametresBruts()</td>
</tr>
<tr>
<td>error</td>
<td>440</td>
<td>Argument $classe is missing from the Docblock of chargerClasse()</td>
</tr>
<tr>
<td>error</td>
<td>515</td>
<td>No summary for method post()</td>
</tr>
<tr>
<td>error</td>
<td>550</td>
<td>No summary for method put()</td>
</tr>
<tr>
<td>error</td>
<td>578</td>
<td>No summary for method delete()</td>
</tr>
<tr>
<td>error</td>
<td>655</td>
<td>Argument $retour is missing from the Docblock of cloreAccesServeur()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="SquelettePhp.php" id="SquelettePhp.php"></a>
<h3>
<i class="icon-file"></i>
SquelettePhp.php
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="Controleur.php" id="Controleur.php"></a>
<h3>
<i class="icon-file"></i>
Controleur.php
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="Cache.php" id="Cache.php"></a>
<h3>
<i class="icon-file"></i>
Cache.php
<small style="float: right;padding-right: 10px;">26</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>96</td>
<td>No summary for property $stockage</td>
</tr>
<tr>
<td>error</td>
<td>98</td>
<td>Argument $options is missing from the Docblock of __construct()</td>
</tr>
<tr>
<td>error</td>
<td>98</td>
<td>Argument $options_stockage is missing from the Docblock of __construct()</td>
</tr>
<tr>
<td>error</td>
<td>98</td>
<td>No summary for method __construct()</td>
</tr>
<tr>
<td>error</td>
<td>112</td>
<td>No summary for method initialiserOptionsParConfig()</td>
</tr>
<tr>
<td>error</td>
<td>120</td>
<td>Argument $options is missing from the Docblock of setOptions()</td>
</tr>
<tr>
<td>error</td>
<td>120</td>
<td>No summary for method setOptions()</td>
</tr>
<tr>
<td>error</td>
<td>148</td>
<td>Argument $mode is missing from the Docblock of fabriquer()</td>
</tr>
<tr>
<td>error</td>
<td>148</td>
<td>Argument $options is missing from the Docblock of fabriquer()</td>
</tr>
<tr>
<td>error</td>
<td>148</td>
<td>No summary for method fabriquer()</td>
</tr>
<tr>
<td>error</td>
<td>365</td>
<td>Argument $supplement_duree_de_vie is missing from the Docblock of ajouterSupplementDureeDeVie()</td>
</tr>
<tr>
<td>error</td>
<td>387</td>
<td>Argument $methode is missing from the Docblock of executerMethodeStockage()</td>
</tr>
<tr>
<td>error</td>
<td>387</td>
<td>Argument $params is missing from the Docblock of executerMethodeStockage()</td>
</tr>
<tr>
<td>error</td>
<td>387</td>
<td>No summary for method executerMethodeStockage()</td>
</tr>
<tr>
<td>error</td>
<td>401</td>
<td>Argument $ids is missing from the Docblock of supprimerPrefixe()</td>
</tr>
<tr>
<td>error</td>
<td>401</td>
<td>No summary for method supprimerPrefixe()</td>
</tr>
<tr>
<td>error</td>
<td>415</td>
<td>Argument $id is missing from the Docblock of controlerEcriture()</td>
</tr>
<tr>
<td>error</td>
<td>415</td>
<td>Argument $donnees_avant_ecriture is missing from the Docblock of controlerEcriture()</td>
</tr>
<tr>
<td>error</td>
<td>415</td>
<td>No summary for method controlerEcriture()</td>
</tr>
<tr>
<td>error</td>
<td>427</td>
<td>Argument $donnees is missing from the Docblock of deserialiserAutomatiquement()</td>
</tr>
<tr>
<td>error</td>
<td>427</td>
<td>No summary for method deserialiserAutomatiquement()</td>
</tr>
<tr>
<td>error</td>
<td>435</td>
<td>Argument $donnees is missing from the Docblock of serialiserAutomatiquement()</td>
</tr>
<tr>
<td>error</td>
<td>435</td>
<td>No summary for method serialiserAutomatiquement()</td>
</tr>
<tr>
<td>error</td>
<td>447</td>
<td>No summary for method nettoyerAutomatiquement()</td>
</tr>
<tr>
<td>error</td>
<td>495</td>
<td>Argument $duree_de_vie is missing from the Docblock of getTimestampExpiration()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="RestClient.php" id="RestClient.php"></a>
<h3>
<i class="icon-file"></i>
RestClient.php
<small style="float: right;padding-right: 10px;">31</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>17</td>
<td>No summary for property $http_methodes</td>
</tr>
<tr>
<td>error</td>
<td>18</td>
<td>No summary for property $parametres</td>
</tr>
<tr>
<td>error</td>
<td>19</td>
<td>No summary for property $url</td>
</tr>
<tr>
<td>error</td>
<td>20</td>
<td>No summary for property $reponse_entetes</td>
</tr>
<tr>
<td>error</td>
<td>25</td>
<td>No summary for method getReponseEntetes()</td>
</tr>
<tr>
<td>error</td>
<td>29</td>
<td>Argument $cle is missing from the Docblock of getParametre()</td>
</tr>
<tr>
<td>error</td>
<td>29</td>
<td>No summary for method getParametre()</td>
</tr>
<tr>
<td>error</td>
<td>34</td>
<td>Argument $cle is missing from the Docblock of ajouterParametre()</td>
</tr>
<tr>
<td>error</td>
<td>34</td>
<td>Argument $valeur is missing from the Docblock of ajouterParametre()</td>
</tr>
<tr>
<td>error</td>
<td>34</td>
<td>No summary for method ajouterParametre()</td>
</tr>
<tr>
<td>error</td>
<td>38</td>
<td>Argument $cle is missing from the Docblock of supprimerParametre()</td>
</tr>
<tr>
<td>error</td>
<td>38</td>
<td>No summary for method supprimerParametre()</td>
</tr>
<tr>
<td>error</td>
<td>42</td>
<td>No summary for method nettoyerParametres()</td>
</tr>
<tr>
<td>error</td>
<td>49</td>
<td>Argument $url is missing from the Docblock of consulter()</td>
</tr>
<tr>
<td>error</td>
<td>49</td>
<td>No summary for method consulter()</td>
</tr>
<tr>
<td>error</td>
<td>54</td>
<td>Argument $url is missing from the Docblock of ajouter()</td>
</tr>
<tr>
<td>error</td>
<td>54</td>
<td>No summary for method ajouter()</td>
</tr>
<tr>
<td>error</td>
<td>59</td>
<td>Argument $url is missing from the Docblock of modifier()</td>
</tr>
<tr>
<td>error</td>
<td>59</td>
<td>No summary for method modifier()</td>
</tr>
<tr>
<td>error</td>
<td>64</td>
<td>Argument $url is missing from the Docblock of supprimer()</td>
</tr>
<tr>
<td>error</td>
<td>64</td>
<td>No summary for method supprimer()</td>
</tr>
<tr>
<td>error</td>
<td>69</td>
<td>Argument $url is missing from the Docblock of envoyerRequete()</td>
</tr>
<tr>
<td>error</td>
<td>69</td>
<td>Argument $mode is missing from the Docblock of envoyerRequete()</td>
</tr>
<tr>
<td>error</td>
<td>69</td>
<td>No summary for method envoyerRequete()</td>
</tr>
<tr>
<td>error</td>
<td>109</td>
<td>No summary for method traiterUrlParametres()</td>
</tr>
<tr>
<td>error</td>
<td>122</td>
<td>No summary for method traiterEntete()</td>
</tr>
<tr>
<td>error</td>
<td>127</td>
<td>No summary for method analyserEntete()</td>
</tr>
<tr>
<td>error</td>
<td>145</td>
<td>Argument $entetes_analyses is missing from the Docblock of traiterEnteteDebogage()</td>
</tr>
<tr>
<td>error</td>
<td>145</td>
<td>No summary for method traiterEnteteDebogage()</td>
</tr>
<tr>
<td>error</td>
<td>157</td>
<td>No summary for method reinitialiser()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="GestionnaireException.php" id="GestionnaireException.php"></a>
<h3>
<i class="icon-file"></i>
GestionnaireException.php
<small style="float: right;padding-right: 10px;">2</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>82</td>
<td>Argument $contexte is missing from the Docblock of setContexte()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="Script.php" id="Script.php"></a>
<h3>
<i class="icon-file"></i>
Script.php
<small style="float: right;padding-right: 10px;">28</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>96</td>
<td>Argument $script_nom is missing from the Docblock of __construct()</td>
</tr>
<tr>
<td>error</td>
<td>96</td>
<td>Argument $parametres_cli is missing from the Docblock of __construct()</td>
</tr>
<tr>
<td>error</td>
<td>96</td>
<td>No summary for method __construct()</td>
</tr>
<tr>
<td>error</td>
<td>109</td>
<td>Argument $niveau is missing from the Docblock of getMsgNiveauTxt()</td>
</tr>
<tr>
<td>error</td>
<td>109</td>
<td>No summary for method getMsgNiveauTxt()</td>
</tr>
<tr>
<td>error</td>
<td>113</td>
<td>No summary for method getScriptNom()</td>
</tr>
<tr>
<td>error</td>
<td>117</td>
<td>Argument $doit_exister is missing from the Docblock of getScriptChemin()</td>
</tr>
<tr>
<td>error</td>
<td>117</td>
<td>No summary for method getScriptChemin()</td>
</tr>
<tr>
<td>error</td>
<td>125</td>
<td>Argument $parametre is missing from the Docblock of getParametre()</td>
</tr>
<tr>
<td>error</td>
<td>125</td>
<td>No summary for method getParametre()</td>
</tr>
<tr>
<td>error</td>
<td>139</td>
<td>No summary for method executer()</td>
</tr>
<tr>
<td>error</td>
<td>141</td>
<td>No summary for method chargerParametresAutorises()</td>
</tr>
<tr>
<td>error</td>
<td>151</td>
<td>No summary for method chargerParametres()</td>
</tr>
<tr>
<td>error</td>
<td>197</td>
<td>Argument $message is missing from the Docblock of traiterErreur()</td>
</tr>
<tr>
<td>error</td>
<td>197</td>
<td>Argument $tab_arguments is missing from the Docblock of traiterErreur()</td>
</tr>
<tr>
<td>error</td>
<td>210</td>
<td>Argument $message is missing from the Docblock of traiterAvertissement()</td>
</tr>
<tr>
<td>error</td>
<td>210</td>
<td>Argument $tab_arguments is missing from the Docblock of traiterAvertissement()</td>
</tr>
<tr>
<td>error</td>
<td>223</td>
<td>Argument $message is missing from the Docblock of traiterInfo()</td>
</tr>
<tr>
<td>error</td>
<td>223</td>
<td>Argument $tab_arguments is missing from the Docblock of traiterInfo()</td>
</tr>
<tr>
<td>error</td>
<td>235</td>
<td>Argument $message is missing from the Docblock of traiterMessage()</td>
</tr>
<tr>
<td>error</td>
<td>235</td>
<td>Argument $tab_arguments is missing from the Docblock of traiterMessage()</td>
</tr>
<tr>
<td>error</td>
<td>235</td>
<td>Argument $niveau is missing from the Docblock of traiterMessage()</td>
</tr>
<tr>
<td>error</td>
<td>252</td>
<td>Argument $message is missing from the Docblock of formaterMsg()</td>
</tr>
<tr>
<td>error</td>
<td>252</td>
<td>Argument $tab_arguments is missing from the Docblock of formaterMsg()</td>
</tr>
<tr>
<td>error</td>
<td>252</td>
<td>Argument $niveau is missing from the Docblock of formaterMsg()</td>
</tr>
<tr>
<td>error</td>
<td>268</td>
<td>Argument $message is missing from the Docblock of afficherAvancement()</td>
</tr>
<tr>
<td>error</td>
<td>268</td>
<td>Argument $depart is missing from the Docblock of afficherAvancement()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="Registre.php" id="Registre.php"></a>
<h3>
<i class="icon-file"></i>
Registre.php
<small style="float: right;padding-right: 10px;">6</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>29</td>
<td>Argument $intitule is missing from the Docblock of set()</td>
</tr>
<tr>
<td>error</td>
<td>29</td>
<td>Argument $objet is missing from the Docblock of set()</td>
</tr>
<tr>
<td>error</td>
<td>43</td>
<td>Argument $intitule is missing from the Docblock of get()</td>
</tr>
<tr>
<td>error</td>
<td>52</td>
<td>Argument $intitule is missing from the Docblock of detruire()</td>
</tr>
<tr>
<td>error</td>
<td>63</td>
<td>Argument $intitule is missing from the Docblock of existe()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="RestService.php" id="RestService.php"></a>
<h3>
<i class="icon-file"></i>
RestService.php
<small style="float: right;padding-right: 10px;">11</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>34</td>
<td>Argument $config is missing from the Docblock of __construct()</td>
</tr>
<tr>
<td>error</td>
<td>34</td>
<td>No summary for method __construct()</td>
</tr>
<tr>
<td>error</td>
<td>39</td>
<td>No summary for method initialiser()</td>
</tr>
<tr>
<td>error</td>
<td>91</td>
<td>Argument $ressources is missing from the Docblock of consulter()</td>
</tr>
<tr>
<td>error</td>
<td>91</td>
<td>Argument $parametres is missing from the Docblock of consulter()</td>
</tr>
<tr>
<td>error</td>
<td>107</td>
<td>Argument $ressources is missing from the Docblock of modifier()</td>
</tr>
<tr>
<td>error</td>
<td>107</td>
<td>Argument $requeteDonnees is missing from the Docblock of modifier()</td>
</tr>
<tr>
<td>error</td>
<td>126</td>
<td>Argument $ressources is missing from the Docblock of ajouter()</td>
</tr>
<tr>
<td>error</td>
<td>126</td>
<td>Argument $requeteDonnees is missing from the Docblock of ajouter()</td>
</tr>
<tr>
<td>error</td>
<td>145</td>
<td>Argument $ressources is missing from the Docblock of supprimer()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="Cli.php" id="Cli.php"></a>
<h3>
<i class="icon-file"></i>
Cli.php
<small style="float: right;padding-right: 10px;">8</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>59</td>
<td>Argument $script_nom is missing from the Docblock of charger()</td>
</tr>
<tr>
<td>error</td>
<td>59</td>
<td>Argument $parametres is missing from the Docblock of charger()</td>
</tr>
<tr>
<td>error</td>
<td>59</td>
<td>No summary for method charger()</td>
</tr>
<tr>
<td>error</td>
<td>87</td>
<td>Argument $script_nom is missing from the Docblock of obtenirNomClasse()</td>
</tr>
<tr>
<td>error</td>
<td>87</td>
<td>No summary for method obtenirNomClasse()</td>
</tr>
<tr>
<td>error</td>
<td>92</td>
<td>Argument $argv is missing from the Docblock of getParametres()</td>
</tr>
<tr>
<td>error</td>
<td>92</td>
<td>No summary for method getParametres()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="utilitaires/Encodage.php" id="utilitaires/Encodage.php"></a>
<h3>
<i class="icon-file"></i>
utilitaires/Encodage.php
<small style="float: right;padding-right: 10px;">4</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>24</td>
<td>Argument $variable is missing from the Docblock of encoderEnUtf8()</td>
</tr>
<tr>
<td>error</td>
<td>24</td>
<td>Argument $encodage is missing from the Docblock of encoderEnUtf8()</td>
</tr>
<tr>
<td>error</td>
<td>49</td>
<td>Argument $chaine is missing from the Docblock of detecterUtf8()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="utilitaires/Tableau.php" id="utilitaires/Tableau.php"></a>
<h3>
<i class="icon-file"></i>
utilitaires/Tableau.php
<small style="float: right;padding-right: 10px;">4</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>48</td>
<td>Argument $array is missing from the Docblock of trierTableauMd()</td>
</tr>
<tr>
<td>error</td>
<td>48</td>
<td>Argument $cols is missing from the Docblock of trierTableauMd()</td>
</tr>
<tr>
<td>error</td>
<td>48</td>
<td>No summary for method trierTableauMd()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="utilitaires/Pattern.php" id="utilitaires/Pattern.php"></a>
<h3>
<i class="icon-file"></i>
utilitaires/Pattern.php
<small style="float: right;padding-right: 10px;">1</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="utilitaires/Chaine.php" id="utilitaires/Chaine.php"></a>
<h3>
<i class="icon-file"></i>
utilitaires/Chaine.php
<small style="float: right;padding-right: 10px;">3</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>17</td>
<td>No summary for property $caracteres_accentues</td>
</tr>
<tr>
<td>error</td>
<td>33</td>
<td>No summary for property $caracteres_normaux</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="utilitaires/Fichier.php" id="utilitaires/Fichier.php"></a>
<h3>
<i class="icon-file"></i>
utilitaires/Fichier.php
<small style="float: right;padding-right: 10px;">5</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>23</td>
<td>Argument $fichier is missing from the Docblock of creerFichier()</td>
</tr>
<tr>
<td>error</td>
<td>23</td>
<td>Argument $contenu is missing from the Docblock of creerFichier()</td>
</tr>
<tr>
<td>error</td>
<td>55</td>
<td>Argument $fichier is missing from the Docblock of creerFichierGzip()</td>
</tr>
<tr>
<td>error</td>
<td>55</td>
<td>Argument $contenu is missing from the Docblock of creerFichierGzip()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="I18n.php" id="I18n.php"></a>
<h3>
<i class="icon-file"></i>
I18n.php
<small style="float: right;padding-right: 10px;">10</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>38</td>
<td>No summary for method __construct()</td>
</tr>
<tr>
<td>error</td>
<td>48</td>
<td>Argument $identifiant is missing from the Docblock of get()</td>
</tr>
<tr>
<td>error</td>
<td>48</td>
<td>Argument $langue is missing from the Docblock of get()</td>
</tr>
<tr>
<td>error</td>
<td>87</td>
<td>Argument $langue is missing from the Docblock of charger()</td>
</tr>
<tr>
<td>error</td>
<td>87</td>
<td>Argument $fichier is missing from the Docblock of charger()</td>
</tr>
<tr>
<td>error</td>
<td>87</td>
<td>Argument $format is missing from the Docblock of charger()</td>
</tr>
<tr>
<td>error</td>
<td>112</td>
<td>Argument $langue is missing from the Docblock of setLangue()</td>
</tr>
<tr>
<td>error</td>
<td>229</td>
<td>Argument $m is missing from the Docblock of ajouterErreur()</td>
</tr>
<tr>
<td>error</td>
<td>229</td>
<td>Argument $e is missing from the Docblock of ajouterErreur()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="Config.php" id="Config.php"></a>
<h3>
<i class="icon-file"></i>
Config.php
<small style="float: right;padding-right: 10px;">3</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>27</td>
<td>No summary for method __construct()</td>
</tr>
<tr>
<td>error</td>
<td>143</td>
<td>Argument $config is missing from the Docblock of existeValeur()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="CacheSqlite.php" id="CacheSqlite.php"></a>
<h3>
<i class="icon-file"></i>
CacheSqlite.php
<small style="float: right;padding-right: 10px;">12</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>2</td>
<td>No summary for class \CacheSqlite</td>
</tr>
<tr>
<td>error</td>
<td>39</td>
<td>No summary for property $Cache</td>
</tr>
<tr>
<td>error</td>
<td>59</td>
<td>No summary for method initialiserOptionsParConfig()</td>
</tr>
<tr>
<td>error</td>
<td>76</td>
<td>Argument $options is missing from the Docblock of setOptions()</td>
</tr>
<tr>
<td>error</td>
<td>76</td>
<td>No summary for method setOptions()</td>
</tr>
<tr>
<td>error</td>
<td>88</td>
<td>Argument $emplacement is missing from the Docblock of setEmplacement()</td>
</tr>
<tr>
<td>error</td>
<td>88</td>
<td>No summary for method setEmplacement()</td>
</tr>
<tr>
<td>error</td>
<td>104</td>
<td>Argument $ne_pas_tester_validiter_du_cache is missing from the Docblock of charger()</td>
</tr>
<tr>
<td>error</td>
<td>140</td>
<td>Argument $donnees is missing from the Docblock of sauver()</td>
</tr>
<tr>
<td>error</td>
<td>140</td>
<td>Argument $duree_vie_specifique is missing from the Docblock of sauver()</td>
</tr>
<tr>
<td>error</td>
<td>403</td>
<td>Argument $supplement_duree_de_vie is missing from the Docblock of ajouterSupplementDureeDeVie()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="Bdd.php" id="Bdd.php"></a>
<h3>
<i class="icon-file"></i>
Bdd.php
<small style="float: right;padding-right: 10px;">18</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>227</td>
<td>Argument $requete is missing from the Docblock of requete()</td>
</tr>
<tr>
<td>error</td>
<td>227</td>
<td>No summary for method requete()</td>
</tr>
<tr>
<td>error</td>
<td>237</td>
<td>Argument $requete is missing from the Docblock of requeter()</td>
</tr>
<tr>
<td>error</td>
<td>266</td>
<td>Argument $requete is missing from the Docblock of requeteUn()</td>
</tr>
<tr>
<td>error</td>
<td>266</td>
<td>Argument $mode is missing from the Docblock of requeteUn()</td>
</tr>
<tr>
<td>error</td>
<td>266</td>
<td>No summary for method requeteUn()</td>
</tr>
<tr>
<td>error</td>
<td>278</td>
<td>Argument $requete is missing from the Docblock of recuperer()</td>
</tr>
<tr>
<td>error</td>
<td>278</td>
<td>Argument $mode is missing from the Docblock of recuperer()</td>
</tr>
<tr>
<td>error</td>
<td>312</td>
<td>Argument $requete is missing from the Docblock of requeteTous()</td>
</tr>
<tr>
<td>error</td>
<td>312</td>
<td>Argument $mode is missing from the Docblock of requeteTous()</td>
</tr>
<tr>
<td>error</td>
<td>312</td>
<td>No summary for method requeteTous()</td>
</tr>
<tr>
<td>error</td>
<td>326</td>
<td>Argument $requete is missing from the Docblock of recupererTous()</td>
</tr>
<tr>
<td>error</td>
<td>326</td>
<td>Argument $mode is missing from the Docblock of recupererTous()</td>
</tr>
<tr>
<td>error</td>
<td>378</td>
<td>Argument $donnees is missing from the Docblock of proteger()</td>
</tr>
<tr>
<td>error</td>
<td>393</td>
<td>Argument $chaine is missing from the Docblock of protegerChaine()</td>
</tr>
<tr>
<td>error</td>
<td>415</td>
<td>No summary for method protegerTableau()</td>
</tr>
<tr>
<td>error</td>
<td>437</td>
<td>Argument $parametres is missing from the Docblock of recupererIdDernierAjout()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="Log.php" id="Log.php"></a>
<h3>
<i class="icon-file"></i>
Log.php
<small style="float: right;padding-right: 10px;">4</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>71</td>
<td>Argument $entree is missing from the Docblock of ajouterEntree()</td>
</tr>
<tr>
<td>error</td>
<td>71</td>
<td>Argument $mode is missing from the Docblock of ajouterEntree()</td>
</tr>
<tr>
<td>error</td>
<td>98</td>
<td>Argument $mode is missing from the Docblock of verifierOuvrirFichier()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="CacheFichier.php" id="CacheFichier.php"></a>
<h3>
<i class="icon-file"></i>
CacheFichier.php
<small style="float: right;padding-right: 10px;">30</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>2</td>
<td>No summary for class \CacheFichier</td>
</tr>
<tr>
<td>error</td>
<td>71</td>
<td>No summary for property $Cache</td>
</tr>
<tr>
<td>error</td>
<td>103</td>
<td>No summary for method initialiserOptionsParConfig()</td>
</tr>
<tr>
<td>error</td>
<td>111</td>
<td>Argument $options is missing from the Docblock of setOptions()</td>
</tr>
<tr>
<td>error</td>
<td>111</td>
<td>No summary for method setOptions()</td>
</tr>
<tr>
<td>error</td>
<td>123</td>
<td>Argument $emplacement is missing from the Docblock of setEmplacement()</td>
</tr>
<tr>
<td>error</td>
<td>123</td>
<td>No summary for method setEmplacement()</td>
</tr>
<tr>
<td>error</td>
<td>141</td>
<td>Argument $ne_pas_tester_validiter_du_cache is missing from the Docblock of charger()</td>
</tr>
<tr>
<td>error</td>
<td>184</td>
<td>Argument $donnees is missing from the Docblock of sauver()</td>
</tr>
<tr>
<td>error</td>
<td>184</td>
<td>Argument $duree_vie_specifique is missing from the Docblock of sauver()</td>
</tr>
<tr>
<td>error</td>
<td>253</td>
<td>Argument $tags is missing from the Docblock of nettoyer()</td>
</tr>
<tr>
<td>error</td>
<td>366</td>
<td>Argument $supplement_duree_de_vie is missing from the Docblock of ajouterSupplementDureeDeVie()</td>
</tr>
<tr>
<td>error</td>
<td>410</td>
<td>Argument $metadonnees is missing from the Docblock of setMetadonnees()</td>
</tr>
<tr>
<td>error</td>
<td>410</td>
<td>Argument $sauvegarde is missing from the Docblock of setMetadonnees()</td>
</tr>
<tr>
<td>error</td>
<td>470</td>
<td>Argument $metadonnees is missing from the Docblock of sauverMetadonnees()</td>
</tr>
<tr>
<td>error</td>
<td>494</td>
<td>Argument $fichier_nom is missing from the Docblock of etreFichierMeta()</td>
</tr>
<tr>
<td>error</td>
<td>508</td>
<td>Argument $fichier is missing from the Docblock of supprimerFichier()</td>
</tr>
<tr>
<td>error</td>
<td>537</td>
<td>Argument $dossier is missing from the Docblock of nettoyerFichiers()</td>
</tr>
<tr>
<td>error</td>
<td>628</td>
<td>Argument $dossier is missing from the Docblock of analyserCache()</td>
</tr>
<tr>
<td>error</td>
<td>628</td>
<td>Argument $mode is missing from the Docblock of analyserCache()</td>
</tr>
<tr>
<td>error</td>
<td>628</td>
<td>Argument $tags is missing from the Docblock of analyserCache()</td>
</tr>
<tr>
<td>error</td>
<td>628</td>
<td>No summary for method analyserCache()</td>
</tr>
<tr>
<td>error</td>
<td>719</td>
<td>Argument $donnees is missing from the Docblock of genererCleSecu()</td>
</tr>
<tr>
<td>error</td>
<td>719</td>
<td>Argument $type_de_controle is missing from the Docblock of genererCleSecu()</td>
</tr>
<tr>
<td>error</td>
<td>806</td>
<td>Argument $ne_pas_tester_validiter_du_cache is missing from the Docblock of testerExistenceCache()</td>
</tr>
<tr>
<td>error</td>
<td>822</td>
<td>Argument $fichier is missing from the Docblock of getContenuFichier()</td>
</tr>
<tr>
<td>error</td>
<td>843</td>
<td>Argument $fichier is missing from the Docblock of setContenuFichier()</td>
</tr>
<tr>
<td>error</td>
<td>843</td>
<td>Argument $chaine is missing from the Docblock of setContenuFichier()</td>
</tr>
<tr>
<td>error</td>
<td>866</td>
<td>Argument $nom_de_fichier is missing from the Docblock of transformerNomFichierEnId()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="Framework.php" id="Framework.php"></a>
<h3>
<i class="icon-file"></i>
Framework.php
<small style="float: right;padding-right: 10px;">8</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>220</td>
<td>Argument $valeur is missing from the Docblock of \nettoyerSlashProfond()</td>
</tr>
<tr>
<td>error</td>
<td>220</td>
<td>No summary for function \nettoyerSlashProfond()</td>
</tr>
<tr>
<td>error</td>
<td>74</td>
<td>Argument $chemin is missing from the Docblock of definirCheminAppli()</td>
</tr>
<tr>
<td>error</td>
<td>74</td>
<td>No summary for method definirCheminAppli()</td>
</tr>
<tr>
<td>error</td>
<td>84</td>
<td>No summary for method enregistrerMethodesAutoload()</td>
</tr>
<tr>
<td>error</td>
<td>104</td>
<td>Argument $nom_classe_fw is missing from the Docblock of autoloadFw()</td>
</tr>
<tr>
<td>error</td>
<td>119</td>
<td>Argument $nom_classe is missing from the Docblock of autoloadAppliDefaut()</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="package-contents">
<a name="CacheSimple.php" id="CacheSimple.php"></a>
<h3>
<i class="icon-file"></i>
CacheSimple.php
<small style="float: right;padding-right: 10px;">8</small>
</h3>
<div>
<table class="table markers table-bordered">
<thead>
<tr>
<th>Type</th>
<th>Line</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>0</td>
<td>No summary was found for this file</td>
</tr>
<tr>
<td>error</td>
<td>25</td>
<td>No summary for property $mise_en_cache</td>
</tr>
<tr>
<td>error</td>
<td>26</td>
<td>No summary for property $stockage_chemin</td>
</tr>
<tr>
<td>error</td>
<td>27</td>
<td>No summary for property $duree_de_vie</td>
</tr>
<tr>
<td>error</td>
<td>29</td>
<td>No summary for property $options</td>
</tr>
<tr>
<td>error</td>
<td>35</td>
<td>Argument $options is missing from the Docblock of __construct()</td>
</tr>
<tr>
<td>error</td>
<td>35</td>
<td>No summary for method __construct()</td>
</tr>
<tr>
<td>error</td>
<td>64</td>
<td>No summary for method initialiserOptionsParConfig()</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-15/phpdoc-cache-file_c0d04bf5c17e0471bc39927197ca5121.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-15/phpdoc-cache-file_c0d04bf5c17e0471bc39927197ca5121.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/Cache.php.txt
New file
0,0 → 1,507
<?php
// declare(encoding='UTF-8');
/**
* Classe Cache permettant de mettre en cache des données.
* Basée sur les principes de Zend_Cache (Copyright (c) 2005-2010, Zend Technologies USA, Inc. All rights reserved.)
*
* @category php 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://framework.zend.com/license/new-bsd Licence New BSD
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
* @version $Id: Cache.php 299 2011-01-18 14:03:46Z jpm $
* @link /doc/framework/
*/
class Cache {
/** Socke les enregistrements du cache dans des fichiers textes de façon extremement simple. */
const STOCKAGE_MODE_SIMPLE = "FichierSimple";
/** Socke les enregistrements du cache dans des fichiers textes. */
const STOCKAGE_MODE_FICHIER = "Fichier";
/** Socke les enregistrements du cache dans une base de données SQLite. */
const STOCKAGE_MODE_SQLITE = "Sqlite";
/** 'tous' (par défaut) : supprime tous les enregistrements. */
const NETTOYAGE_MODE_TOUS = "tous";
/** 'expiration' : supprime tous les enregistrements dont la date d'expériration est dépassée. */
const NETTOYAGE_MODE_EXPIRATION = "expiration";
/** 'avecLesTags' : supprime tous les enregistrements contenant tous les tags indiqués. */
const NETTOYAGE_MODE_AVEC_LES_TAGS = "avecLesTags";
/** 'sansLesTags' : supprime tous les enregistrements contenant aucun des tags indiqués. */
const NETTOYAGE_MODE_SANS_LES_TAGS = "sansLesTags";
/** 'avecUnTag' : supprime tous les enregistrements contenant au moins un des tags indiqués. */
const NETTOYAGE_MODE_AVEC_UN_TAG = "avecUnTag";
/**
* Dernier identifiant de cache utilisé.
*
* @var string $dernier_id
*/
private $dernier_id = null;
/**
* Les options disponibles pour le cache :
* ====> (string) stockage_mode :
* Indique le mode de stockage du cache à utiliser parmis :
* - Cache::STOCKAGE_MODE_FICHIER : sous forme d'une arborescence de fichiers et dossier
* - Cache::STOCKAGE_MODE_SQLITE : sous forme d'une base de données SQLite
*
* ====> (string) stockage_chemin :
* Chemin vers :
* - Cache::STOCKAGE_MODE_FICHIER : le dossier devant contenir l'arborescence.
* - Cache::STOCKAGE_MODE_SQLITE : le fichier contenant la base SQLite.
*
* ====> (boolean) controle_ecriture :
* - Active / Désactive le controle d'écriture (le cache est lue jute après l'écriture du fichier pour détecter sa corruption)
* - Activer le controle d'écriture ralentira légèrement l'écriture du fichier de cache mais pas sa lecture
* Le controle d'écriture peut détecter la corruption de fichier mais ce n'est pas un système de controle parfait.
*
* ====> (boolean) mise_en_cache :
* - Active / Désactive la mise en cache
* (peut être très utile pour le débogage des scripts utilisant le cache
*
* =====> (string) cache_id_prefixe :
* - préfixe pour les identifiant de cache ( = espace de nom)
*
* ====> (boolean) serialisation_auto :
* - Active / Désactive la sérialisation automatique
* - Peut être utilisé pour sauver directement des données qui ne sont pas des chaines (mais c'est plus lent)
*
* ====> (int) nettoyage_auto :
* - Désactive / Régler le processus de nettoyage automatique
* - Le processus de nettoyage automatiques détruit les fichier trop vieux (pour la durée de vie donnée)
* quand un nouveau fichier de cache est écrit :
* 0 => pas de nettoyage automatique
* 1 => nettoyage automatique systématique
* x (integer) > 1 => nettoyage automatique toutes les 1 fois (au hasard) sur x écriture de fichier de cache
*
* ====> (int) duree_de_vie :
* - Durée de vie du cache (en secondes)
* - Si null, le cache est valide indéfiniment.
*
* @var array $options les options disponibles pour le cache .
*/
protected $options = array(
'stockage_mode' => self::STOCKAGE_MODE_FICHIER,
'stockage_chemin' => null,
'controle_ecriture' => true,
'mise_en_cache' => true,
'cache_id_prefixe' => null,
'serialisation_auto' => false,
'nettoyage_auto' => 10,
'duree_de_vie' => 3600,
);
protected $stockage = null;
public function __construct($options = array(), $options_stockage = array()) {
$this->initialiserOptionsParConfig();
$this->setOptions($options);
if ($this->options['stockage_mode'] == self::STOCKAGE_MODE_FICHIER) {
$this->stockage = new CacheFichier($options_stockage, $this);
$this->stockage->setEmplacement($this->options['stockage_chemin']);
} else if ($this->options['stockage_mode'] == self::STOCKAGE_MODE_SQLITE) {
$this->stockage = new CacheSqlite($options_stockage, $this);
$this->stockage->setEmplacement($this->options['stockage_chemin']);
} else {
trigger_error("Ce mode de stockage n'existe pas ou ne supporte pas la création par le constructeur", E_USER_WARNING);
}
}
private function initialiserOptionsParConfig() {
while (list($nom, $valeur) = each($this->options)) {
if (Config::existe($nom)) {
$this->options[$nom] = Config::get($nom);
}
}
}
private function setOptions($options) {
while (list($nom, $valeur) = each($options)) {
if (!is_string($nom)) {
trigger_error("Nom d'option incorecte : $nom", E_USER_WARNING);
}
$nom = strtolower($nom);
if (array_key_exists($nom, $this->options)) {
$this->options[$nom] = $valeur;
}
}
}
/**
* Permet de (re-)définir l'emplacement pour le stockage du cache.
* En fonction du mode de stockage utilisé , l'emplacement indiqué correspondra au chemin du :
* - dossier où stocker les fichiers pour le mode "fichier".
* - fichier de la base de données pour le mode "sqlite".
* @param string $emplacement chemin vers dossier (Cache::STOCKAGE_MODE_FICHIER) ou fichier base Sqlite (Cache::STOCKAGE_MODE_SQLITE)
* @return void
*/
public function setEmplacement($emplacement) {
if ($emplacement != null) {
$this->executerMethodeStockage('setEmplacement', array($emplacement));
} else {
trigger_error("L'emplacement ne peut pas être null.", E_USER_WARNING);
}
}
public static function fabriquer($mode, $options = array()) {
if ($mode == self::STOCKAGE_MODE_SIMPLE) {
return new CacheSimple($options);
} else {
trigger_error("Le mode '$mode' de stockage n'existe pas ou ne supporte pas la création par fabrique", E_USER_WARNING);
}
return false;
}
/**
* Teste si un cache est disponible pour l'identifiant donné et (si oui) le retourne (false dans le cas contraire)
*
* @param string $id Identifiant de cache.
* @param boolean $ne_pas_tester_validiter_du_cache Si mis à true, la validité du cache n'est pas testée
* @return mixed|false Cached datas
*/
public function charger($id, $ne_pas_tester_validiter_du_cache = false) {
$donnees = false;
if ($this->options['mise_en_cache'] === true) {
$id = $this->prefixerId($id);
$this->dernier_id = $id;
self::validerIdOuTag($id);
$donnees = $this->executerMethodeStockage('charger', array($id, $ne_pas_tester_validiter_du_cache));
$donnees = $this->deserialiserAutomatiquement($donnees);
}
return $donnees;
}
/**
* Test if a cache is available for the given id
*
* @param string $id Cache id
* @return int|false Last modified time of cache entry if it is available, false otherwise
*/
public function tester($id) {
$resultat = false;
if ($this->options['mise_en_cache'] === true) {
$id = $this->prefixerId($id);
self::validerIdOuTag($id);
$this->dernier_id = $id;
$resultat = $this->executerMethodeStockage('tester', array($id));
}
return $resultat;
}
/**
* Sauvegarde en cache les données passées en paramètre.
*
* @param mixed $donnees Données à mettre en cache (peut être différent d'une chaine si serialisation_auto vaut true).
* @param string $id Identifiant du cache (s'il n'est pas définit, le dernier identifiant sera utilisé).
* @param array $tags Mots-clés du cache.
* @param int $duree_de_vie_specifique Si != false, indique une durée de vie spécifique pour cet enregistrement en cache (null => durée de vie infinie)
* @return boolean True si aucun problème n'est survenu.
*/
public function sauver($donnees, $id = null, $tags = array(), $duree_de_vie_specifique = false) {
$resultat = true;
if ($this->options['mise_en_cache'] === true) {
$id = ($id === null) ? $this->dernier_id : $this->prefixerId($id);
self::validerIdOuTag($id);
self::validerTableauDeTags($tags);
$donnees = $this->serialiserAutomatiquement($donnees);
$this->nettoyerAutomatiquement();
$resultat = $this->executerMethodeStockage('sauver', array($donnees, $id, $tags, $duree_de_vie_specifique));
if ($resultat == false) {
// Le cache étant peut être corrompu, nous le supprimons
$this->supprimer($id);
} else {
$resultat = $this->controlerEcriture($id, $donnees);
}
}
return $resultat;
}
/**
* Supprime un enregistrement en cache.
*
* @param string $id Identificant du cache à supprimer.
* @return boolean True si ok
*/
public function supprimer($id) {
$resultat = true;
if ($this->options['mise_en_cache'] === true) {
$id = $this->prefixerId($id);
self::validerIdOuTag($id);
$resultat = $this->executerMethodeStockage('supprimer', array($id));
}
return $resultat;
}
/**
* Nettoyage des enregistrements en cache
*
* Mode de nettoyage disponibles :
* 'tous' (défaut) => supprime tous les enregistrements ($tags n'est pas utilisé)
* 'expiration' => supprime tous les enregistrements dont la date d'expériration est dépassée ($tags n'est pas utilisé)
* 'avecLesTag' => supprime tous les enregistrements contenant tous les tags indiqués
* 'sansLesTag' => supprime tous les enregistrements contenant aucun des tags indiqués
* 'avecUnTag' => supprime tous les enregistrements contenant au moins un des tags indiqués
*
* @param string $mode mode de nettoyage
* @param array|string $tags peut être un tableau de chaîne ou une simple chaine.
* @return boolean True si ok
*/
public function nettoyer($mode = self::NETTOYAGE_MODE_TOUS, $tags = array()) {
$resultat = true;
if ($this->options['mise_en_cache'] === true) {
if (!in_array($mode, array(Cache::NETTOYAGE_MODE_TOUS,
Cache::NETTOYAGE_MODE_EXPIRATION,
Cache::NETTOYAGE_MODE_AVEC_LES_TAGS,
Cache::NETTOYAGE_MODE_SANS_LES_TAGS,
Cache::NETTOYAGE_MODE_AVEC_UN_TAG))) {
trigger_error("Le mode de nettoyage du cache indiqué n'est pas valide", E_USER_WARNING);
}
self::validerTableauDeTags($tags);
$resultat = $this->executerMethodeStockage('nettoyer', array($mode, $tags));
}
return $resultat;
}
 
/**
* Return an array of stored cache ids
*
* @return array array of stored cache ids (string)
*/
public function getIds() {
$ids = $this->executerMethodeStockage('getIds');
$ids = $this->supprimerPrefixe($ids);
return $ids;
}
 
/**
* Return an array of stored tags
*
* @return array array of stored tags (string)
*/
public function getTags() {
return $this->executerMethodeStockage('getTags');
}
/**
* Return an array of stored cache ids which match given tags
*
* In case of multiple tags, a logical AND is made between tags
*
* @param array $tags array of tags
* @return array array of matching cache ids (string)
*/
public function getIdsAvecLesTags($tags = array()) {
$ids = $this->executerMethodeStockage('getIdsAvecLesTags', array($tags));
$ids = $this->supprimerPrefixe($ids);
return $ids;
}
 
/**
* Return an array of stored cache ids which don't match given tags
*
* In case of multiple tags, a logical OR is made between tags
*
* @param array $tags array of tags
* @return array array of not matching cache ids (string)
*/
public function getIdsSansLesTags($tags = array()) {
$ids = $this->executerMethodeStockage('getIdsSansLesTags', array($tags));
$ids = $this->supprimerPrefixe($ids);
return $ids;
}
 
/**
* Return an array of stored cache ids which match any given tags
*
* In case of multiple tags, a logical OR is made between tags
*
* @param array $tags array of tags
* @return array array of matching any cache ids (string)
*/
public function getIdsAvecUnTag($tags = array()) {
$ids = $this->executerMethodeStockage('getIdsAvecUnTag', array($tags));
$ids = $this->supprimerPrefixe($ids);
return $ids;
}
 
/**
* Return the filling percentage of the backend storage
*
* @return int integer between 0 and 100
*/
public function getPourcentageRemplissage() {
return $this->executerMethodeStockage('getPourcentageRemplissage');
}
 
/**
* Return an array of metadatas for the given cache id
*
* The array will include these keys :
* - expire : the expire timestamp
* - tags : a string array of tags
* - mtime : timestamp of last modification time
*
* @param string $id cache id
* @return array array of metadatas (false if the cache id is not found)
*/
public function getMetadonnees($id) {
$id = $this->prefixerId($id);
return $this->executerMethodeStockage('getMetadonnees', array($id));
}
 
/**
* Give (if possible) an extra lifetime to the given cache id
*
* @param string $id cache id
* @param int $extraLifetime
* @return boolean true if ok
*/
public function ajouterSupplementDureeDeVie($id, $supplement_duree_de_vie) {
$id = $this->prefixerId($id);
return $this->executerMethodeStockage('ajouterSupplementDureeDeVie', array($id, $supplement_duree_de_vie));
}
 
/**
* Fabrique et retourne l'identifiant du cache avec son préfixe.
*
* Vérifie l'option 'cache_id_prefixe' et retourne le nouvel id avec préfixe ou simplement l'id lui même si elle vaut null.
*
* @param string $id Identifiant du cache.
* @return string Identifiant du cache avec ou sans préfixe.
*/
private function prefixerId($id) {
$nouvel_id = $id;
if (($id !== null) && isset($this->options['cache_id_prefixe'])) {
$nouvel_id = $this->options['cache_id_prefixe'].$id;
}
return $nouvel_id;
}
private function executerMethodeStockage($methode, $params = null) {
if (method_exists($this->stockage, $methode)) {
if ($params == null) {
$resultat = call_user_func(array($this->stockage, $methode));
} else {
$resultat = call_user_func_array(array($this->stockage, $methode), $params);
}
} else {
$resultat = false;
trigger_error("La méthode '$methode' n'existe pas dans la classe '".get_class($this)."'.", E_USER_WARNING);
}
return $resultat;
}
private function supprimerPrefixe($ids) {
// Il est nécessaire de retirer les cache_id_prefixe des ids (voir #ZF-6178, #ZF-7600)
if (isset($this->options['cache_id_prefixe']) && $this->options['cache_id_prefixe'] !== '') {
$prefixe =& $this->options['cache_id_prefixe'];
$prefixe_longueur = strlen($prefixe);
foreach ($ids as &$id) {
if (strpos($id, $prefixe) === 0) {
$id = substr($id, $prefixe_longueur);
}
}
}
return $ids;
}
private function controlerEcriture($id, $donnees_avant_ecriture) {
$resultat = true;
if ($this->options['controle_ecriture']) {
$donnees_apres_ecriture = $this->executerMethodeStockage('charger', array($id, true));
if ($donnees_avant_ecriture != $donnees_apres_ecriture) {
$this->executerMethodeStockage('supprimer', array($id));
$resultat = false;
}
}
return $resultat;
}
private function deserialiserAutomatiquement($donnees) {
if ($donnees !== false && $this->options['serialisation_auto']) {
// we need to unserialize before sending the result
$donnees = unserialize($donnees);
}
return $donnees;
}
private function serialiserAutomatiquement($donnees) {
if ($this->options['serialisation_auto']) {
// we need to serialize datas before storing them
$donnees = serialize($donnees);
} else {
if (!is_string($donnees)) {
trigger_error("Les données doivent être une chaîne de caractères ou vous devez activez l'option serialisation_auto = true", E_USER_WARNING);
}
}
return $donnees;
}
private function nettoyerAutomatiquement() {
if ($this->options['nettoyage_auto'] > 0) {
$rand = rand(1, $this->options['nettoyage_auto']);
if ($rand == 1) {
$this->nettoyer(self::NETTOYAGE_MODE_EXPIRATION);
}
}
}
/**
* Valide un identifiant de cache ou un tag (securité, nom de fichiers fiables, préfixes réservés...)
*
* @param string $chaine Identificant de cache ou tag
* @return void
*/
protected static function validerIdOuTag($chaine) {
if (!is_string($chaine)) {
trigger_error('Id ou tag invalide : doit être une chaîne de caractères', E_USER_ERROR);
}
if (substr($chaine, 0, 9) == 'internal-') {
trigger_error('"internal-*" identifiants ou tags sont réservés', E_USER_WARNING);
}
if (!preg_match('~^[a-zA-Z0-9_]+$~D', $chaine)) {
trigger_error("Id ou tag invalide '$chaine' : doit contenir seulement [a-zA-Z0-9_]", E_USER_WARNING);
}
}
 
/**
* Valide un tableau de tags (securité, nom de fichiers fiables, préfixes réservés...)
*
* @param array $tags tableau de tags
* @return void
*/
protected static function validerTableauDeTags($tags) {
if (!is_array($tags)) {
trigger_error("Tableau de tags invalide : doit être un tableau 'array'", E_USER_WARNING);
}
foreach ($tags as $tag) {
self::validerIdOuTag($tag);
}
reset($tags);
}
/**
* Calcule et retourne le timestamp d'expiration
*
* @return int timestamp d'expiration (unix timestamp)
*/
public function getTimestampExpiration($duree_de_vie) {
if ($duree_de_vie === false) {
if (isset($this->options['duree_de_vie']) && is_int($this->options['duree_de_vie'])) {
$duree_de_vie = (int) $this->options['duree_de_vie'];
} else {
$duree_de_vie = 3600;
}
}
$timestamp = ($duree_de_vie === null) ? 9999999999 : (time() + $duree_de_vie);
return $timestamp;
}
}
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/I18n.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-545736690"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-545736690" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>I18n.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/I18n.html">I18n</a></td>
<td><em>I18n permet de traduire une application à partir de données stockées dans des fichiers ini.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/I18n.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Log.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-741583854"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-741583854" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Log.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Log.html">Log</a></td>
<td><em>Classe permettant de logger des messages dans les fichier situés dans le dossier de log.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Log.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/SquelettePhp.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-202708911"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-202708911" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>SquelettePhp.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/SquelettePhp.html">SquelettePhp</a></td>
<td><em>Classe SquelettePhp, traitant les squelette Php utilisant la syntaxe courte php ou pas.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/SquelettePhp.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/CacheSqlite.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-754829553"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-754829553" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>CacheSqlite.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/CacheSqlite.html">CacheSqlite</a></td>
<td><em></em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/CacheSqlite.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Debug.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-146028182"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-146028182" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Debug.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Debug.html">Debug</a></td>
<td><em>Classe fournissant des fonctions de débogage équivalante à var_dump et print_r.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Debug.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Bdd.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1595470916"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1595470916" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Bdd.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Bdd.html">Bdd</a></td>
<td><em>Classe Bdd, d&#039;accés au base de données.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Bdd.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/I18n.php.txt
New file
0,0 → 1,235
<?php
// declare(encoding='UTF-8');
/**
* I18n permet de traduire une application à partir de données stockées dans des fichiers ini.
* Si vous souhaitez utiliser le fonctionnement par défaut vous devrez :
* - déposer les fichiers ini dans le dossier définit par la variable de config "chemin_i18n".
* - nommer les fichiers selon la forme "locale.ini" (Ex.: fr.ini ou fr_CH.ini ).
*
* Elle offre l'accès en lecture seule aux paramètres des fichiers ini.
* C'est une Singleton. Une seule classe de traduction peut être instanciée par Application.
*
* @category PHP 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
* @since 0.3
* @version $Id: I18n.php 330 2011-02-24 18:03:07Z jpm $
* @link /doc/framework/
*/
class I18n {
/** Format de traduction utilisant les fichier .ini */
const FORMAT_INI = '.ini';
/** Instance de la classe pointant sur elle même (pour le pattern singleton) */
private static $instance = null;
/** Fichiers de traduction disponibles. */
private static $traductions = array();
/** Langue courrante utilisée par l'application. */
private static $langue = null;
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
private static $parametres_obligatoires = array('chemin_i18n', 'i18n_url_parametre', 'i18n_langue_defaut', 'debogage');
private function __construct() {
Config::verifierPresenceParametres(self::$parametres_obligatoires);
self::trouverLangue();
}
/**
* Accesseur pour la valeur d'une traduction
* @param string $param le nom du paramètre
* @return string la valeur du paramètre
*/
public static function get($identifiant, $langue = null) {
self::verifierCreationInstance();
$texte = '';
// Récupération de la langue actuellement demandée
$langue_a_charger = self::$langue;
if (!is_null($langue)) {
$langue_a_charger = $langue;
}
if (!isset(self::$traductions[$langue_a_charger])) {
// Tentative de chargement du fichier de traduction
$chargement = self::charger($langue_a_charger);
if ($chargement === false) {
$m = "Le fichier d'i18n pour la langue '$langue_a_charger' demandée n'a pas été trouvé.";
self::ajouterErreur($m);
}
}
// Recherche de la langue dans le tableau des traductions
if (isset(self::$traductions[$langue_a_charger]) && self::$traductions[$langue_a_charger] !== false) {
// Recherche de la traduction demandée
$valeur = self::getValeur($identifiant, self::$traductions[$langue_a_charger]);
if ($valeur !== false) {
$texte = $valeur;
} else {
$m = "Le traduction n'existe pas pour l'identifiant '$identifiant' demandé.";
self::ajouterErreur($m);
}
}
return $texte;
}
/**
* Charge un fichier ini dans le tableau des paramètres de l'appli
* @param string $fichier_ini le nom du fichier à charger
* @return boolean true, si le fichier a été trouvé et correctement chargé, sinon false.
*/
public static function charger($langue, $fichier = null, $format = self::FORMAT_INI) {
self::verifierCreationInstance();
$ok = false;
// Création du chemin vers le fichier de traduction par défaut
if (is_null($fichier)) {
$fichier = Config::get('chemin_i18n').$langue.$format;
}
 
// Chargement
if ($format == self::FORMAT_INI) {
$ok = self::chargerFichierIni($fichier, $langue);
} else {
$m = "Le format '$format' de fichier de traduction n'est pas pris en compte par le Framework.";
self::ajouterErreur($m);
}
return $ok;
}
/**
* Définit la langue utiliser pour rechercher une traduction.
* @param string $fichier_ini le nom du fichier à charger
* @return array le fichier ini parsé
*/
public static function setLangue($langue) {
self::verifierCreationInstance();
self::$langue = $langue;
}
/**
* Renvoie la valeur demandé grâce une chaine de paramètres
* @param string $param la chaine identifiante
* @param array $i18n le tableau de traductions
* @return mixed la valeur correspondante à la chaine identifiante si elle est trouvée, sinon false.
*/
private static function getValeur($param, $i18n) {
if ($param === null) {
return false;
} else {
if (isset($i18n[$param])) {
return $i18n[$param];
} else if (strpos($param, '.') !== false) {
$pieces = explode('.', $param, 2);
if (strlen($pieces[0]) && strlen($pieces[1])) {
if (isset($i18n[$pieces[0]])) {
if (is_array($i18n[$pieces[0]])) {
return self::getValeur($pieces[1], $i18n[$pieces[0]]);
}
}
}
} else {
return false;
}
}
}
/**
* Parse le fichier ini donné en paramètre
* @param string $fichier_ini nom du fichier ini à parser
* @param string $langue la langue correspondant au fichier
* @return boolean true si le chargement c'est bien passé, sinon false.
*/
private static function chargerFichierIni($fichier_ini, $langue) {
self::$traductions[$langue] = false;
if (file_exists($fichier_ini)) {
$ini = parse_ini_file($fichier_ini, true);
$ini = self::analyserTableauIni($ini);
self::$traductions[$langue] = $ini;
}
return (self::$traductions[$langue] === false) ? false : true;
}
/**
* Analyse un tableau de traductions pour évaluer les clés.
* @param array $i18n le tableau de traductions
* @return array le tableau analysé et modifié si nécessaire.
*/
private static function analyserTableauIni($i18n = array()) {
//ATTENTION : il est important de passer la valeur par référence car nous la modifions dynamiquement dans la boucle
foreach ($i18n as $cle => &$valeur) {
if (is_array($valeur)) {
$i18n[$cle] = self::analyserTableauIni($valeur);
} else {
$i18n = self::evaluerCle($i18n, $cle, $valeur);
}
}
return $i18n;
}
/**
* Dans le cas des chaines de traduction à sous clé (ex.: cle.souscle), cette méthode
* évalue les valeurs correspondantes et créée les sous tableaux associés.
* @param array $i18n tableau de traductions (par référence)
* @param string $cle la cle dans le tableau
* @param string $valeur la valeur à affecter
*/
private static function evaluerCle($i18n, $cle, $valeur) {
if (strpos($cle, '.') !== false) {
unset($i18n[$cle]);
$pieces = explode('.', $cle, 2);
if (strlen($pieces[0]) && strlen($pieces[1])) {
if (isset($i18n[$pieces[0]]) && !is_array($i18n[$pieces[0]])) {
$m = "Ne peut pas créer de sous-clé pour '{$pieces[0]}' car la clé existe déjà";
trigger_error($m, E_USER_WARNING);
} else {
$i18n[$pieces[0]][$pieces[1]] = $valeur;
$i18n[$pieces[0]] = self::evaluerCle($i18n[$pieces[0]], $pieces[1], $valeur);
}
} else {
$m = "Clé invalide '$cle'";
trigger_error($m, E_USER_WARNING);
}
} else {
$i18n[$cle] = $valeur;
}
return $i18n;
}
/**
* Cherche l'information sur la langue demandée par l'application
*/
private static function trouverLangue() {
if (isset($_GET[Config::get('i18n_url_parametre')])) {
self::$langue = $_GET[Config::get('i18n_url_parametre')];
} else {
self::$langue = Config::get('i18n_langue_defaut');
}
}
/**
* Vérifie si l'instance de classe à été crée, si non la crée
*/
private static function verifierCreationInstance() {
if (empty(self::$instance)) {
self::$instance = new I18n();
}
}
/**
* Ajouter une message d'erreur
*/
private static function ajouterErreur($m, $e = E_USER_WARNING) {
if (Config::get('debogage') === true) {
trigger_error($m, $e);
}
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/Controleur.php.html
New file
0,0 → 1,279
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-659117570"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-659117570" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Controleur.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Controleur.html">Controleur</a></td>
<td><em>Classe Controleur, coeur d&#039;une application, c&#039;est normalement la seule classe d&#039;une application
qui devrait être appelée de l&#039;extérieur.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Controleur.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Log.php.txt
New file
0,0 → 1,149
<?php
//declare(encoding='UTF-8');
/**
* Classe permettant de logger des messages dans les fichier situés dans le dossier de log.
*
* @category PHP 5.2
* @package Framework
* @author Aurélien PERONNET <aurelien@tela-botanica.org>
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
* @version $Id: Log.php 274 2010-12-28 15:37:22Z jpm $
* @link /doc/framework/
*/
class Log {
 
/** Boolean indiquant si l'on doit utiliser les logs ou pas. */
private static $logger = false;
 
/** Tableau associatif stockant les descripteurs de fichiers. */
private static $fichiersLog = array();
 
/** Chemin de base du dossier log de l'application. */
private static $cheminLogs = '';
 
/** Booleen indiquant si l'on peut correctement écrire dans les fichiers de logs. */
private static $droitLogger = true;
 
/** Zone horaire (pour éviter des avertissements dans les dates). */
private static $timeZone = 'Europe/Paris';
 
/** Taille maximum d'un fichier de log avant que celui ne soit archivé (en octets). */
private static $tailleMax = 10000;
 
/** séparateur de dossier dans un chemin. */
private static $sd = DIRECTORY_SEPARATOR;
 
/** Extension des fichiers de log. */
private static $ext = '.log';
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
private static $parametres_obligatoires = array('chemin_logs', 'i18n_timezone', 'log_taille_max', 'log_debogage');
 
/** Initialiser les logs par défaut, sans tenir comptes des paramêtres de config. */
public static function initialiser() {
// gestion de la timezone pour éviter des erreurs
if (function_exists('date_default_timezone_set') && function_exists('date_default_timezone_get')) {
date_default_timezone_set(self::$timeZone);
}
 
if (self::$logger && (!is_dir(self::$cheminLogs) || !is_writable(self::$cheminLogs))) {
self::desactiverEcriture();
}
}
/** Configure le Log à partir des paramêtres de config. */
public static function configurer() {
Config::verifierPresenceParametres(self::$parametres_obligatoires);
self::$cheminLogs = Config::get('chemin_logs');
self::$timeZone = (Config::get('i18n_timezone') != '') ? Config::get('i18n_timezone') : self::$timeZone;
self::$tailleMax = (Config::get('log_taille_max') != '') ? Config::get('log_taille_max') : self::$tailleMax;
self::$logger = (Config::get('log_debogage') != '') ? Config::get('log_debogage') : self::$logger;
self::initialiser();
}
 
/**
* Ajoute une entrée au log spécifié par le paramètre $nomFichier
* @param string $nomFichier le nom du fichier dans lequel écrire
*/
public static function ajouterEntree($nomFichier, $entree, $mode = 'a+') {
if (self::$droitLogger) {
$date = "\n\n".date('d m Y H:i')."\n" ;
 
if (self::verifierOuvrirFichier($nomFichier, $mode)) {
fwrite(self::$fichiersLog[$nomFichier], $date.$entree);
self::verifierTailleFichierOuArchiver($nomFichier);
} else {
self::desactiverEcriture($nomFichier);
}
}
}
 
/**
* Vide un fichier log indiqué
* @param string $nomFichier le nom du fichier à vider
*/
public static function viderLog($nomFichier) {
self::ajouterEntree($nomFichier, '', 'w');
}
 
/**
* Vérifie la présence d'un fichier dans le tableau, ses droits d'écriture, l'ouvre si nécessaire.
*
* @param string $nomFichier le nom du fichier dont on doit vérifier la présence
* @return boolean true si le fichier est ouvert ou maintenant accessible, false sinon
*/
public static function verifierOuvrirFichier($nomFichier,$mode) {
if (in_array($nomFichier, self::$fichiersLog)) {
if (is_writable(self::$cheminLogs.$nomFichier.self::$ext)) {
return true;
}
return false;
} else {
$fp = @fopen(self::$cheminLogs.$nomFichier.self::$ext,$mode);
if ($fp && is_writable(self::$cheminLogs.$nomFichier.self::$ext)) {
self::$fichiersLog[$nomFichier] = $fp;
return true;
}
return false;
}
}
 
/**
* Vérifie la taille d'un fichier donné et si celle ci est trop importante
* archive le fichier de log
* @param string $nomFichier nom du fichier à vérifier
*/
private static function verifierTailleFichierOuArchiver($nomFichier) {
if(filesize(self::$cheminLogs.$nomFichier.self::$ext) > self::$tailleMax) {
rename(self::$cheminLogs.$nomFichier.self::$ext,self::$cheminLogs.$nomFichier.date('d_m_Y_H:i').self::$ext);
self::ajouterEntree($nomFichier,'');
}
}
 
/**
* Désactive l'écriture du log et envoie un message au gestionnaire d'erreurs
* @param string $nomFichier le nom du fichier qui a causé l'erreur
*/
private static function desactiverEcriture($nomFichier = '') {
self::$droitLogger = false;
if ($nomFichier != '') {
$fichierDossier = 'fichier '.$nomFichier ;
} else {
$fichierDossier = 'dossier des logs';
}
$message = 'Écriture impossible dans le '.$fichierDossier.', Assurez-vous des droits du dossier et des fichiers';
$e = new ErrorException($message, 0, E_USER_WARNING, __FILE__, __LINE__);
GestionnaireException::gererException($e);
}
 
/** Destructeur de classe, ferme les descripteurs ouverts. */
public function __destruct() {
foreach(self::$fichiersLog as $nomFichier => $fp) {
fclose($fp);
}
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/SquelettePhp.php.txt
New file
0,0 → 1,73
<?php
// declare(encoding='UTF-8');
/**
* Classe SquelettePhp, traitant les squelette Php utilisant la syntaxe courte php ou pas.
* Ces méthodes sont statiques.
*
* @category php5
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
* @version $Id: SquelettePhp.php 241 2010-12-06 15:19:07Z jpm $
* @link /doc/framework/
*/
class SquelettePhp {
 
/**
* Fonction prenant en paramètre un chemin de fichier squelette et un tableau associatif de données,
* en extrait les variables, charge le squelette et retourne le résultat des deux combinés.
*
* @param String $fichier le chemin du fichier du squelette
* @param Array $donnees un tableau associatif contenant les variables a injecter dans le squelette.
* @return boolean false si la vue n'existe pas, sinon la chaine résultat.
*/
public static function analyser($fichier, Array &$donnees = array()) {
$sortie = false;
if (file_exists($fichier)) {
// Extraction des variables du tableau de données
extract($donnees);
 
// Démarage de la bufferisation de sortie
ob_start();
// Si les tags courts sont activés
if ((bool) @ini_get('short_open_tag') === true) {
// Simple inclusion du squelette
include $fichier;
} else {
// Sinon, remplacement des tags courts par la syntaxe classique avec echo
$html_et_code_php = self::traiterTagsCourts($fichier);
// Pour évaluer du php mélangé dans du html il est nécessaire de fermer la balise php ouverte par eval
$html_et_code_php = '?>'.$html_et_code_php;
// Interprétation du html et du php dans le buffer
echo eval($html_et_code_php);
}
// Récupèration du contenu du buffer
$sortie = ob_get_contents();
// Suppression du buffer
@ob_end_clean();
} else {
$msg = "Le fichier du squelette '$fichier' n'existe pas.";
trigger_error($msg, E_USER_WARNING);
}
// Retourne le contenu
return $sortie;
}
 
/**
* Fonction chargeant le contenu du squelette et remplaçant les tags court php (<?= ...) par un tag long avec echo.
*
* @param String $chemin_squelette le chemin du fichier du squelette
* @return string le contenu du fichier du squelette php avec les tags courts remplacés.
*/
private static function traiterTagsCourts($chemin_squelette) {
$contenu = file_get_contents($chemin_squelette);
// Remplacement de tags courts par un tag long avec echo
$contenu = str_replace('<?=', '<?php echo ', $contenu);
// Ajout systématique d'un point virgule avant la fermeture php
$contenu = preg_replace("/;*\s*\?>/", "; ?>", $contenu);
return $contenu;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/Registre.php.txt
New file
0,0 → 1,68
<?php
// declare(encoding='UTF-8');
/**
* Classe Registre, qui permet un accès à différentes variables et paramètres à travers les autres classes.
* C'est un remplaçant à la variable magique $_GLOBALS de Php.
* C'est un singleton.
* Si vous voulez paramètré votre application via un fichier de configuration, utilisez plutôt la classe @see Config.
*
* @category php 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jmp@tela-botanica.org>
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
* @version $Id: Registre.php 301 2011-01-18 14:23:52Z jpm $
* @link /doc/framework/
*
*/
class Registre {
 
/** Tableau associatif stockant les variables. */
private static $stockage = array();
/**
* Ajoute un objet au tableau selon un intitulé donné.
* @param string l'intitulé sous lequel l'objet sera conservé
* @param mixed l'objet à conserver
*/
public static function set($intitule, $objet) {
if (is_array($objet) && isset(self::$stockage[$intitule])) {
self::$stockage[$intitule] = array_merge((array) self::$stockage[$intitule], (array) $objet);
$message = "Le tableau $intitule présent dans le registre a été fusionné avec un nouveau tableau de même intitulé !";
trigger_error($message, E_USER_WARNING);
} else {
self::$stockage[$intitule] = $objet;
}
}
 
/**
* Renvoie le contenu associé à l'intitulé donné en paramètre.
* @return mixed l'objet associé à l'intitulé ou null s'il n'est pas présent
*/
public static function get($intitule) {
$retour = (isset(self::$stockage[$intitule])) ? self::$stockage[$intitule] : null;
return $retour;
}
 
/**
* Détruit l'objet associé à l'intitulé, n'a pas d'effet si il n'y a pas d'objet associé.
* @param string l'intitulé de l'entrée du registre à détruire.
*/
public static function detruire($intitule) {
if (isset(self::$stockage[$intitule])) {
unset(self::$stockage[$intitule]);
}
}
 
/**
* Teste si le registre contient une donnée pour un intitulé d'entrée donné.
* @param string l'intitulé de l'entrée du registre à tester.
* @return boolean true si un objet associé à cet intitulé est présent, false sinon
*/
public static function existe($intitule) {
$retour = (isset(self::$stockage[$intitule])) ? true : false;
return $retour;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/CacheSqlite.php.txt
New file
0,0 → 1,617
<?php
class CacheSqlite {
/**
* Options disponibles :
*
* ====> (string) stockage_chemin :
* Chemin vers le fichier contenant la base SQLite.
*
*
* ====> (int) defragmentation_auto :
* - Désactive / Régler le processus de défragmentation automatique
* - Le processus de défragmentation automatiques réduit la taille du fichier contenant la base de données
* quand un ajout ou une suppression de cache est réalisée :
* 0 => pas de défragmentation automatique
* 1 => défragmentation automatique systématique
* x (integer) > 1 => défragmentation automatique toutes les 1 fois (au hasard) sur x ajout ou suppression de cache
*
* @var array options disponibles
*/
protected $options = array(
'stockage_chemin' => null,
'defragmentation_auto' => 10
);
/**
* DB ressource
*
* @var mixed $db
*/
private $bdd = null;
 
/**
* Boolean to store if the structure has benn checked or not
*
* @var boolean $structure_ok
*/
private $structure_ok = false;
 
private $Cache = null;
/**
* Constructor
*
* @param array $options Associative array of options
* @throws Zend_cache_Exception
* @return void
*/
public function __construct(array $options = array(), Cache $cache) {
$this->Cache = $cache;
if (extension_loaded('sqlite')) {
$this->initialiserOptionsParConfig();
$this->setOptions($options);
} else {
$e = "Impossible d'utiliser le cache SQLITE car l'extenssion 'sqlite' n'est pas chargée dans l'environnement PHP courrant.";
trigger_error($e, E_USER_ERROR);
}
}
private function initialiserOptionsParConfig() {
while (list($nom, $valeur) = each($this->options)) {
if (Config::existe($nom)) {
$this->options[$nom] = Config::get($nom);
}
}
}
/**
* Destructor
*
* @return void
*/
public function __destruct() {
@sqlite_close($this->getConnexion());
}
private function setOptions($options) {
while (list($nom, $valeur) = each($options)) {
if (!is_string($nom)) {
trigger_error("Nom d'option incorecte : $nom", E_USER_WARNING);
}
$nom = strtolower($nom);
if (array_key_exists($nom, $this->options)) {
$this->options[$nom] = $valeur;
}
}
}
public function setEmplacement($emplacement) {
if (extension_loaded('sqlite')) {
$this->options['stockage_chemin'] = $emplacement;
} else {
trigger_error("Impossible d'utiliser le mode de sotckage SQLite car l'extenssion 'sqlite' n'est pas chargé dans ".
"l'environnement PHP courrant.", E_USER_ERROR);
}
}
 
/**
* Test if a cache is available for the given id and (if yes) return it (false else)
*
* @param string $id Cache id
* @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested
* @return string|false Cached datas
*/
public function charger($id, $ne_pas_tester_validiter_du_cache = false) {
$this->verifierEtCreerStructureBdd();
$requete = "SELECT content FROM cache WHERE id = '$id'".
(($ne_pas_tester_validiter_du_cache) ? '' : ' AND (expire = 0 OR expire > '.time().')');
$resultat = $this->requeter($requete);
$ligne = @sqlite_fetch_array($resultat);
return ($ligne) ? $ligne['content'] : false;
}
 
/**
* Test if a cache is available or not (for the given id)
*
* @param string $id Cache id
* @return mixed|false (a cache is not available) or "last modified" timestamp (int) of the available cache record
*/
public function tester($id) {
$this->verifierEtCreerStructureBdd();
$requete = "SELECT lastModified FROM cache WHERE id = '$id' AND (expire = 0 OR expire > ".time().')';
$resultat = $this->requeter($requete);
$ligne = @sqlite_fetch_array($resultat);
return ($ligne) ? ((int) $ligne['lastModified']) : false;
}
 
/**
* Save some string datas into a cache record
*
* Note : $data is always "string" (serialization is done by the
* core not by the backend)
*
* @param string $data Datas to cache
* @param string $id Cache id
* @param array $tags Array of strings, the cache record will be tagged by each string entry
* @param int $specificLifetime If != false, set a specific lifetime for this cache record (null => infinite lifetime)
* @throws Zend_Cache_Exception
* @return boolean True if no problem
*/
public function sauver($donnees, $id, $tags = array(), $duree_vie_specifique = false) {
$this->verifierEtCreerStructureBdd();
//FIXME : si l'extension n'est pas installée, le cache passe tout de même par cette fonction et s'arrête à cet endroit.
$donnees = @sqlite_escape_string($donnees);
$timestamp_courrant = time();
$expiration = $this->Cache->getTimestampExpiration($duree_vie_specifique);
 
$this->requeter("DELETE FROM cache WHERE id = '$id'");
$sql = "INSERT INTO cache (id, content, lastModified, expire) VALUES ('$id', '$donnees', $timestamp_courrant, $expiration)";
$resultat = $this->requeter($sql);
if (!$resultat) {
// TODO : ajouter un log sauver() : impossible de stocker le cache d'id '$id'
Debug::printr("sauver() : impossible de stocker le cache d'id '$id'");
$resultat = false;
} else {
$resultat = true;
foreach ($tags as $tag) {
$resultat = $this->enregisterTag($id, $tag) && $resultat;
}
}
return $resultat;
}
 
/**
* Remove a cache record
*
* @param string $id Cache id
* @return boolean True if no problem
*/
public function supprimer($id) {
$this->verifierEtCreerStructureBdd();
$resultat = $this->requeter("SELECT COUNT(*) AS nbr FROM cache WHERE id = '$id'");
$resultat_nbre = @sqlite_fetch_single($resultat);
$suppression_cache = $this->requeter("DELETE FROM cache WHERE id = '$id'");
$suppression_tags = $this->requeter("DELETE FROM tag WHERE id = '$id'");
$this->defragmenterAutomatiquement();
return ($resultat_nbre && $suppression_cache && $suppression_tags);
}
 
/**
* Clean some cache records
*
* Available modes are :
* Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used)
* Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used)
* Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags
* ($tags can be an array of strings or a single string)
* Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags}
* ($tags can be an array of strings or a single string)
* Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => remove cache entries matching any given tags
* ($tags can be an array of strings or a single string)
*
* @param string $mode Clean mode
* @param array $tags Array of tags
* @return boolean True if no problem
*/
public function nettoyer($mode = Cache::NETTOYAGE_MODE_TOUS, $tags = array()) {
$this->verifierEtCreerStructureBdd();
$retour = $this->nettoyerSqlite($mode, $tags);
$this->defragmenterAutomatiquement();
return $retour;
}
 
/**
* Return an array of stored cache ids
*
* @return array array of stored cache ids (string)
*/
public function getIds() {
$this->verifierEtCreerStructureBdd();
$resultat = $this->requeter('SELECT id FROM cache WHERE (expire = 0 OR expire > '.time().')');
$retour = array();
while ($id = @sqlite_fetch_single($resultat)) {
$retour[] = $id;
}
return $retour;
}
 
/**
* Return an array of stored tags
*
* @return array array of stored tags (string)
*/
public function getTags() {
$this->verifierEtCreerStructureBdd();
$resultat = $this->requeter('SELECT DISTINCT(name) AS name FROM tag');
$retour = array();
while ($id = @sqlite_fetch_single($resultat)) {
$retour[] = $id;
}
return $retour;
}
 
/**
* Return an array of stored cache ids which match given tags
*
* In case of multiple tags, a logical AND is made between tags
*
* @param array $tags array of tags
* @return array array of matching cache ids (string)
*/
public function getIdsAvecLesTags($tags = array()) {
$this->verifierEtCreerStructureBdd();
$premier = true;
$ids = array();
foreach ($tags as $tag) {
$resultat = $this->requeter("SELECT DISTINCT(id) AS id FROM tag WHERE name='$tag'");
if ($resultat) {
$lignes = @sqlite_fetch_all($resultat, SQLITE_ASSOC);
$ids_tmp = array();
foreach ($lignes as $ligne) {
$ids_tmp[] = $ligne['id'];
}
if ($premier) {
$ids = $ids_tmp;
$premier = false;
} else {
$ids = array_intersect($ids, $ids_tmp);
}
}
}
$retour = array();
if (count($ids) > 0) {
foreach ($ids as $id) {
$retour[] = $id;
}
}
return $retour;
}
 
/**
* Return an array of stored cache ids which don't match given tags
*
* In case of multiple tags, a logical OR is made between tags
*
* @param array $tags array of tags
* @return array array of not matching cache ids (string)
*/
public function getIdsSansLesTags($tags = array()) {
$this->verifierEtCreerStructureBdd();
$resultat = $this->requeter('SELECT id FROM cache');
$lignes = @sqlite_fetch_all($resultat, SQLITE_ASSOC);
$retour = array();
foreach ($lignes as $ligne) {
$id = $ligne['id'];
$correspondance = false;
foreach ($tags as $tag) {
$resultat = $this->requeter("SELECT COUNT(*) AS nbr FROM tag WHERE name = '$tag' AND id = '$id'");
if ($resultat) {
$nbre = (int) @sqlite_fetch_single($resultat);
if ($nbre > 0) {
$correspondance = true;
}
}
}
if (!$correspondance) {
$retour[] = $id;
}
}
return $retour;
}
 
/**
* Return an array of stored cache ids which match any given tags
*
* In case of multiple tags, a logical AND is made between tags
*
* @param array $tags array of tags
* @return array array of any matching cache ids (string)
*/
public function getIdsAvecUnTag($tags = array()) {
$this->verifierEtCreerStructureBdd();
$premier = true;
$ids = array();
foreach ($tags as $tag) {
$resultat = $this->requeter("SELECT DISTINCT(id) AS id FROM tag WHERE name = '$tag'");
if ($resultat) {
$lignes = @sqlite_fetch_all($resultat, SQLITE_ASSOC);
$ids_tmp = array();
foreach ($lignes as $ligne) {
$ids_tmp[] = $ligne['id'];
}
if ($premier) {
$ids = $ids_tmp;
$premier = false;
} else {
$ids = array_merge($ids, $ids_tmp);
}
}
}
$retour = array();
if (count($ids) > 0) {
foreach ($ids as $id) {
$retour[] = $id;
}
}
return $retour;
}
 
/**
* Return the filling percentage of the backend storage
*
* @throws Zend_Cache_Exception
* @return int integer between 0 and 100
*/
public function getPourcentageRemplissage() {
$dossier = dirname($this->options['stockage_chemin']);
$libre = disk_free_space($dossier);
$total = disk_total_space($dossier);
$pourcentage = 0;
if ($total == 0) {
trigger_error("Impossible d'utiliser la fonction disk_total_space", E_USER_WARNING);
} else {
$pourcentage = ($libre >= $total) ? 100 : ((int) (100. * ($total - $libre) / $total));
}
return $pourcentage;
}
 
/**
* Return an array of metadatas for the given cache id
*
* The array must include these keys :
* - expire : the expire timestamp
* - tags : a string array of tags
* - mtime : timestamp of last modification time
*
* @param string $id cache id
* @return array array of metadatas (false if the cache id is not found)
*/
public function getMetadonnees($id) {
$this->verifierEtCreerStructureBdd();
$tags = array();
$resultat = $this->requeter("SELECT name FROM tag WHERE id = '$id'");
if ($resultat) {
$lignes = @sqlite_fetch_all($resultat, SQLITE_ASSOC);
foreach ($lignes as $ligne) {
$tags[] = $ligne['name'];
}
}
$resultat = $this->requeter("SELECT lastModified, expire FROM cache WHERE id = '$id'");
if ($resultat) {
$ligne = @sqlite_fetch_array($resultat, SQLITE_ASSOC);
$resultat = array(
'tags' => $tags,
'mtime' => $ligne['lastModified'],
'expiration' => $ligne['expire']);
} else {
$resultat = false;
}
return $resultat;
}
 
/**
* Give (if possible) an extra lifetime to the given cache id
*
* @param string $id cache id
* @param int $extraLifetime
* @return boolean true if ok
*/
public function ajouterSupplementDureeDeVie($id, $supplement_duree_de_vie) {
$this->verifierEtCreerStructureBdd();
$augmentation = false;
$requete = "SELECT expire FROM cache WHERE id = '$id' AND (expire = 0 OR expire > ".time().')';
$resultat = $this->requeter($requete);
if ($resultat) {
$expiration = @sqlite_fetch_single($resultat);
$nouvelle_expiration = $expiration + $supplement_duree_de_vie;
$resultat = $this->requeter('UPDATE cache SET lastModified = '.time().", expire = $nouvelle_expiration WHERE id = '$id'");
$augmentation = ($resultat) ? true : false;
}
return $augmentation;
}
 
/**
* Return the connection resource
*
* If we are not connected, the connection is made
*
* @throws Zend_Cache_Exception
* @return resource Connection resource
*/
private function getConnexion() {
if (!is_resource($this->bdd)) {
if ($this->options['stockage_chemin'] === null) {
$e = "L'emplacement du chemin vers le fichier de la base de données SQLite n'a pas été défini";
trigger_error($e, E_USER_ERROR);
} else {
$this->bdd = sqlite_open($this->options['stockage_chemin']);
if (!(is_resource($this->bdd))) {
$e = "Impossible d'ouvrir le fichier '".$this->options['stockage_chemin']."' de la base de données SQLite.";
trigger_error($e, E_USER_ERROR);
$this->bdd = null;
}
}
}
return $this->bdd;
}
 
/**
* Execute une requête SQL sans afficher de messages d'erreur.
*
* @param string $requete requête SQL
* @return mixed|false resultats de la requête
*/
private function requeter($requete) {
$bdd = $this->getConnexion();
//Debug::printr($requete);
$resultat = (is_resource($bdd)) ? @sqlite_query($bdd, $requete, SQLITE_ASSOC, $e_sqlite) : false;
if (is_resource($bdd) && ! $resultat) {
Debug::printr("Erreur SQLITE :\n$e_sqlite\nPour la requête :\n$requete\nRessource : $bdd");
}
return $resultat;
}
 
/**
* Deal with the automatic vacuum process
*
* @return void
*/
private function defragmenterAutomatiquement() {
if ($this->options['defragmentation_auto'] > 0) {
$rand = rand(1, $this->options['defragmentation_auto']);
if ($rand == 1) {
$this->requeter('VACUUM');
@sqlite_close($this->getConnexion());
}
}
}
 
/**
* Register a cache id with the given tag
*
* @param string $id Cache id
* @param string $tag Tag
* @return boolean True if no problem
*/
private function enregisterTag($id, $tag) {
$requete_suppression = "DELETE FROM tag WHERE name = '$tag' AND id = '$id'";
$resultat = $this->requeter($requete_suppression);
$requete_insertion = "INSERT INTO tag(name,id) VALUES ('$tag','$id')";
$resultat = $this->requeter($requete_insertion);
if (!$resultat) {
// TODO : ajouter un log -> impossible d'enregistrer le tag=$tag pour le cache id=$id");
Debug::printr("Impossible d'enregistrer le tag=$tag pour le cache id=$id");
}
return ($resultat) ? true : false;
}
 
/**
* Build the database structure
*
* @return false
*/
private function creerStructure() {
$this->requeter('DROP INDEX IF EXISTS tag_id_index');
$this->requeter('DROP INDEX IF EXISTS tag_name_index');
$this->requeter('DROP INDEX IF EXISTS cache_id_expire_index');
$this->requeter('DROP TABLE IF EXISTS version');
$this->requeter('DROP TABLE IF EXISTS cache');
$this->requeter('DROP TABLE IF EXISTS tag');
$this->requeter('CREATE TABLE version (num INTEGER PRIMARY KEY)');
$this->requeter('CREATE TABLE cache(id TEXT PRIMARY KEY, content BLOB, lastModified INTEGER, expire INTEGER)');
$this->requeter('CREATE TABLE tag (name TEXT, id TEXT)');
$this->requeter('CREATE INDEX tag_id_index ON tag(id)');
$this->requeter('CREATE INDEX tag_name_index ON tag(name)');
$this->requeter('CREATE INDEX cache_id_expire_index ON cache(id, expire)');
$this->requeter('INSERT INTO version (num) VALUES (1)');
}
 
/**
* Check if the database structure is ok (with the good version)
*
* @return boolean True if ok
*/
private function verifierBddStructureVersion() {
$version_ok = false;
$resultat = $this->requeter('SELECT num FROM version');
if ($resultat) {
$ligne = @sqlite_fetch_array($resultat);
if ($ligne) {
if (((int) $ligne['num']) == 1) {
$version_ok = true;
} else {
// TODO : ajouter un log CacheSqlite::verifierBddStructureVersion() : vielle version de la structure de la base de données de cache détectée => le cache est entrain d'être supprimé
}
}
}
return $version_ok;
}
 
/**
* Clean some cache records
*
* Available modes are :
* Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used)
* Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used)
* Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags
* ($tags can be an array of strings or a single string)
* Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags}
* ($tags can be an array of strings or a single string)
* Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => remove cache entries matching any given tags
* ($tags can be an array of strings or a single string)
*
* @param string $mode Clean mode
* @param array $tags Array of tags
* @return boolean True if no problem
*/
private function nettoyerSqlite($mode = Cache::NETTOYAGE_MODE_TOUS, $tags = array()) {
$nettoyage_ok = false;
switch ($mode) {
case Cache::NETTOYAGE_MODE_TOUS:
$suppression_cache = $this->requeter('DELETE FROM cache');
$suppression_tag = $this->requeter('DELETE FROM tag');
$nettoyage_ok = $suppression_cache && $suppression_tag;
break;
case Cache::NETTOYAGE_MODE_EXPIRATION:
$mktime = time();
$suppression_tag = $this->requeter("DELETE FROM tag WHERE id IN (SELECT id FROM cache WHERE expire > 0 AND expire <= $mktime)");
$suppression_cache = $this->requeter("DELETE FROM cache WHERE expire > 0 AND expire <= $mktime");
return $suppression_tag && $suppression_cache;
break;
case Cache::NETTOYAGE_MODE_AVEC_LES_TAGS:
$ids = $this->getIdsAvecLesTags($tags);
$resultat = true;
foreach ($ids as $id) {
$resultat = $this->supprimer($id) && $resultat;
}
return $resultat;
break;
case Cache::NETTOYAGE_MODE_SANS_LES_TAGS:
$ids = $this->getIdsSansLesTags($tags);
$resultat = true;
foreach ($ids as $id) {
$resultat = $this->supprimer($id) && $resultat;
}
return $resultat;
break;
case Cache::NETTOYAGE_MODE_AVEC_UN_TAG:
$ids = $this->getIdsAvecUnTag($tags);
$resultat = true;
foreach ($ids as $id) {
$resultat = $this->supprimer($id) && $resultat;
}
return $resultat;
break;
default:
break;
}
return $nettoyage_ok;
}
 
/**
* Check if the database structure is ok (with the good version), if no : build it
*
* @throws Zend_Cache_Exception
* @return boolean True if ok
*/
private function verifierEtCreerStructureBdd() {
if (! $this->structure_ok) {
if (! $this->verifierBddStructureVersion()) {
$this->creerStructure();
if (! $this->verifierBddStructureVersion()) {
$e = "Impossible de construire la base de données de cache dans ".$this->options['stockage_chemin'];
trigger_error($e, E_USER_WARNING);
$this->structure_ok = false;
}
}
$this->structure_ok = true;
}
return $this->structure_ok;
}
 
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/utilitaires.Encodage.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1392626813"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1392626813" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small>utilitaires</small>Encodage.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Encodage.html">Encodage</a></td>
<td><em>Classe fournissant des méthodes statiques concernant l&#039;encodage et le décodage des caractères de variable.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/utilitaires/Encodage.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Url.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-65538355"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-65538355" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Url.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Url.html">Url</a></td>
<td><em>Classe Url, gérant le découpage des paramètres, leurs modification etc.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Url.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Bdd.php.txt
New file
0,0 → 1,483
<?php
// declare(encoding='UTF-8');
/**
* Classe Bdd, d'accés au base de données.
* Elle fait office d'abstraction légère de base de données en utilisant diverses possibilités d'accès aux
* bases de données (PDO, mysql, mysqli, SQLite3).
* Les valeurs pour le paramètre 'bdd_abstraction' du fichier config.ini sont : pdo, mysql, mysqli, sqlite3
* Vous pouvez aussi utiliser : "php:Bdd::ABSTRACTION_PDO","php:Bdd::ABSTRACTION_MYSQL", "php:Bdd::ABSTRACTION_MYSQLI",
* "php:Bdd::ABSTRACTION_SQLITE3".
* Elle peut être étendue, pour ajouter le support d'autres bases de données où prendre en compte des méthodes spécifique à
* un type d'abstraction.
*
* @category php 5.2
* @package Framework
* @author Aurélien PERONNET <aurelien@tela-botanica.org>
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
*/
class Bdd {
/** Constante stockant le squelette du message en cas d'erreur de requête sql. */
const ERREUR_REQUETE_TPL = 'Requête echec.\nFichier : %s.\nLigne : %s.\nMessage : %s.\nRequête : %s';
 
/** Constante stockant le squelette du message en cas d'erreur de connexion à la base de données. */
const ERREUR_CONNEXION_TPL = 'Erreur de connexion à la base de données, vérifiez les paramètres du fichier de configuration.\nMessage : %S.';
 
/** Constante stockant le squelette du message en cas d'erreur de sélection de la base de données. */
const ERREUR_SELECTION_BDD_TPL = 'Erreur de sélection de la base de données, vérifiez les paramètres du fichier de configuration.\nMessage : %S.';
 
/** Constante stockant le code pour l'abstraction de PDO. */
const ABSTRACTION_PDO = 'pdo';
 
/** Constante stockant le code pour l'abstraction de mysql. */
const ABSTRACTION_MYSQL = 'mysql';
 
/** Constante stockant le code pour l'abstraction de mysqli. */
const ABSTRACTION_MYSQLI = 'mysqli';
 
/** Constante stockant le code pour l'abstraction de SQLite3. */
const ABSTRACTION_SQLITE3 = 'sqlite3';
 
/** Constante stockant le code pour le mode tableau associatif des résultats des requêtes. */
const MODE_ASSOC = 'ASSOC';
 
/** Constante stockant le code pour le mode objet des résultats des requêtes. */
const MODE_OBJET = 'OBJECT';
 
/** Mode de fetch associatif */
protected $ASSOC = '';
 
/** Mode de fetch objet */
protected $OBJECT = '';
 
/** abstraction de base de données utilisée */
protected $abstraction;
 
/** DSN pour accéder à la base de données */
protected $dsn;
 
/** Type de base de données (mysql, mysqli, etc ...) */
protected $type;
 
/** Hote herbergeant la base de données */
protected $hote;
 
/** Nom de la base de données à laquelle le modèle doit se connecter */
protected $bdd_nom;
 
/** Nom d'utilisateur */
protected $utilisateur;
 
/** Mot de passe */
protected $pass;
 
/** Encodage de la base de données */
protected $encodage = null;
 
/** Connexion à la base de données */
protected $connexion = null;
 
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
protected $parametres_obligatoires = array('bdd_abstraction', 'bdd_protocole', 'bdd_serveur', 'bdd_nom',
'bdd_utilisateur', 'bdd_mot_de_passe', 'bdd_encodage');
 
/** Constructeur par défaut, appelé à l'initialisation. */
public function __construct() {
Config::verifierPresenceParametres($this->parametres_obligatoires);
$this->abstraction = strtolower(Config::get('bdd_abstraction'));
$this->type = Config::get('bdd_protocole');
$this->hote = Config::get('bdd_serveur');
$this->bdd_nom = Config::get('bdd_nom');
$this->utilisateur = Config::get('bdd_utilisateur');
$this->pass = Config::get('bdd_mot_de_passe');
$this->encodage = Config::get('bdd_encodage');
 
if ($this->type == 'sqlite' || $this->type == 'sqlite2') {
$this->dsn = $this->type.':'.$this->hote;
} else {
$this->dsn = $this->type.':dbname='.$this->bdd_nom.';host='.$this->hote;
}
$this->initialiserProtocole();
}
 
/** Initialise les constantes de classe à leur bonne valeur et déclenche une erreur si le protocole n'est pas bien défini. */
protected function initialiserProtocole() {
switch ($this->abstraction) {
case self::ABSTRACTION_PDO :
$this->ASSOC = PDO::FETCH_ASSOC;
$this->OBJECT = PDO::FETCH_OBJ;
break;
case self::ABSTRACTION_MYSQL :
$this->ASSOC = 'mysql_fetch_assoc';
$this->OBJECT = 'mysql_fetch_object';
break;
case self::ABSTRACTION_MYSQLI :
$this->ASSOC = 'fetch_assoc';
$this->OBJECT = 'fetch_object';
break;
case self::ABSTRACTION_SQLITE3 :
$this->ASSOC = 'SQLITE3_ASSOC';
$this->OBJECT = 'SQLITE3_OBJECT';
break;
default:
$m = "Erreur : l'abstraction '{$this->abstraction}' n'est pas prise en charge";
trigger_error($m, E_USER_WARNING);
}
}
 
/**
* Connection à la base de données en utilisant les informations fournies par
* le fichier de configuration.
* Cette méthode est private et final car elle n'a pas vocation a être appelée par l'utilisateur.
* TODO : il est peut être nécessaire pour MYSQL, MYSQLi et SQLITE3 afin d'éviter les boucles infinis
* d'erreur quand la bdd n'est pas configuré d'utiliser : $this->connexion->query (comme pour PDO)
*/
protected function connecter() {
if ($this->connexion == null) {
switch ($this->abstraction) {
case self::ABSTRACTION_PDO :
try {
$this->connexion = new PDO($this->dsn, $this->utilisateur, $this->pass);
$this->connexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
$e = sprintf(self::ERREUR_CONNEXION_TPL, $e->getMessage());
trigger_error($e, E_USER_WARNING);
}
if ($this->encodage != null && $this->type == 'mysql') {
$this->connexion->query("SET names '".$this->encodage."'");
} else if ($this->type == 'sqlite') {
$this->connexion->query("PRAGMA case_sensitive_like = false");
}
break;
case self::ABSTRACTION_MYSQL :
$this->connexion = mysql_connect($this->hote, $this->utilisateur, $this->pass);
if ($this->connexion !== false) {
$selection = mysql_select_db($this->bdd_nom, $this->connexion);
if ($selection === false) {
$e = sprintf(self::ERREUR_SELECTION_BDD_TPL, mysql_error());
trigger_error($e, E_USER_WARNING);
}
} else {
$e = sprintf(self::ERREUR_CONNEXION_TPL, mysql_error());
trigger_error($e, E_USER_WARNING);
}
if ($this->encodage != null) {
$this->requeter("SET names '".$this->encodage."'");
}
break;
case self::ABSTRACTION_MYSQLI :
$this->connexion = @new mysqli($this->hote, $this->utilisateur, $this->pass, $this->bdd_nom);
if ($this->connexion->connect_errno) {
$e = sprintf(self::ERREUR_CONNEXION_TPL, $this->connexion->connect_error);
trigger_error($e, E_USER_WARNING);
}
if ($this->encodage != null) {
$this->requeter("SET names '".$this->encodage."'");
}
break;
case self::ABSTRACTION_SQLITE3 :
// cas particulier de sqllite, on considère que le nom de la base de données correspond au fichier à ouvrir
$this->connexion = new SQLite3($this->bdd_nom);
if (!$this->connexion) {
$e = sprintf(self::ERREUR_CONNEXION_TPL, '');
trigger_error($e, E_USER_WARNING);
}
$this->requeter("PRAGMA case_sensitive_like = false");
break;
default:
$this->connexion = null;
}
}
}
 
/**
* Permet de tester, puis de reconnecter une connection au cas ou celle aurait été
* perdue (utile dans le cas d'une connection ouverte depuis trop longtemps)
* @return boolean
*/
public function ping() {
try {
// requête très simple qui ne teste que l'activité de la connection
$requete = 'SELECT 1';
switch ($this->abstraction) {
case self::ABSTRACTION_PDO :
$retour = $this->connexion->query($requete);
break;
case self::ABSTRACTION_MYSQL :
$retour = mysql_query($requete, $this->connexion);
break;
case self::ABSTRACTION_MYSQLI :
$retour = $this->connexion->query($requete);
break;
case self::ABSTRACTION_SQLITE3 :
$retour = $this->connexion->exec($requete);
break;
}
} catch (PDOException $e) {
$this->connecter();
}
return true;
}
 
/**
* @deprecated changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see requeter
*/
final protected function requete($requete) {
return $this->requeter($requete);
}
 
/**
* Execute une requête et retourne le résultat tel que renvoyé par l'abstraction courante.
*
* @param string la requête à effectuer
* @return mixed un objet contenant le résultat de la requête
*/
public function requeter($requete) {
$this->connecter();
 
$retour = null;
switch ($this->abstraction) {
case self::ABSTRACTION_PDO :
try {
$retour = $this->connexion->query($requete);
} catch (PDOException $e) {
$m = sprintf(self::ERREUR_REQUETE_TPL, $e->getFile(), $e->getLine(), $e->getMessage(), $requete);
trigger_error($m, E_USER_WARNING);
}
break;
case self::ABSTRACTION_MYSQL :
$retour = mysql_query($requete, $this->connexion);
break;
case self::ABSTRACTION_MYSQLI :
$retour = $this->connexion->query($requete);
break;
case self::ABSTRACTION_SQLITE3 :
$retour = $this->connexion->exec($requete);
break;
}
return $retour;
}
 
/**
* @deprecated changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see recuperer
*/
final protected function requeteUn($requete, $mode = self::MODE_ASSOC) {
return $this->recuperer($requete, $mode);
}
 
/**
* Execute une requête et retourne le premier résultat sous forme de tableau (par défaut) ou d'objet.
* Les noms des champs de la base de données correspondent aux noms des clés du tableau ou aux noms des attributs de l'objet.
*
* @param string la requête à effectuer
* @param string le mode de retour ASSOC (Bdd::MODE_ASSOC) pour un tableau ou OBJECT (Bdd::MODE_OBJET) pour un objet.
* @return mixed un objet ou un tableau contenant le résultat de la requête
*/
public function recuperer($requete, $mode = self::MODE_ASSOC) {
$this->connecter();
 
$retour = null;
switch ($this->abstraction) {
case self::ABSTRACTION_PDO :
try {
$resultat = $this->connexion->query($requete);
$retour = ($resultat !== false) ? $resultat->fetch($this->$mode) : $resultat;
} catch (PDOException $e) {
$m = sprintf(self::ERREUR_REQUETE_TPL, $e->getFile(), $e->getLine(), $e->getMessage(), $requete);
trigger_error($m, E_USER_WARNING);
}
break;
case self::ABSTRACTION_MYSQL :
$res = mysql_query($requete, $this->connexion);
$fonction_fetch = $this->$mode;
$retour = $fonction_fetch($res);
break;
case self::ABSTRACTION_MYSQLI :
$res = $this->connexion->query($requete);
$fonction_fetch = $this->$mode;
$retour = $res->$fonction_fetch();
break;
case self::ABSTRACTION_SQLITE3 :
$retour = $this->connexion->querySingle($requete);
break;
}
return $retour;
}
 
/**
* @deprecated changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see recupererTous
*/
final protected function requeteTous($requete, $mode = self::MODE_ASSOC) {
return $this->recupererTous($requete, $mode);
}
 
/**
* Execute une requête et retourne un tableau de résultats. Un résultat peut être présentés sous forme
* de tableau (par défaut) ou d'objet.
* Les noms des champs de la base de données correspondent aux noms des clés du tableau résultat ou
* aux noms des attributs de l'objet résultat.
*
* @param string la requête à effectuer
* @param string le mode de retour des résultats : ASSOC (Bdd::MODE_ASSOC) pour un tableau ou OBJECT (Bdd::MODE_OBJET) pour un objet.
* @return array un tableau contenant les résultats sous forme d'objets ou de tableau (par défaut).
*/
public function recupererTous($requete, $mode = self::MODE_ASSOC) {
$this->connecter();
 
$retour = null;
switch ($this->abstraction) {
case self::ABSTRACTION_PDO :
try {
$resultat = $this->connexion->query($requete);
$retour = ($resultat !== false) ? $resultat->fetchAll($this->$mode) : $resultat;
} catch (PDOException $e) {
$m = sprintf(self::ERREUR_REQUETE_TPL, $e->getFile(), $e->getLine(), $e->getMessage(), $requete);
trigger_error($m, E_USER_WARNING);
}
break;
case self::ABSTRACTION_MYSQL :
$resultat = mysql_query($requete, $this->connexion);
$fonction_fetch = $this->$mode;
while ($ligne = $fonction_fetch($resultat)) {
$retour[] = $ligne;
}
break;
case self::ABSTRACTION_MYSQLI :
$resultat = $this->connexion->query($requete);
$function_fetch = $this->$mode;
while ($ligne = $resultat->$function_fetch()) {
$retour[] = $ligne;
}
break;
case self::ABSTRACTION_SQLITE3 :
$resultat = $this->connexion->query($requete);
while ($ligne = $resultat->fetch_array($this->ASSOC)) {
if ($mode == self::MODE_OBJET) {
// Cas particulier de sqllite qui n'a pas de fonction fetch_object
$ligneObjet = new stdClass();
foreach ($ligne as $colonne => $valeur) {
$ligneObjet->$colonne = $valeur;
}
$ligne = $ligneObjet;
}
$retour[] = $ligne;
}
break;
}
return $retour;
}
 
/**
* Protège une chaine de caractères ou le contenu d'un tablea avant l'insertion dans la base de données
* (ajout de quotes ou guillemets).
* @param Mixed une chaine ou un tableau à protéger
* @return mixed la chaine ou le tableau à protégé
*/
public function proteger($donnees) {
$this->connecter();
if (is_array($donnees)) {
$retour = $this->protegerTableau($donnees);
} else {
$retour = $this->protegerChaine($donnees);
}
return $retour;
}
 
/**
* Protège une chaine de caractères avant l'insertion dans la base de données (ajout de quotes ou guillemets).
* @param string la chaine à protéger
* @return string la chaine protégée
*/
private function protegerChaine($chaine) {
$retour = $chaine;
switch ($this->abstraction) {
case self::ABSTRACTION_PDO :
$retour = $this->connexion->quote($chaine);
break;
case self::ABSTRACTION_MYSQL :
$retour = '"'.mysql_real_escape_string($chaine, $this->connexion).'"';
break;
case self::ABSTRACTION_MYSQLI :
$retour = '"'.$this->connexion->real_escape_string($chaine).'"';
break;
case self::ABSTRACTION_SQLITE3 :
$retour = $this->connexion->escapeString($chaine);
break;
}
return $retour;
}
 
/**
* @deprecated changement de nom. Deviendra "private" dans la version 0.5. Utiliser à la place : @see proteger
*/
public function protegerTableau(Array $tableau) {
foreach ($tableau as $id => $val) {
if (is_array($val)) {
$tableau[$id] = $this->protegerTableau($val);
} else {
$tableau[$id] = $this->protegerChaine($val);
}
}
return $tableau;
}
 
/**
* Retourne l'identifiant de la dernière ligne insérée, ou la dernière valeur d'une séquence d'objets, dépendamment, dans
* le cas de PDO, du driver utilisé. Les méthodes utilisées pour retourner l'identifiant peuvent avoir des comportements
* différent. Consulter la documentation PHP correspondant à l'abstraction choisie avant de l'utiliser :
* @link(http://fr.php.net/manual/fr/pdo.lastinsertid.php, PDO::lastInsertId([ string $name = NULL ]))
* @link(http://php.net/manual/en/mysqli.insert-id.php, mysqli->insert_id())
* @link(http://fr.php.net/manual/fr/function.mysql-insert-id.php, mysql_insert_id())
* @link(http://fr.php.net/manual/fr/sqlite3.lastinsertrowid.php, SQLite3::lastInsertRowID())
* @param mixed un paramètre éventuel à transmettre (en fonction de l'abstraction de BDD utilisée).
* @return mixed le dernier identifiant de clé primaire ajouté dans la base de données (string ou int).
*/
public function recupererIdDernierAjout($parametres = null) {
$this->connecter();
 
$retour = null;
switch ($this->abstraction) {
case self::ABSTRACTION_PDO :
$retour = $this->connexion->lastInsertId($parametres);
break;
case self::ABSTRACTION_MYSQL :
$retour = mysql_insert_id($this->connexion);
break;
case self::ABSTRACTION_MYSQLI :
$retour = $this->connexion->insert_id();
break;
case self::ABSTRACTION_SQLITE3 :
$retour = $this->connexion->lastInsertRowID();
break;
}
return $retour;
}
 
/**
* Destructeur de classe, se contente de fermer explicitement la connexion à la base de donnée.
*/
public function __destruct() {
if (isset($this->connexion)) {
switch ($this->abstraction) {
case self::ABSTRACTION_PDO :
$this->connexion = null;
break;
case self::ABSTRACTION_MYSQL :
if (isset($this->connexion)) {
return mysql_close($this->connexion);
}
break;
case self::ABSTRACTION_MYSQLI :
$this->connexion->close();
break;
case self::ABSTRACTION_SQLITE3 :
$this->connexion->close();
break;
}
}
}
}
?>
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/Config.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-291496644"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-291496644" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Config.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Config.html">Config</a></td>
<td><em>Config permet de charger automatiquement les fichiers ini du Framework et de l&#039;application.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Config.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Cli.php.html
New file
0,0 → 1,279
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-881905378"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-881905378" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Cli.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Cli.html">Cli</a></td>
<td><em>CLI permet de récupérer les paramètres passés en ligne de commande pour instancier une classe héritant de la classe abstraite
Script.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Cli.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/RestService.php.txt
New file
0,0 → 1,151
<?php
/**
* Classe principale gérant les services.
* Paramètres liés dans config.ini :
* - serveur.baseURL
*
* Encodage en entrée : utf8
* Encodage en sortie : utf8
*
* @category Php 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
* @since 0.3
* @version $Id: RestService.php 382 2011-10-14 10:36:41Z jpm $
* @link /doc/framework/
*/
abstract class RestService {
/** Objet de connection à la base de données.
* @deprecated Utiliser la methode getBdd().
* @see getBdd()
*/
protected $bdd = null;
/** Objet Rest Client. */
private $RestClient = null;
/** Indique si oui (true) ou non (false), on veut utiliser les paramètres brutes. */
protected $utilisationParametresBruts = false;
public function __construct($config) {
$this->config = $config;
$this->bdd = new Bdd();
}
public function initialiser() {
}
/**
* Méthode de connection à la base de données sur demande.
* Tous les services web n'ont pas besoin de s'y connecter.
*/
protected function getBdd() {
if (! isset($this->bdd)) {
$this->bdd = new Bdd();
}
return $this->bdd;
}
/**
* Méthode permettant de faire appel à un client REST en fonction des besoins du service.
*/
protected function getRestClient() {
if (! isset($this->RestClient)) {
$this->RestClient = new RestClient();
}
return $this->RestClient;
}
/**
* Méthode permettant de savoir si le service veut utiliser des paramètres bruts (issu de la QueryString)
* ou pas (issu de $_GET).
*/
public function utiliserParametresBruts() {
return $this->utilisationParametresBruts;
}
/**
* Permet d'ajouter un message d'erreur ou d'avertissement qui sera envoyé au client.
* Le message doit être au format texte et en UTF-8.
* @param string $message le message à envoyer.
*/
protected function ajouterMessage($message) {
RestServeur::ajouterMessage($message);
}
/**
* Méthode appelée lors d'une requête HTTP de type GET.
*
* Si la consultation est un succès, le code statut HTTP retourné sera 200. Dans tous les autres cas,
* la méthode devra retourner le code statut HTTP adéquate.
*
* @param array Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.
* @param array Partie de l'url situé après le '?' servant à paramétrer le service demandé.
* @return string une chaine indiquant le succès de l'opération et les données demandées.
*/
public function consulter($ressources, $parametres) {
RestServeur::envoyerEnteteStatutHttp(RestServeur::HTTP_CODE_METHODE_NON_AUTORISE);
RestServeur::ajouterMessage("Le service '".get_class($this)."' n'autorise pas la consultation.");
}
/**
* Méthode appelée lors d'une requête HTTP de type POST.
*
* La ressource à modifier est indiquée via l'url. Les données devant servir à la mise à jours sont passées dans le corps
* de la requête.
* Si la modification est un succès, la méthode devra retourner "true" et le code statut HTTP retourné sera 201.
*
* @param array Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.
* @param array les données transférées dans le corps de la requête devant servir à la modification.
* @return mixed une chaine indiquant le succès de l'opération ou rien.
*/
public function modifier($ressources, $requeteDonnees) {
RestServeur::envoyerEnteteStatutHttp(RestServeur::HTTP_CODE_METHODE_NON_AUTORISE);
RestServeur::ajouterMessage("Le service '".get_class($this)."' n'autorise pas la modification.");
return false;
}
/**
* Méthode appelée lors d'une requête HTTP de type PUT.
*
* L'identifiant de la ressource à ajouter est indiqué via l'url si on le connait par avance. Sinon, il doit être créé par
* le service. Dans ce dernier cas, le nouvel identifiant devrait être renvoyé dans le corps de la réponse.
* Si l'ajout est un succès, la méthode devra retourner "true" ou l'identifiant.
* Le code statut HTTP retourné sera 201 en cas de succès.
* Dans le cas contraire, la méthode devra retourner false.
*
* @param array Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.
* @param array les données transférées dans le corps de la requête devant servir à l'ajout.
* @return string l'identifiant créé.
*/
public function ajouter($ressources, $requeteDonnees) {
RestServeur::envoyerEnteteStatutHttp(RestServeur::HTTP_CODE_METHODE_NON_AUTORISE);
RestServeur::ajouterMessage("Le service '".get_class($this)."' n'autorise pas la création.");
return false;
}
/**
* Méthode appelée lors d'une requête HTTP de type DELETE (ou POST avec action=DELETE dans le corps de la requete).
*
* Si la suppression est un succès, la méthode devra retourner "true" et le code statut HTTP retourné par
* RestServeur sera 204.
* Si la ressource à supprimer est introuvable, la méthode devra retourner "false" et le code statut HTTP
* retourné par RestServeur sera 404.
* Dans les autres cas de figure ou si vous souhaitez gérer vos propres codes de retour erreur, retourner
* la valeur null ou rien.
*
* @param array Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.
* @return mixed une chaine indiquant le succès de l'opération ou rien.
*/
public function supprimer($ressources) {
RestServeur::envoyerEnteteStatutHttp(RestServeur::HTTP_CODE_METHODE_NON_AUTORISE);
RestServeur::ajouterMessage("Le service '".get_class($this)."' n'autorise pas la suppression.");
return null;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/CacheSimple.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1191624988"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1191624988" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>CacheSimple.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/CacheSimple.html">CacheSimple</a></td>
<td><em>Classe Cache permettant de mettre en cache des données de façon extremement simple.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/CacheSimple.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Script.php.txt
New file
0,0 → 1,289
<?php
// declare(encoding='UTF-8');
/**
* Script est une classe abstraite qui doit être implémenté par les classes éxecutant des scripts en ligne de commande.
*
* @category PHP 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @author Delphine CAUQUIL <delphine@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @since 0.3
* @version $Id: Script.php 299 2011-01-18 14:03:46Z jpm $
* @link /doc/framework/
*/
 
abstract class Script {
/** Niveau de message de type LOG */
const MSG_LOG = 0;
/** Niveau de message de type ERREUR */
const MSG_ERREUR = 1;
/** Niveau de message de type AVERTISSEMENT */
const MSG_AVERTISSEMENT = 2;
/** Niveau de message de type INFORMATION */
const MSG_INFO = 3;
 
/** Inititulé des différents types de message. */
private static $msg_niveaux_txt = array('LOG', 'ERREUR','AVERTISSEMENT', 'INFO');
/**
* Le nom du script tel que passé dans la ligne de commande.
* @var string
*/
private $script_nom = null;
/**
* Paramêtres par défaut disponibles pour la ligne de commande
* le tableau se construit de la forme suivante :
* - clé = nom du paramêtre '-foo'
* - value = contient un nouveau tableau composé de cette façon :
* - booléen: true si le paramêtre est obligatoire
* - booléen ou var : true si le paramêtre nécessite un valeur à sa suite ou la valeur par défaut
* - string: description du contenu du paramêtre
* Les paramêtres optionels devraient être déclaré à la fin du tableau.
* Le dernier parametre du tableau peut avoir la valeur '...',
* il contiendra alors l'ensemble des paramêtres suivant trouvés sur la ligne de commande.
* @var array
*/
private $parametres_autorises_defaut = array(
'-a' => array(true, true, 'Action à réaliser'),
'-v' => array(false, '1', 'Mode verbeux : 1 ou 2'));
/**
* Paramêtres autorisés par le script.
* le tableau est de la forme suivante :
* - clé = nom du paramêtre '-foo'
* - value = contient un nouveau tableau composé de cette façon :
* - booléen: true si le paramêtre est obligatoire
* - booléen ou var : true si le paramêtre nécessite un valeur à sa suite ou la valeur par défaut
* - string: description du contenu du paramêtre
* Les paramêtres optionels devraient être déclaré à la fin du tableau.
* Le dernier parametre du tableau peut avoir la valeur '...',
* il contiendra alors l'ensemble des paramêtres suivant trouvés sur la ligne de commande.
* @var array
*/
protected $parametres_autorises = null;
/**
* Contient les valeurs des paramêtres récupérés de la ligne de commande :
* le tableau se construit de la forme suivnate :
* - clé = nom du paramêtre '-foo'
* - valeur = la valeur récupérée sur la ligne de commande
* @var array
*/
private $parametres_cli = null;
/**
* Contient le tableau des paramètres disponible après vérification :
* le tableau est de la forme suivante :
* - clé = nom du paramêtre '-foo'
* - valeur = la valeur récupérée sur la ligne de commande
* @var array
*/
protected $parametres = null;
/** Tableau associatif permettant de stocker l'avancement dans une boucle.
* La clé est un md5 du message à afficher au démarrage de la boucle.
* @var array
*/
private static $avancement = array();
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
private static $parametres_obligatoires = array('chemin_modules', 'log_script');
public function __construct($script_nom, $parametres_cli) {
$this->script_nom = $script_nom;
$this->parametres_cli = $parametres_cli;
Config::verifierPresenceParametres(self::$parametres_obligatoires);
$fichier_ini_script = $this->getScriptChemin().'config.ini';
Config::charger($fichier_ini_script);
$this->chargerParametresAutorises();
$this->chargerParametres();
}
private static function getMsgNiveauTxt($niveau) {
return self::$msg_niveaux_txt[$niveau];
}
protected function getScriptNom() {
return $this->script_nom;
}
protected function getScriptChemin($doit_exister = true) {
$chemin = Config::get('chemin_modules').$this->getScriptNom().DS;
if (!file_exists($chemin) && $doit_exister) {
trigger_error("Erreur: le module '".$this->getScriptNom()."' n'existe pas ($chemin)\n", E_USER_ERROR);
}
return $chemin;
}
protected function getParametre($parametre) {
$retour = false;
if (!is_null($parametre)) {
$parametre = ltrim($parametre, '-');
if (isset($this->parametres[$parametre])) {
$retour = $this->parametres[$parametre];
} else {
trigger_error("Erreur: la ligne de commande ne contenait pas le paramêtre '$parametre'\n", E_USER_WARNING);
}
}
return $retour;
}
abstract public function executer();
private function chargerParametresAutorises() {
foreach ($this->parametres_autorises_defaut as $c => $v) {
if (isset($this->parametres_autorises[$c])) {
trigger_error("Erreur: le script '".$this->getScriptNom()."' ne peut définir le paramêtre '$c' car il existe déjà\n", E_USER_ERROR);
} else {
$this->parametres_autorises[$c] = $v;
}
}
}
private function chargerParametres() {
$parametres_cli = $this->parametres_cli;
 
// Récupération des paramêtresgetMsgNiveauTxt
foreach ($this->parametres_autorises as $p_nom => $p_val) {
if (count($parametres_cli) == 0) {
if ($p_val[0]) {
trigger_error("Erreur: paramêtre manquant '".$p_nom."' \n", E_USER_WARNING);
}
}
if ($p_nom == '...') {
$this->parametres['...'] = array();
foreach ($parametres_cli as $arg) {
$this->parametres['...'][] = $arg;
}
$parametres_cli = array();
break;
} else {
if (isset($parametres_cli[$p_nom])) {
// Attribution de la valeur issue de la ligne de commande
$this->parametres[ltrim($p_nom, '-')] = $parametres_cli[$p_nom];
unset($parametres_cli[$p_nom]);
} else {
// Attribution de la valeur par défaut
if ($p_val[1] !== true) {
$this->parametres[ltrim($p_nom, '-')] = $p_val[1];
unset($parametres_cli[$p_nom]);
}
}
}
}
// Gestion de l'excédant de paramêtres
if (count($parametres_cli)) {
trigger_error("Erreur: trop de paramêtres\n", E_USER_ERROR);
}
}
/**
* Affiche un message d'erreur formaté.
* Si le paramétre de verbosité (-v) vaut 1 ou plus, le message est écrit dans le fichier de log et afficher dans la console.
*
* @param string le message d'erreur avec des %s.
* @param array le tableau des paramêtres à insérer dans le message d'erreur.
* @return void.
*/
protected function traiterErreur($message, $tab_arguments = array()) {
$this->traiterMessage($message, $tab_arguments, self::MSG_ERREUR);
}
/**
* Affiche un message d'avertissement formaté.
* Si le paramétre de verbosité (-v) vaut 1, le message est écrit dans le fichier de log.
* Si le paramétre de verbosité (-v) vaut 2 ou plus, le message est écrit dans le fichier de log et afficher dans la console.
*
* @param string le message d'erreur avec des %s.
* @param array le tableau des paramêtres à insérer dans le message d'erreur.
* @return void.
*/
protected function traiterAvertissement($message, $tab_arguments = array()) {
$this->traiterMessage($message, $tab_arguments, self::MSG_AVERTISSEMENT);
}
/**
* Retourne un message d'information formaté.
* Si le paramétre de verbosité (-v) vaut 1 ou 2 , le message est écrit dans le fichier de log.
* Si le paramétre de verbosité (-v) vaut 3 ou plus, le message est écrit dans le fichier de log et afficher dans la console.
*
* @param string le message d'information avec des %s.
* @param array le tableau des paramêtres à insérer dans le message d'erreur.
* @return void.
*/
protected function traiterInfo($message, $tab_arguments = array()) {
$this->traiterMessage($message, $tab_arguments, self::MSG_INFO);
}
/**
* Retourne un message formaté en le stockant dans un fichier de log si nécessaire.
*
* @param string le message d'erreur avec des %s.
* @param array le tableau des paramêtres à insérer dans le message d'erreur.
* @param int le niveau de verbosité à dépasser pour afficher les messages.
* @return void.
*/
private function traiterMessage($message, $tab_arguments, $niveau = self::MSG_LOG) {
$log = $this->formaterMsg($message, $tab_arguments, $niveau);
if ($this->getParametre('v') > ($niveau - 1)) {
echo $log;
if (Config::get('log_script')) {
// TODO : lancer le log
}
}
}
/**
* Retourne un message d'information formaté.
*
* @param string le message d'information avec des %s.
* @param array le tableau des paramêtres à insérer dans le message d'erreur.
* @return string le message d'erreur formaté.
*/
protected function formaterMsg($message, $tab_arguments = array(), $niveau = null) {
$texte = vsprintf($message, $tab_arguments);
$prefixe = date('Y-m-j_H:i:s', time());
$prefixe .= is_null($niveau) ? ' : ' : ' - '.self::getMsgNiveauTxt($niveau).' : ';
$log = $prefixe.$texte."\n";
return $log;
}
/**
* Utiliser cette méthode dans une boucle pour afficher un message suivi du nombre de tour de boucle effectué.
* Vous devrez vous même gérer le retour à la ligne à la sortie de la boucle.
*
* @param string le message d'information.
* @param int le nombre de départ à afficher.
* @return void le message est affiché dans la console.
*/
protected function afficherAvancement($message, $depart = 0) {
if (! isset(self::$avancement[$message])) {
self::$avancement[$message] = $depart;
echo "$message : ";
$actuel =& self::$avancement[$message];
echo $actuel++;
} else {
$actuel =& self::$avancement[$message];
// Cas du passage de 99 (= 2 caractères) à 100 (= 3 caractères)
$passage = 0;
if (strlen((string) ($actuel - 1)) < strlen((string) ($actuel))) {
$passage = 1;
}
echo str_repeat(chr(8), (strlen((string) $actuel) - $passage));
echo $actuel++;
}
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/Config.php.txt
New file
0,0 → 1,283
<?php
// declare(encoding='UTF-8');
/**
* Config permet de charger automatiquement les fichiers ini du Framework et de l'application.
* Elle offre l'accès en lecture seule aux paramètres de config.
* C'est une Singleton.
* Si vous avez besoin de modifier dynamiquement des paramètres de configuration, utiliser le @see Registe, il est fait pour ça.
*
* @category PHP 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id: Config.php 448 2013-12-19 13:37:39Z jpm $
* @link /doc/framework/
*/
 
class Config {
 
/** Instance de la classe pointant sur elle même (pour le pattern singleton). */
private static $instance = null;
 
/** Paramètres de configuration. */
private static $parametres = array();
 
private function __construct() {
// Définition de paramètres avant chargement du config.ini
self::$parametres = array(
'fichier_config' => 'config%s.ini',
'chemin_framework' => dirname(__FILE__).DS
);
 
// Chargement du fichier config.ini du Framework
$existe = self::parserFichierIni(self::$parametres['chemin_framework'].sprintf(self::$parametres['fichier_config'], ''));
if ($existe === false) {
trigger_error("Veuillez configurer le Framework en renommant le fichier config.defaut.ini en config.ini.", E_USER_ERROR);
}
 
// Chargement du fichier config.ini par défaut de l'application
$chemin_config_defaut_appli = self::$parametres['chemin_configurations'].sprintf(self::$parametres['fichier_config'], '');
self::parserFichierIni($chemin_config_defaut_appli);
 
// Chargement des fichiers config.ini contextuels
if (PHP_SAPI == 'cli') {// mode console
foreach ($_SERVER['argv'] as $cle => $valeur) {
if ($valeur == '-contexte') {
self::chargerFichierContexte($_SERVER['argv'][($cle+1)]);
break;
}
}
} else {// mode web
// Pour Papyrus
if (defined('PAP_VERSION')) {
self::chargerFichierContexte('papyrus');
}
// Via le fichie .ini par défaut de l'appli
if (Config::existeValeur('info.contexte', self::$parametres)) {
self::chargerFichierContexte(Config::get('info.contexte'));
}
 
// Chargement du contexte présent dans le GET
if (isset($_GET['contexte'])) {
$_GET['contexte'] = strip_tags($_GET['contexte']);
self::chargerFichierContexte($_GET['contexte']);
}
 
// Chargement du contexte présent dans le POST
if (isset($_POST['contexte'])) {
$_POST['contexte'] = strip_tags($_POST['contexte']);
self::chargerFichierContexte($_POST['contexte']);
}
}
}
 
/**
* Charge le fichier de config correspondant au contexte
* @param string $contexte le contexte
*/
private static function chargerFichierContexte($contexte) {
$chemin_config_appli_contextuel = self::$parametres['chemin_configurations'];
$chemin_config_appli_contextuel .= sprintf(self::$parametres['fichier_config'], '_'.$contexte);
self::parserFichierIni($chemin_config_appli_contextuel);
}
 
/**
* Parse le fichier ini donné en paramètre
* @param string $fichier_ini nom du fichier ini à parser
* @return array tableau contenant les paramètres du fichier ini
*/
private static function parserFichierIni($fichier_ini) {
$retour = false;
if (file_exists($fichier_ini)) {
$ini = parse_ini_file($fichier_ini, true);
$ini = self::analyserTableauIni($ini);
$retour = true;
} else {
error_log("Fichier de configuration introuvable : $fichier_ini");
}
return $retour;
}
 
/**
* Fusionne un tableau de paramètres avec le tableau de paramètres global
* @param array $ini le tableau à fusionner
*/
private static function fusionner(array $ini) {
self::$parametres = array_merge(self::$parametres, $ini);
}
 
/**
* Renvoie la valeur demandée grâce une chaîne de paramètres
* @param string $param la chaine de paramètres
* @param array $config le tableau de paramètre
* @return string la valeur de la chaine demandée
*/
private static function getValeur($param, $config) {
if ($param === null) {
return null;
} else {
if (isset($config[$param])) {
return $config[$param];
} else if (strpos($param, '.') !== false) {
$pieces = explode('.', $param, 2);
if (strlen($pieces[0]) && strlen($pieces[1])) {
if (isset($config[$pieces[0]])) {
if (is_array($config[$pieces[0]])) {
return self::getValeur($pieces[1], $config[$pieces[0]]);
}
}
}
} else {
return null;
}
}
}
 
/**
* Teste si param existe dans le tableau config
* @param string $param nom du paramètre
* @param array tableau de configuration
*/
private static function existeValeur($param, $config) {
$retour = false;
if (self::getValeur($param, $config) !== null) {
$retour = true;
}
return $retour;
}
 
/**
* Vérifie si l'instance de classe à été crée, si non la crée
*/
private static function verifierCreationInstance() {
if (empty(self::$instance)) {
self::$instance = new Config();
}
}
 
/**
* Analyse un tableau de paramètres.
* @param array $config le tableau de paramètres
* @return array le tableau analysé
*/
private static function analyserTableauIni($config = array()) {
foreach ($config as $cle => &$valeur) {
if (is_array($valeur)) {
$config[$cle] = self::analyserTableauIni($valeur);
} else {
self::evaluerReferences($config, $cle);
self::evaluerPhp($config, $cle);
self::evaluerCle($config, $cle, $config[$cle]);
}
self::fusionner($config);
}
return $config;
}
 
/**
* Dans le cas des chaine de configuration à sous clé (ex.: cle.souscle)
* évalue les valeurs correspondantes et crée les sous tableaux associés.
* @param array $config tableau de configuration (par référence)
* @param string $cle la cle dans le tableau
* @param string $valeur la valeur à affecter
*/
private static function evaluerCle(&$config, $cle, $valeur) {
if (strpos($cle, '.') !== false) {
unset($config[$cle]);
$pieces = explode('.', $cle, 2);
if (strlen($pieces[0]) && strlen($pieces[1])) {
if (isset($config[$pieces[0]]) && !is_array($config[$pieces[0]])) {
$m = "Ne peut pas créer de sous-clé pour '{$pieces[0]}' car la clé existe déjà";
trigger_error($m, E_USER_WARNING);
} else {
$config[$pieces[0]][$pieces[1]] = $valeur;
$config[$pieces[0]] = self::evaluerCle($config[$pieces[0]], $pieces[1], $valeur);
}
} else {
$m = "Clé invalide '$cle'";
trigger_error($m, E_USER_WARNING);
}
} else {
$config[$cle] = $valeur;
}
return $config;
}
 
/**
* Évalue les valeurs de références à une clé dans le tableau config (cas du ref:cle).
* @param array $config tableau de configuration
* @param string $cle la clé dont il faut évaluer les références
*/
private static function evaluerReferences(&$config, $cle) {
if (preg_match_all('/{ref:([A-Za-z0-9_.-]+)}/', $config[$cle], $correspondances, PREG_SET_ORDER)) {
foreach ($correspondances as $ref) {
$config[$cle] = str_replace($ref[0], self::getValeur($ref[1], self::$parametres), $config[$cle]);
}
}
}
 
/**
* Évalue le code php contenu dans un clé tu tableau config.
* @param array $config tableau de configuration (par référence)
* @param string $cle le clé du tableau dont il faut évaluer la valeur
*/
private static function evaluerPhp(&$config, $cle) {
if (preg_match('/^php:(.+)$/', $config[$cle], $correspondances)) {
eval('$config["'.$cle.'"] = '.$correspondances[1].';');
}
}
 
/**
* Charge un fichier ini dans le tableau des paramètres de l'appli.
* @param string $fichier_ini le nom du fichier à charger
* @return array le fichier ini parsé
*/
public static function charger($fichier_ini) {
self::verifierCreationInstance();
return self::parserFichierIni($fichier_ini);
}
 
/**
* Accesseur pour la valeur d'un paramètre.
* @param string $param le nom du paramètre
* @return string la valeur du paramètre
*/
public static function get($param = null) {
self::verifierCreationInstance();
return self::getValeur($param, self::$parametres);
}
 
/**
* Vérifie si la valeur d'un paramètre existe.
* @param string $param le nom du paramètre
* @return boolean vrai si le paramètre existe, false sinon
*/
public static function existe($param) {
self::verifierCreationInstance();
return self::existeValeur($param, self::$parametres);
}
 
/**
* Vérifie que tous les paramêtres de config nécessaires au fonctionnement d'une classe existe dans les fichiers
* de configurations.
* L'utilisation de cette méthode depuis la classe Config évite de faire appel à une classe supplémentaire.
*
* @param array $parametres tableau des noms des paramètres de la config à verifier.
* @return boolean true si tous les paramétres sont présents sinon false.
*/
public static function verifierPresenceParametres(Array $parametres) {
$ok = true;
foreach ($parametres as $param) {
if (is_null(self::get($param))) {
$classe = get_class();
$m = "L'utilisation de la classe $classe nécessite de définir '$param' dans un fichier de configuration.";
trigger_error($m, E_USER_ERROR);
$ok = false;
}
}
return $ok;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/GestionnaireException.php.txt
New file
0,0 → 1,247
<?php
// declare(encoding='UTF-8');
/**
* Classe de gestion des exceptions.
* C'est un Singleton.
*
* @category PHP 5.2
* @package Framework
* @author Aurélien PERONNET <aurelien@tela-botanica.org>
* @author Jean-Pascal MILCENT <jmp@tela-botanica.org>
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
* @version $Id: GestionnaireException.php 367 2011-10-03 12:40:48Z jpm $$
* @link /doc/framework/
*
*/
class GestionnaireException {
const MODE_CLI = 'cli';
/** Liste des exceptions enregistrées */
private static $exceptions = array();
 
/** Détermine si l'on affiche ou non le contexte */
private static $contexte = false;
 
/** Détermine si l'on loggue ou non les erreurs */
private static $logger = false;
 
/** Détermine si l'affichage des erreurs est forcé (true) ou pas (false) à la destruction de la classe */
private static $afficher = false;
 
/** Definit si php est lancé en ligne de commande ou en mode serveur */
private static $mode = null ;
 
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
private static $parametres_obligatoires = array('debogage', 'debogage_contexte', 'log_debogage');
/** Initialise le Gestionnaire d'exceptions et d'erreur sans tenir comptes des paramêtres de config. */
public static function initialiser() {
self::$mode = php_sapi_name();
// Désactivation des balises HTML dans les messages d'erreur de PHP en mode ligne de commande
if (self::$mode == self::MODE_CLI) {
ini_set('html_errors', 0);
}
set_exception_handler(array(get_class(),'gererException'));
set_error_handler(array(get_class(),'gererErreur'));
}
/** Configure le Gestionnaire d'exceptions et d'erreur à partir des paramêtres de config. */
public static function configurer() {
Config::verifierPresenceParametres(self::$parametres_obligatoires);
self::$contexte = Config::get('debogage_contexte');
self::$logger = Config::get('log_debogage');
self::$afficher = Config::get('debogage');
}
/**
* Renvoie le nombre d'exceptions et d'erreurs levées.
* @see getExceptions() pour obtenir les exceptions formatées.
* @since 0.3
* @return int le nombre d'exception actuellement levées
*/
public static function getExceptionsNbre() {
return count(self::$exceptions);
}
/**
* Renvoie le booleen définissant si l'on affiche le contexte ou non
* @return bool true si on affiche le contexte sinon false.
*/
public static function getContexte() {
return self::$contexte;
}
 
/**
* Definit si l'on veut afficher le contexte ou non
* @param bool true si on veut afficher le contexte, false sinon, par défaut vaut false
*/
public static function setContexte($contexte) {
self::$contexte = $contexte;
}
 
/**
* Fonction de gestion des exceptions, remplace le handler par défaut.
* Si une boucle génère de multiple exception (ou erreur) identique une seule sera stockée.
* @param Exception $e l'exception à traiter
*/
public static function gererException(Exception $e) {
$cle = hash('md5', $e->getMessage().'-'.$e->getFile().'-'.$e->getLine());
if (!isset(self::$exceptions[$cle])) {
self::$exceptions[$cle] = $e;
self::loggerException($e);
}
}
 
/**
* Gère les erreurs en les convertissant en exceptions (remplace la fonction gestion d'erreurs native de php)
* @param int $niveau le niveau de l'erreur
* @param string $message le message associé à l'erreur
* @param string $fichier le nom du fichier où l'erreur s'est produite
* @param int $ligne la ligne où l'erreur s'est produite
* @param string $contexte le contexte associé à l'erreur
*/
public static function gererErreur($niveau, $message, $fichier, $ligne, $contexte){
// Si un rapport d'erreur existe, création d'une exception
if (error_reporting() != 0) {
$e = new ErrorException($message, 0, $niveau, $fichier, $ligne);
self::gererException($e);
}
return null;
}
 
/**
* Renvoie les exceptions au format (X)HTML ou bien au format texte suivant le mode d'utilisation de PHP.
* @since 0.3
* @deprecated
* @see getExceptionsFormatees()
* @return string les exceptions formatées en texte ou (X)HTML.
*/
public static function getExceptions() {
return self::getExceptionsFormatees();
}
/**
* Renvoie les exceptions au format (X)HTML ou bien au format texte suivant le mode d'utilisation de PHP.
* @since 0.3
* @return string les exceptions formatées en texte ou (X)HTML.
*/
public static function getExceptionsFormatees() {
$retour = '';
if (self::getExceptionsNbre() > 0) {
foreach (self::$exceptions as $cle => $e) {
switch (self::$mode) {
case self::MODE_CLI :
$retour .= self::formaterExceptionTxt($e);
break;
default:
$retour .= self::formaterExceptionXhtml($e);
}
// Nous vidons le tableau des exceptions au fur et à mesure pour éviter le réaffichage avec le destructeur.
unset(self::$exceptions[$cle]);
}
}
return $retour;
}
/**
* Renvoie le tableau d'objets Exception générées par le script PHP triées du niveau de sévérité le plus élevé au moins élevé.
* Format du tableau :
* array{sévérité_1 = array{Exception1, Exception2, Exception3,...}, sévérité_1 = array{Exception1, Exception2, ...}, ...};
* ATTENTION : si vous utilisez cette méthode, c'est à vous de gérer l'affichage des Exceptions. Le gestionnaire d'exception
* n'enverra plus rien au navigateur ou à la console.
* @since 0.3
* @return array le tableau trié d'objet Exception.
*/
public static function getExceptionsTriees() {
$retour = array();
if (self::getExceptionsNbre() > 0) {
foreach (self::$exceptions as $cle => $e) {
$retour[$e->getSeverity()][] = $e;
// Nous vidons le tableau des exceptions au fur et à mesure pour éviter le réaffichage avec le destructeur.
unset(self::$exceptions[$cle]);
}
ksort($retour);
}
return $retour;
}
 
/**
* Logue une exception donnée sous une forme lisible si self::logger vaut true.
* @param Exception $e l'exception à logger
*/
private static function loggerException(Exception $e) {
if (self::$logger) {
$message = self::formaterExceptionTxt($e);
Log::ajouterEntree('erreurs', $message);
}
}
/**
* Formate en texte une exception passée en paramètre.
* @since 0.3
* @param Exception l'exception à formater.
*/
public static function formaterExceptionDebug(Exception $e) {
$txt = '';
if ($e->getSeverity() == E_USER_NOTICE) {
$txt = $e->getMessage();
} else {
$txt = self::formaterExceptionTxt($e);
}
return $txt;
}
/**
* Formate en texte une exception passée en paramètre.
* @since 0.3
* @param Exception l'exception à formater.
*/
public static function formaterExceptionTxt(Exception $e) {
$message = '';
$message .= $e->getMessage()."\n";
$message .= 'Fichier : '.$e->getFile()."\n";
$message .= 'Ligne : '.$e->getLine()."\n";
if (self::getContexte()) {
$message .= 'Contexte : '."\n".print_r($e->getTraceAsString(), true)."\n";
}
$message .= "\n";
return $message;
}
/**
* Formate en (X)HTML une exception passée en paramètre.
* @since 0.3
* @param Exception l'exception à formater.
*/
public static function formaterExceptionXhtml(Exception $e) {
$message = '';
$message .= '<div class="debogage">'."\n";
$message .= $e->getMessage()."\n";
$message .= '<span class="debogage_fichier">'.'Fichier : '.$e->getFile().'</span>'."\n";
$message .= '<span class="debogage_ligne">'.'Ligne : '.$e->getLine().'</span>'."\n";
if (self::getContexte()) {
$message .= '<pre>'."\n";
$message .= '<strong>Contexte : </strong>'."\n".print_r($e->getTraceAsString(), true)."\n";
$message .= '</pre>'."\n";
}
$message .= '</div>'."\n";
return $message;
}
/**
* Lors de la destruction de la classe si des exceptions n'ont pas été affichées, et si le débogage est à true, elles sont
* affichées.
*/
public function __destruct() {
// Si des erreurs n'ont pas été affichée nous forçons leur affichage
if (self::$afficher && self::getExceptionsNbre() > 0) {
echo self::getExceptionsFormatees();
}
}
 
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/Cli.php.txt
New file
0,0 → 1,108
<?php
// declare(encoding='UTF-8');
/**
* CLI permet de récupérer les paramètres passés en ligne de commande pour instancier une classe héritant de la classe abstraite
* Script.
* Elle va déclencher l'éxecution du script via l'appel de la méthode executer().
* C'est une Singleton.
*
* @category PHP 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @author Delphine CAUQUIL <delphine@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @since 0.3
* @version $Id: Cli.php 386 2011-10-28 15:56:25Z jpm $
* @link /doc/framework/
*/
 
class Cli {
 
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
private static $parametres_obligatoires = array('chemin_modules');
 
 
/**
* Execute la ligne de commande en récupérant le nom du script à lancer et ses paramètres.
* Instancie la classe du script à lancer et appelle la méthode executer().
* @return void
*/
public static function executer() {
if ($_SERVER['argc'] < 2){
trigger_error("Erreur: vous n'avez pas indiqué le nom du script. Voir '".$_SERVER['argv'][0]." help'.\n", E_USER_ERROR);
}
 
// Récupération de la ligne de commande
$argv = $_SERVER['argv'];
// Nous dépilons le nom du fichier qui initialise le framework et appele cette méthode.
array_shift($argv);
// Nous dépilons le nom du script à lancer
$script = array_shift($argv);
// Récupération des paramètres d'execution du script
$parametres = self::getParametres($argv);
 
// Chargement du script à lancer
$Script = Cli::charger($script, $parametres);
if (!is_null($Script)) {
$Script->executer();
}
 
// Affichage des exceptions et erreurs générées par le script
echo GestionnaireException::getExceptions();
 
// Fin d'execution
exit(0);
}
 
private static function charger($script_nom, $parametres) {
$Script = null;
Config::verifierPresenceParametres(self::$parametres_obligatoires);
 
if (strpos($script_nom, DS)) {
$decompoScriptNom = explode(DS, $script_nom);
$script_nom = array_pop($decompoScriptNom);
$dossier_nom = implode(DS, $decompoScriptNom);
} else {
$dossier_nom = strtolower($script_nom);
}
 
$classe_nom = self::obtenirNomClasse($script_nom);
$fichier_script = Config::get('chemin_modules').$dossier_nom.DS.$classe_nom.'.php';
 
if (!file_exists($fichier_script)){
trigger_error("Erreur : script '$fichier_script' inconnu!\n", E_USER_ERROR);
} else {
require_once $fichier_script;
if (!class_exists( $classe_nom)) {
trigger_error("Erreur: impossible de trouver la classe de la commande : $classe_nom\n", E_USER_ERROR);
} else {
$Script = new $classe_nom($script_nom, $parametres);
}
}
return $Script;
}
 
private static function obtenirNomClasse($script_nom) {
$nom_classe = implode('', array_map('ucfirst', explode('_', strtolower($script_nom))));
return $nom_classe;
}
 
private static function getParametres($argv) {
$parametres = array();
// Récupération des options
while (count($argv)) {
if (isset($argv[1]) && $argv[1]{0} != '-') {
$param = array_shift($argv);
$parametres[$param] = array_shift($argv);
} elseif (!isset($argv[1]) || $argv[1]{0} == '-') {
$parametres[array_shift($argv)] = null;
} else {
trigger_error("Erreur: valeur manquante pour le paramêtre '".$argv[0]."' \n", E_USER_ERROR);
}
}
return $parametres;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/Registre.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-550996273"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-550996273" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Registre.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Registre.html">Registre</a></td>
<td><em>Classe Registre, qui permet un accès à différentes variables et paramètres à travers les autres classes.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Registre.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/utilitaires.Chaine.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1983144422"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1983144422" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small>utilitaires</small>Chaine.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Chaine.html">Chaine</a></td>
<td><em>Classe fournissant des méthodes statiques de manipulation des chaînes de caractères (String).</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/utilitaires/Chaine.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Chronometre.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-265275034"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-265275034" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Chronometre.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Chronometre.html">Chronometre</a></td>
<td><em>Chronometre permet de stocker et d&#039;afficher les temps d&#039;éxécution de script.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Chronometre.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/RestClient.php.txt
New file
0,0 → 1,160
<?php
// declare(encoding='UTF-8');
/**
* Classe client permettant d'interroger des services web REST.
*
* @category php 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
* @version $Id: RestClient.php 353 2011-08-01 16:02:32Z jpm $
*/
class RestClient {
const HTTP_URL_REQUETE_SEPARATEUR = '&';
const HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR = '=';
private $http_methodes = array('GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', 'TRACE');
protected $parametres = null;
private $url = null;
private $reponse_entetes = null;
 
//+----------------------------------------------------------------------------------------------------------------+
// ACCESSEURS
 
public function getReponseEntetes() {
return $this->reponse_entetes;
}
 
public function getParametre($cle) {
$valeur = (isset($this->parametres[$cle])) ? $this->parametres[$cle] : null;
return $valeur;
}
 
public function ajouterParametre($cle, $valeur) {
$this->parametres[$cle] = $valeur;
}
 
public function supprimerParametre($cle) {
unset($this->parametres[$cle]);
}
 
public function nettoyerParametres() {
$this->parametres = null;
}
 
//+----------------------------------------------------------------------------------------------------------------+
// MÉTHODES
 
public function consulter($url) {
$retour = $this->envoyerRequete($url, 'GET');
return $retour;
}
 
public function ajouter($url, Array $donnees) {
$retour = $this->envoyerRequete($url, 'PUT', $donnees);
return $retour;
}
 
public function modifier($url, Array $donnees) {
$retour = $this->envoyerRequete($url, 'POST', $donnees);
return $retour;
}
 
public function supprimer($url) {
$retour = $this->envoyerRequete($url, 'DELETE');
return $retour;
}
 
public function envoyerRequete($url, $mode, Array $donnees = array()) {
$this->url = $url;
$contenu = false;
if (! in_array($mode, $this->http_methodes)) {
$e = "Le mode de requête '$mode' n'est pas accepté!";
trigger_error($e, E_USER_WARNING);
} else {
if ($mode == 'GET') {
$this->traiterUrlParametres();
}
$content = http_build_query($donnees, null, self::HTTP_URL_REQUETE_SEPARATEUR);
$contexte = stream_context_create(array(
'http' => array(
'method' => $mode,
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'content' => $content)));
$flux = @fopen($this->url, 'r', false, $contexte);
if (!$flux) {
$this->reponse_entetes = $http_response_header;
$entetesFmt = print_r($this->analyserEntete(), true);
$e = "L'ouverture de l'url '{$this->url}' par la méthode HTTP '$mode' a échoué!\n".
"Le contenu des métadonnées était : $entetesFmt \n".
"Les paramètres de la requête HTTP étaient : $content \n".
"Le contenu était : ".stream_get_contents($flux);
trigger_error($e, E_USER_WARNING);
} else {
// Informations sur les en-têtes et métadonnées du flux
$this->reponse_entetes = stream_get_meta_data($flux);
 
// Contenu actuel de $url
$contenu = stream_get_contents($flux);
 
fclose($flux);
}
$this->traiterEntete();
}
$this->reinitialiser();
return $contenu;
}
 
private function traiterUrlParametres() {
$parametres = array();
if (count($this->parametres) > 0) {
foreach ($this->parametres as $cle => $valeur) {
$cle = rawurlencode($cle);
$valeur = rawurlencode($valeur);
$parametres[] = $cle.self::HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR.$valeur;
}
$url_parametres = implode(self::HTTP_URL_REQUETE_SEPARATEUR, $parametres);
$this->url = $this->url.'?'.$url_parametres;
}
}
 
private function traiterEntete() {
$infos = $this->analyserEntete();
$this->traiterEnteteDebogage($infos);
}
 
private function analyserEntete() {
$entetes = $this->reponse_entetes;
$infos = array('date' => null, 'uri' => $this->url, 'debogages' => null);
 
if (isset($entetes['wrapper_data'])) {
$entetes = $entetes['wrapper_data'];
}
foreach ($entetes as $entete) {
if (preg_match('/^X_REST_DEBOGAGE_MESSAGES: (.+)$/', $entete, $match)) {
$infos['debogages'] = json_decode($match[1]);
}
if (preg_match('/^Date: .+ ([012][0-9]:[012345][0-9]:[012345][0-9]) .*$/', $entete, $match)) {
$infos['date'] = $match[1];
}
}
return $infos;
}
 
private function traiterEnteteDebogage($entetes_analyses) {
if (isset($entetes['debogages'])) {
$date = $entetes['date'];
$uri = $entetes['uri'];
$debogages = $entetes['debogages'];
foreach ($debogages as $debogage) {
$e = "DEBOGAGE : $date - $uri :\n$debogage";
trigger_error($e, E_USER_NOTICE);
}
}
}
 
private function reinitialiser() {
$this->nettoyerParametres();
}
}
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/CacheSimple.php.txt
New file
0,0 → 1,124
<?php
// declare(encoding='UTF-8');
/**
* Classe Cache permettant de mettre en cache des données de façon extremement simple.
* Le cache est stocker dans des fichiers textes.
* Le contrôle de la durée de vie du cache se fait avec la fonction PHP filemtime.
* Si la durée de vie du cache est modifiée dans le constructeur ou le fichier de config, alors la durée de vie de l'ensemble
* des fichiers de cache est modifiée en conséquence.
* Les clés pour le tableau des options et les valeurs par défaut sont indiquées dans l'attribut options de la classe.
*
* @category php 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @author Aurélien PERONNET <aurelien@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://framework.zend.com/license/new-bsd Licence New BSD
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
* @version $Id: CacheSimple.php 435 2013-09-04 14:29:43Z jpm $
* @link /doc/framework/
*/
// TODO : voir ce qui est le plus pratique : error_log ou le gestionnaire de bogue du framework
class CacheSimple {
 
private $mise_en_cache = null;
private $stockage_chemin = null;
private $duree_de_vie = null;
 
private $options = array(
'mise_en_cache' => 'true',
'stockage_chemin' => 'Fichier::getDossierTmp()',
'duree_de_vie' => '3600*24'
);
 
public function __construct($options = array()) {
extract($options);
$this->mise_en_cache = is_bool($mise_en_cache) ? $mise_en_cache : true;
 
if ($this->mise_en_cache) {
$this->stockage_chemin = isset($stockage_chemin) ? realpath($stockage_chemin) : Fichier::getDossierTmp();
if (!realpath($stockage_chemin)) {
error_log(sprintf("%s: Attention, %s invalide: creation [%s]",
__FILE__,
$stockage_chemin,
$_SERVER['REQUEST_URI']));
mkdir($stockage_chemin, 0755, TRUE);
}
if (!realpath($stockage_chemin)) {
error_log(sprintf("%s: Attention, realpath(%s) invalide [%s]",
__FILE__,
$stockage_chemin,
$_SERVER['REQUEST_URI']));
} else if(!is_writable(realpath($stockage_chemin))) {
error_log(sprintf("%s: Attention, realpath(%s) non-inscriptible [%s]",
__FILE__,
realpath($stockage_chemin),
$_SERVER['REQUEST_URI']));
} else {
$this->duree_de_vie = isset($duree_de_vie) ? $duree_de_vie : 3600*24;
}
}
}
 
private function initialiserOptionsParConfig() {
while (list($nom, $valeur) = each($this->options)) {
if (Config::existe($nom)) {
$this->$nom = Config::get($nom);
}
}
}
 
/**
* Teste si le cache est disponible pour l'id donné et (si oui) le retourne (sinon renvoie false)
*
* @param string $id l'identifiant du Cache.
* @return string|false les données en cache.
*/
public function charger($id) {
$contenu = false;
if ($this->mise_en_cache) {
$chemin_fichier_cache = $this->stockage_chemin.DS.$id.'.txt';
if (file_exists($chemin_fichier_cache ) && (time() - @filemtime($chemin_fichier_cache) < $this->duree_de_vie)) {
$contenu = file_get_contents($chemin_fichier_cache);
}
}
return $contenu;
}
 
/**
* Sauvegarde la chaine de données dans un fichier texte.
*
* Note : $contenu est toujours de type "string". C'est à vous de gérer la sérialisation.
*
* @param string $contenu les données à mettre en cache.
* @param string $id l'identifiant du Cache.
* @return boolean true si aucun problème
*/
public function sauver($contenu, $id) {
$ok = false;
if ($this->mise_en_cache) {
$chemin_fichier_cache = $this->stockage_chemin.DS.$id.'.txt';
if (!file_exists($chemin_fichier_cache) || (time() - @filemtime($chemin_fichier_cache) > $this->duree_de_vie)) {
$dossier_fichier_cache = dirname($chemin_fichier_cache);
if (!is_dir($dossier_fichier_cache))
{
mkdir($dossier_fichier_cache, 0755, true);
}
 
$fh = fopen($chemin_fichier_cache,'w+');
if ($fh) {
if (fwrite($fh, $contenu)) {
if (fclose($fh)) {
$ok = true;
}
}
// Voir #ZF-4422 pour la raison de l'utilisation de octdec()
@chmod($chemin_fichier_cache, octdec('0777'));
}
}
}
return $ok;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/RestServeur.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-583702994"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-583702994" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>RestServeur.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/RestServeur.html">RestServeur</a></td>
<td><em>Classe principale gérant les services web de type (@link(REST, http://fr.wikipedia.org/wiki/Rest).</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/RestServeur.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Framework.php.html
New file
0,0 → 1,394
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2084636513"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-2084636513" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Framework.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Framework.html">Framework</a></td>
<td><em>Classe de base du Framework :
- fournissant des infos sur l&#039;application,
- paramétrant l&#039;environnement de l&#039;appli et du framework,
- réalisant des traitements sur les variables globales ($_GET, $_POST, $_COOKIE.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
<div class="row-fluid">
<section class="span8 content file">
<h2>Constants</h2>
</section>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_DS" name="constant_DS" class="anchor"></a>
<article id="constant_DS" class="constant">
<h3 class="">DS</h3>
<pre class="signature">DS</pre>
<p><em>Redéfinition de la constante DIRECTORY_SEPARATOR en version abrégée DS</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper">Framework.php</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_PS" name="constant_PS" class="anchor"></a>
<article id="constant_PS" class="constant">
<h3 class="">PS</h3>
<pre class="signature">PS</pre>
<p><em>Redéfinition de la constante PATH_SEPARATOR en version abrégée PS</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper">Framework.php</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<section class="span8 content file">
<h2>Functions</h2>
</section>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyerSlashProfond" name="method_nettoyerSlashProfond" class="anchor"></a>
<article class="method">
<h3 class=" ">nettoyerSlashProfond()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyerSlashProfond( <span class="argument">$valeur</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$valeur</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper">Framework.php</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Framework.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/CacheFichier.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1117297908"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1117297908" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>CacheFichier.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/CacheFichier.html">CacheFichier</a></td>
<td><em></em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/CacheFichier.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/RestService.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1824046318"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1824046318" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>RestService.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/RestService.html">RestService</a></td>
<td><em>Classe principale gérant les services.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/RestService.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Chronometre.php.txt
New file
0,0 → 1,138
<?php
// declare(encoding='UTF-8');
/** Chronometre permet de stocker et d'afficher les temps d'éxécution de script.
*
* Cette classe permet de réaliser un ensemble de mesure de temps prises à différents endroits d'un script.
* Ces mesures peuvent ensuite être affichées au sein d'un tableau XHTML.
*
* @category PHP 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id: Chronometre.php 327 2011-02-08 17:54:34Z jpm $
* @link /doc/framework/
*/
class Chronometre {
/*** Attributs : ***/
private static $pointArretNumero = 1;
private static $temps = array();
 
/** Accesseurs :
*
* @param string $cle la cle associée à un chronomètre particulier
*
* @return int le temps écoulé
*/
private static function getTemps($cle = null) {
if (is_null($cle)) {
$temps = self::$temps;
} else {
foreach (self::$temps as $temps_enrg) {
if (isset($temps_enrg[$cle])) {
$temps = $temps_enrg;
break;
}
}
}
return $temps;
}
 
/** Setteur pour la variable temps
*
* @param array() $moment ajoute des points de chronométrage au tableau _temps
*
* @return null
*/
private static function setTemps($cle, $moment) {
array_push(self::$temps, array($cle => $moment));
}
 
/*** Méthodes : ***/
/**
* Effectue un chronometrage.
* Vous pouvez indiquer le nom du point de chronométrage.
* Si vous n'indiquez rien, un nombre sera généré en débutant à 1.
*
* @param string le nom du point de chronométrage
* @return null
*/
public static function chrono($cle = null) {
if ($cle == null) {
$cle = (count(self::$temps) == 0) ? 'Début' : self::$pointArretNumero++;
}
$moment = microtime();
self::setTemps($cle, $moment);
}
/**
* Permet d'afficher les temps d'éxécution de différentes parties d'un script.
*
* Cette fonction permet d'afficher un ensemble de mesure de temps prises à différents endroits d'un script.
* Ces mesures sont affichées au sein d'un tableau XHTML dont on peut controler l'indentation des balises.
* Pour un site en production, il suffit d'ajouter un style #chrono {display:none;} dans la css.
* De cette façon, le tableau ne s'affichera pas. Le webmaster lui pourra rajouter sa propre feuille de style
* affichant le tableau.
* Le développeur initial de cette fonction est Loic d'Anterroches.
* Elle a été modifiée par Jean-Pascal Milcent.
*
* @author Loic d'Anterroches
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @param string l'eventuel nom du point de chronométrage de fin.
* @return string la chaine XHTML de mesure des temps.
*/
public static function afficherChrono($cle = null) {
if (count(self::$temps) == 0) {
$sortie = "Aucun chronométrage à l'aide de Chronometre::chrono() n'a été réalisé.";
} else {
// Création du chrono de fin
self::chrono('Fin');
$total_tps_ecoule = 0;
$tps_debut = null;
$tbody = '';
foreach (self::getTemps() as $temps) {
foreach ($temps as $cle => $valeur) {
// Récupération de la premiére mesure
if (is_null($tps_debut)) {
$tps_debut = self::getMicroTime($valeur);
}
// Récupération de la mesure courrante
$tps_fin = self::getMicroTime($valeur);
$tps_ecoule = abs($tps_fin - $tps_debut);
$total_tps_ecoule += $tps_ecoule;
$tps_debut = $tps_fin;
// Gestion affichage
$total_tps_ecoule_fmt = number_format($total_tps_ecoule, 3, ',', ' ');
$tps_ecoule_fmt = number_format($tps_ecoule, 3, ',', ' ');
$tbody .= '<tr><th>'.$cle.'</th><td>'.$tps_ecoule_fmt.'</td><td>'.$total_tps_ecoule_fmt.'</td></tr>'."\n";
}
}
$total_tps_ecoule_final_fmt = number_format($total_tps_ecoule, 3, ',', ' ');
// Début création de l'affichage
$sortie = '<table id="chrono" lang="fr" summary="Résultat duchronométrage du programme affichant la page actuelle.">'."\n".
'<caption>Chronométrage</caption>'."\n".
'<thead>'."\n".
' <tr><th>Action</th><th title="Temps écoulé vis à vis de l\'action précédente">Temps écoulé (en s.)</th><th>Cumul du temps écoulé (en s.)</th></tr>'."\n".
'</thead>'."\n".
'<tbody>'."\n".
$tbody.
'</tbody>'."\n".
'<tfoot>'."\n".
' <tr><th>Total du temps écoulé (en s.)</th><td colspan="2">'.$total_tps_ecoule_final_fmt.'</td></tr>'."\n".
'</tfoot>'."\n".
'</table>'."\n";
}
return $sortie;
}
private static function getMicroTime($utps) {
list($usec, $sec) = explode(' ', $utps);
return ((float)$usec + (float)$sec);
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/Debug.php.txt
New file
0,0 → 1,192
<?php
// declare(encoding='UTF-8');
/**
* Classe fournissant des fonctions de débogage équivalante à var_dump et print_r.
* L'affichage et l'utilisation de ces fonctions sont améliorés via cette classe.
* Cette classe est inspirée de la classe Zend_Debug.
*
* @category PHP 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id: Debug.php 366 2011-09-30 08:20:45Z jpm $
* @link /doc/framework/
*/
class Debug {
/** Paramètrer le fichier de config avec "php:Debug::MODE_ECHO" : les messages sont affichés en utilisant echo au moment
* où ils sont déclenchés dans le code.*/
const MODE_ECHO = 'echo';
/** Paramètrer le fichier de config avec "php:Debug::MODE_NOTICE" : les message sont stockés par le gestionnaire
* d'exception sous forme d'erreur de type E_USER_NOTICE et sont renvoyés sur la sortie standard à la fin de l'execution
* du programme (via echo).*/
const MODE_NOTICE = 'e_user_notice';
/** Paramètrer le fichier de config avec "php:Debug::MODE_ENTETE_HTTP" : les message sont stockés par le gestionnaire
* d'exception sous forme d'erreur de type E_USER_NOTICE et sont renvoyés dans un entête HTTP (X_REST_DEBOGAGE_MESSAGES)
* à la fin de l'execution du programme.
* Surtout utile pour le Serveur REST. */
const MODE_ENTETE_HTTP = 'entete_http';
/** Mode de php (cli ou sapi) */
protected static $mode = null;
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
private static $parametres_obligatoires = array('debogage', 'debogage_mode');
/**
* Accesseur pour le mode
* @return string le mode de php
*/
public static function getMode() {
if (self::$mode === null) {
self::$mode = PHP_SAPI;
}
return self::$mode;
}
 
/**
* Equivalent de var_dump
* @param mixed $variable la variable à dumper
* @param string $mot_cle le mot cle à associer à la variable
* @param boolean $echo si true on affiche le résultat, si false on ne renvoie que la chaine sans l'afficher
* @return string la chaine à afficher representant le dump ou null si echo
*/
public static function dump($variable, $mot_cle = null, $echo = false) {
// var_dump de la variable dans un buffer et récupération de la sortie
ob_start();
var_dump($variable);
$sortie = ob_get_clean();
 
// Pré-traitement de la sortie
$sortie = preg_replace("/\]\=\>\n(\s+)/m", "] => ", $sortie);
 
// Traitement général du débogage
return self::traiterDebogage($mot_cle, $sortie, $echo);
}
 
/**
* Equivalent de print_r.
* @param mixed $variable la variable à afficher
* @param string $mot_cle le mot cle à associer
* @param boolean $echo faire un echo ou non
* @return string la chaine contenant la variable printée ou null si echo
*/
public static function printr($variable, $mot_cle = null, $echo = false) {
// Récupération de la sortie
$sortie = print_r($variable, true);
 
// Traitement général du débogage
return self::traiterDebogage($mot_cle, $sortie, $echo);
}
/**
* Affichage d'informations sur l'espace mémoire occupé par une variable
*
* @link http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html
* @since 0.3
*
* @param mixed $var la variable dont on veut connaître l'empreinte mémoire.
* @param string $mot_cle le mot cle à associer
* @param boolean $echo faire un echo ou non
*
* @return string la chaine d'information sur l'espace mémoire occupé ou bien null si echo
*/
public static function tailleMemoireVar($var, $mot_cle = null, $echo = false) {
$memoire_depart = memory_get_usage();
$temp = unserialize(serialize($var));
$taille = memory_get_usage() - $memoire_depart;
$sortie = Fichier::convertirTaille($taille);
return self::traiterDebogage($mot_cle, $sortie, $echo);
}
 
/**
* Affichage d'informations sur l'espace mémoire occupé par le script PHP
*
* @link http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html
* @since 0.3
*
* @param string $mot_cle le mot cle à associer
* @param boolean $echo faire un echo ou non
*
* @return string la chaine d'information sur l'espace mémoire occupé ou bien null si echo
*/
public static function tailleMemoireScript($mot_cle = null, $echo = false) {
$sortie = 'Mémoire -- Utilisé : '.Fichier::convertirTaille(memory_get_usage(false)).
' || Alloué : '.
Fichier::convertirTaille(memory_get_usage(true)) .
' || MAX Utilisé : '.
Fichier::convertirTaille(memory_get_peak_usage(false)).
' || MAX Alloué : '.
Fichier::convertirTaille(memory_get_peak_usage(true)).
' || MAX autorisé : '.
ini_get('memory_limit');
// Traitement général du débogage
return self::traiterDebogage($mot_cle, $sortie, $echo);
}
/**
* Traite une chaine de débogage et les mots clés associés
* @param string $mot_cle le mot à associer à la chaine
* @param string $sortie le chaine de debogage
* @param boolean $echo faire un echo du resultat ou non
* @return string la chaine de debogage formatée ou bien null si echo
*/
private static function traiterDebogage($mot_cle, $sortie, $echo) {
Config::verifierPresenceParametres(self::$parametres_obligatoires);
$debogage = Config::get('debogage');
$mode = Config::get('debogage_mode');
$mot_cle = self::formaterMotCle($mot_cle);
$sortie = self::traiterSortieSuivantMode($mot_cle, $sortie);
 
// Affichage et/ou retour
if ($debogage == true) {
if ($echo === true || $mode == self::MODE_ECHO) {
echo $sortie;
return null;
} else if ($mode == self::MODE_NOTICE || $mode == self::MODE_ENTETE_HTTP) {
trigger_error($sortie, E_USER_NOTICE);
return null;
} else {
return $sortie;
}
}
}
 
/**
* formate un mot clé donné
* @param string $mot_cle le mot clé à formaté
* @return string le mot clé formaté ou bien un chaine vide le mot clé est null ou vide
*/
private static function formaterMotCle($mot_cle) {
return ($mot_cle === null) ? '' : rtrim($mot_cle).' ';
}
 
/**
* traite la sortie de la chaine de débogage suivant le mode de php
* @param string $mot_cle le mot clé associé à la chaine
* @param string $sortie la chaine de débogage
* @return string la sortie formatée pour le mode en cours
*/
private static function traiterSortieSuivantMode($mot_cle, $sortie) {
$mode_actuel = Config::get('debogage_mode');
if ($mode_actuel == self::MODE_ENTETE_HTTP) {
$cle = (empty($mot_cle)) ? 'message' : $mot_cle;
$sortie = "$cle:$sortie";
} else {
$corps = $mot_cle.PHP_EOL.$sortie;
if (self::getMode() == 'cli') {
$sortie = PHP_EOL.$corps.PHP_EOL;
} else {
$sortie = '<pre>'.$corps.'</pre>';
}
}
return $sortie;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/Cache.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-301914642"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-301914642" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Cache.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Cache.html">Cache</a></td>
<td><em>Classe Cache permettant de mettre en cache des données.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Cache.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/RestServeur.php.txt
New file
0,0 → 1,739
<?php
// declare(encoding='UTF-8');
/**
* Classe principale gérant les services web de type (@link(REST, http://fr.wikipedia.org/wiki/Rest).
*
* Elle contient :
* - les constantes indiquant les différentes (@link(méthode HTTP, http://fr.wikipedia.org/wiki/Http) prises en compte.
* - les @link(codes HTTP des réponses, http://fr.wikipedia.org/wiki/Liste_des_codes_HTTP)
*
* Ce serveur REST accepte 4 types de méthodes HTTP : GET, PUT, POST, DELETE.
* GET et POST ne pose généralement pas de problème pour les clients HTTP mais ce n'est pas forcément le cas pour PUT et DELETE.
* Vous pouvez donc pour réaliser :
* - DELETE : utiliser la méthode POST avec action=DELETE dans le corps de la requête.
* - PUT : utiliser la méthode POST avec une url ne contenant aucune indication de ressource.
* Une autre solution consiste à utiliser n'importe quelle méthode et à ajouter l'entête "X_HTTP_METHOD_OVERRIDE" avec pour
* valeur le nom de la méthode que vous souhaitez utiliser. Exemple d'entête : "X_HTTP_METHOD_OVERRIDE: PUT".
* Exemple : <code>curl -v -v -H "X_HTTP_METHOD_OVERRIDE: DELETE" "http://www.mondomaine.org/services/apiVersion/[mon-service]/"</code>
* Cela fonctionne avec Apache.
*
* Les classes des services web doivent avoir un nom au format ChatMot "MonService" et être appelée dans l'url par le même nom
* en minuscule où les mots sont séparés par des tirets "mon-service".
*
* Paramètres liés dans config.ini :
* - serveur.baseURL : morceau de l'url pour appeler le serveur relative au domaine. Exemple : pour http://www.tela-botanica.org/mon_serveur/
* mettre : "/mon_serveur/"
* - serveur.baseAlternativeURL : sur le même principe que ci-dessus permet d'affecter une deuxième url (pour gérer des raccourci via htaccess)
*
* Encodage en entrée : utf8
* Encodage en sortie : utf8
*
* @category Php 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
* @since 0.3
* @version $Id: RestServeur.php 457 2014-02-06 17:54:21Z jpm $
* @link /doc/framework/
*/
// TODO : gerer les retours : dans ce controleur : code retour et envoi ...
class RestServeur {
 
/** Nom de la méthode appelée dans un service pour éxécuter une requête de type GET. */
const METHODE_GET = 'consulter';
 
/** Nom de la méthode appelée dans un service pour éxécuter une requête de type POST. */
const METHODE_POST = 'modifier';
 
/** Nom de la méthode appelée dans un service pour éxécuter une requête de type DELETE. */
const METHODE_DELETE = 'supprimer';
 
/** Nom de la méthode appelée dans un service pour éxécuter une requête de type PUT. */
const METHODE_PUT = 'ajouter';
 
/** Code HTTP 200 : OK
* Indiquant le succès de l'accès à un service web par la méthode GET.
* L'utiliser lors d'une requète de type GET (consulter) pour indiquer le succès de l'opération.
* Sera renvoyée par défaut par PHP.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1
*/
const HTTP_CODE_OK = '200';
 
/** Code HTTP 201 : Created
* Indiquant que l'accès à un service web est un succès et que la ressource a été créée ou modifié.
* L'utiliser lors d'une requète de type PUT (ajouter) ou POST (modifier) pour indiquer le succès de l'opération.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.2
*/
const HTTP_CODE_CREATION_OK = '201';
 
/** Code HTTP 202 : Accepted
* Indiquant que la requête a été acceptée mais que son traitement n'est pas encore terminé.
* L'utiliser lors d'une requète de type PUT (ajouter) ou POST (modifier) pour indiquer que les données
* seront traitées ultérieurement.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.3
*/
const HTTP_CODE_ACCEPTE_OK = '202';
 
/** Code HTTP 204 : No Content
* Indique que l'accès à un service web est un succès et qu'il n'y a pas de contenu à renvoyer.
* L'utiliser lors d'une requète de type DELETE (supprimer) pour indiquer le succès de l'opération si aucun
* contenu (status) ne doit être renvoyé, sinon utiliser 200 OK.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5
*/
const HTTP_CODE_SUPPRESSION_OK = '204';
 
/** Code HTTP 400 : Bad Request
* Indique que les paramètres envoyés au service contiennent des erreurs.
* L'utiliser pour indiquer l'échec de l'accès au service. La réponse pourra contenir un message expliquant la source
* de l'erreur.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1
*/
const HTTP_CODE_MAUVAISE_REQUETE = '400';
 
/** Code HTTP 401 : Unauthorized
* Indiquant que l'accès à un service web est refusé car l'authentification (obligatoire) a échoué pour
* accéder à la ressource.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2
*/
const HTTP_CODE_ACCES_NON_AUTORISE = '401';
 
/** Code HTTP 403 : Forbidden
* Indiquant que le service a compris la requête mais refuse de la réaliser.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4
*/
const HTTP_CODE_ACCES_INTERDIT = '403';
 
/** Code HTTP 404 : Not Found
* Indiquant que la ressource indiquée par l'url est introuvable.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5
*/
const HTTP_CODE_RESSOURCE_INTROUVABLE = '404';
 
/** Code HTTP 405 : Method Not Allowed
* Indique soit :
* - que le service web ne possède pas d'accès la ressource correspondant à la méthode HTTP employée.
* - que la méthode HTTP enployée n'est pas en accord avec la ressource indiquée par l'url.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6
*/
const HTTP_CODE_METHODE_NON_AUTORISE = '405';
 
/** Code HTTP 409 : Conflict
* Indique qu'un conflit est survenu vis à vis de la ressource.
* Par exemple, essayer de créer deux fois la même ressource ou bien tenter de modifier une ressource qui a été modifiée par
* ailleurs.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10
*/
const HTTP_CODE_CONFLIT = '409';
 
/** Code HTTP 411 : Length Required
* Indique que des paramètres passés dans le contenu de la requête sont nécessaires au service.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.12
*/
const HTTP_CODE_CONTENU_REQUIS = '411';
 
/** Code HTTP 412 : Precondition Failed
* Indique que des entêtes envoyés au serveur sont erronnés.
* À utiliser quand un service web reçoit de mauvais entêtes, paramètres et/ou ressources.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.13
*/
const HTTP_CODE_ECHEC_CONDITION = '411';
 
/** Code HTTP 415 : Unsupported Media Type
* Indique que le type de média envoyé au serveur n'est pas accepté par la ressource.
* À utiliser quand un service web reçoit un mauvais type de contenu.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.16
*/
const HTTP_CODE_CONTENU_NON_SUPPORTE = '415';
 
/** Code HTTP 500 : Internal Server Error.
* L'utiliser quand le serveur ou un service soulève une erreur ou une exception.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1
*/
const HTTP_CODE_ERREUR = '500';
 
/** Code HTTP 503 : Service Unavailable
* L'utiliser quand le web service est momentanément indisponible.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4
*/
const HTTP_CODE_SERVICE_INDISPONIBLE = '503';
 
/** Code HTTP 501 : Not Implemented
* Indique que le web service ne supporte pas la fonctionnalité demandée.
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2
*/
const HTTP_NON_IMPLEMENTE= '501';
 
/** Motif de l'epression régulière vérfiant la version de l'API. */
const MOTIF_API_VERSION = '/^[0-9]+(?:[.][0-9]+)*$/';
 
/** Motif de l'epression régulière vérfiant le nom du service. */
const MOTIF_SERVICE_NOM = '/^[a-z0-9]+(?:[-][a-z0-9]+)*$/';
 
/** Mettre à true pour activer l'affichage des messages d'erreurs et de débogage.
* @var boolean */
private static $debogageActivation = false;
 
/** Indiquer le mode de débogage à utiliser (@see Debug).
* @var string */
private static $debogageMode = '';
 
/** La méthode de la requête HTTP utilisée.
* @var string */
private $methode = 'GET';
 
/** Le contenu brut du corps de la requête HTTP (s'il y en a).
* @var array */
private $requeteDonnees = null;
 
/** Le contenu sous forme de tableau de paires clés-valeurs du corps de la requête HTTP (s'il y en a).
* @var array */
private $requeteDonneesParsees = null;
 
/** Version de l'API demandée.
* Ex. http://www.mondomaine.org/services/[apiVersion]/mon-service/
* @var mixed Généralement deux nombres séparés par un point. Ex. : 1.0
*/
private $apiVersion = null;
 
/** Nom du service demandé.
* Ex. http://www.mondomaine.org/services/apiVersion/[mon-service]/
* @var string par défaut vaut null.
*/
private $service = null;
 
/** Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.
* Ex. http://www.mondomaine.org/services/apiVersion/mon-service/[maRessource/maSousResource...]
* @var array
*/
private $ressources = array();
 
/** Partie de l'url situé après le '?' servant à paramétrer le service demandé.
* Les données proviennent de $_GET où les caractères suivant ont été transformé en '_' undescrore dans les clés :
* - chr(32) ( ) (space)
* - chr(46) (.) (dot)
* - chr(91) ([) (open square bracket)
* - chr(128) - chr(159) (various)
* En outre nous appliquons la méthode nettoyerGet() qui effectue d'autres remplacement dans les valeurs.
* Ex. http://www.mondomaine.org/services/apiVersion/mon-service?monParametre1=maValeur1&monParametre2=maValeur2
* @see parametresBruts
* @var array
*/
private $parametres = array();
 
/** Partie de l'url situé après le '?' servant à paramétrer le service demandé.
* Les données proviennent de $_SERVER['QUERY_STRING'] et n'ont subies aucune transformation au niveau des clés.
* Cependant nous appliquons la méthode nettoyerGet() qui effectue d'autres remplacement dans les valeurs.
* Ex. http://www.mondomaine.org/services/apiVersion/mon-service?monParametre1=maValeur1&monParametre2=maValeur2
* @see parametres
* @var array
*/
private $parametresBruts = array();
 
/** Tableau contenant les paramètres de configuration du serveur.
* @var array
*/
private static $config = array();
 
/** Tableau contenant les messages d'erreur et/ou d'avertissement du Serveur.
* @var array
* */
private static $messages = array();
 
/** Codes HTTP. */
private static $http10 = array(
self::HTTP_CODE_OK => 'OK',
self::HTTP_CODE_CREATION_OK => 'Created',
self::HTTP_CODE_SUPPRESSION_OK => 'No Content',
self::HTTP_CODE_MAUVAISE_REQUETE => 'Bad Request',
self::HTTP_CODE_ACCES_NON_AUTORISE => 'Unauthorized',
self::HTTP_CODE_RESSOURCE_INTROUVABLE => 'Not Found',
self::HTTP_CODE_METHODE_NON_AUTORISE => 'Method Not Allowed',
self::HTTP_CODE_CONFLIT => 'Conflict',
self::HTTP_CODE_CONTENU_REQUIS => 'Length Required',
self::HTTP_CODE_ERREUR => 'Internal Server Error'
);
 
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
private $parametres_obligatoires = array('debogage', 'debogage_mode', 'serveur.baseURL', 'chemin_modules');
 
/**
* Analyse les données envoyées au serveur, enregistre la méthode HTTP utilisée pour appeler le serveur et parse
* l'url appelée pour trouver le service demandé.
*/
public function __construct() {
Config::verifierPresenceParametres($this->parametres_obligatoires);
 
self::$debogageActivation = Config::get('debogage');
self::$debogageMode = Config::get('debogage_mode');
 
if (isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && isset($_SERVER['QUERY_STRING'])) {
$this->initialiserMethode();
$this->initialiserRequeteDonnees();
 
$urlParts = $this->decouperUrlChemin();
 
$this->initialiserApiVersion(array_shift($urlParts));
$this->initialiserServiceNom(array_shift($urlParts));
$this->initialiserRessource($urlParts);
 
$this->initialiserParametres();
// Enregistrement en première position des autoload de la méthode gérant les classes des services
spl_autoload_register(array(get_class(), 'chargerClasse'));
} else {
self::envoyerEnteteStatutHttp(self::HTTP_CODE_ERREUR);
$e = "La classe Serveur du TBFRamework nécessite, pour fonctionner, l'accès aux variables serveurs REQUEST_URI, REQUEST_METHOD et QUERY_STRING.";
self::ajouterMessage($e);
}
}
 
private function initialiserMethode() {
if (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']) && count(trim($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) > 0) {
$this->methode = trim($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
} else {
$this->methode = $_SERVER['REQUEST_METHOD'];
}
}
 
private function initialiserRequeteDonnees() {
if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > 0) {
$this->requeteDonnees = '';
$httpContent = fopen('php://input', 'r');
while ($data = fread($httpContent, 1024)) {
$this->requeteDonnees .= $data;
}
fclose($httpContent);
}
}
 
private function decouperUrlChemin() {
if (isset($_SERVER['REDIRECT_URL']) && $_SERVER['REDIRECT_URL'] != '') {
if (isset($_SERVER['REDIRECT_QUERY_STRING']) && !empty($_SERVER['REDIRECT_QUERY_STRING'])) {
$url = $_SERVER['REDIRECT_URL'].'?'.$_SERVER['REDIRECT_QUERY_STRING'];
} else {
$url = $_SERVER['REDIRECT_URL'];
}
} else {
$url = $_SERVER['REQUEST_URI'];
}
 
if (strlen($_SERVER['QUERY_STRING']) == 0) {
$tailleURL = strlen($url);
} else {
$tailleURL = -(strlen($_SERVER['QUERY_STRING']) + 1);
}
 
$urlChaine = '';
if (strpos($url, Config::get('serveur.baseURL')) !== false) {
$urlChaine = substr($url, strlen(Config::get('serveur.baseURL')), $tailleURL);
} else if (strpos($url, Config::get('serveur.baseAlternativeURL')) !== false) {
$urlChaine = substr($url, strlen(Config::get('serveur.baseAlternativeURL')), $tailleURL);
}
return explode('/', $urlChaine);
}
 
private function initialiserApiVersion($apiVersion) {
if ($this->verifierApiVersion($apiVersion)) {
$this->apiVersion = $apiVersion;
self::$config['chemins']['api'] = Config::get('chemin_modules').$this->apiVersion.DS;
self::$config['chemins']['api_bibliotheque'] = self::$config['chemins']['api'].Config::get('dossier_bibliotheque').DS;
} else {
self::envoyerEnteteStatutHttp(self::HTTP_CODE_MAUVAISE_REQUETE);
$e = "Aucune version d'API n'a été spécifiée.\n".
"La version doit respecter l'expression régulière suivante : ".self::MOTIF_API_VERSION.".\n".
"L'url doit avoir la forme suivante : http://www.mondomaine.org/services/apiVersion/monService/";
self::ajouterMessage($e);
self::cloreAccesServeur();
}
}
 
private function verifierApiVersion($apiVersion) {
$apiOk = false;
if (isset($apiVersion) && !empty($apiVersion) && preg_match(self::MOTIF_API_VERSION, $apiVersion)) {
$apiOk = true;
}
return $apiOk;
}
 
private function initialiserServiceNom($serviceNom) {
if ($this->verifierServiceNom($serviceNom)) {
$this->service = $this->traiterNomService($serviceNom);
} else {
self::envoyerEnteteStatutHttp(self::HTTP_CODE_MAUVAISE_REQUETE);
$e = "Aucune nom de service n'a été spécifié.\n".
"La nom du service doit respecter l'expression régulière suivante : ".self::MOTIF_SERVICE_NOM.".\n".
"L'url doit avoir la forme suivante : http://www.mondomaine.org/services/apiVersion/monService/";
self::ajouterMessage($e);
self::cloreAccesServeur();
}
}
 
private function verifierServiceNom($serviceNom) {
$serviceNomOk = false;
if (isset($serviceNom) && !empty($serviceNom) && preg_match(self::MOTIF_SERVICE_NOM, $serviceNom)) {
$serviceNomOk = true;
}
return $serviceNomOk;
}
 
private function traiterNomService($serviceNom) {
return str_replace(' ', '', ucwords(str_replace('-', ' ', strtolower($serviceNom))));
}
 
private function initialiserRessource($urlParts) {
if (is_array($urlParts) && count($urlParts) > 0) {
foreach ($urlParts as $ressource) {
// Ne pas utiliser empty() car valeur 0 acceptée
if ($ressource != '') {
$this->ressources[] = urldecode($ressource);
}
}
}
}
 
private function initialiserParametres() {
$this->parametres = $this->recupererParametresGet();
$this->parametresBruts = $this->recupererParametresBruts();
}
 
private function recupererParametresGet() {
$_GET = $this->nettoyerParametres($_GET);
return $_GET;
}
 
private function nettoyerParametres(Array $parametres) {
// Pas besoin d'utiliser urldecode car déjà fait par php pour les clés et valeur de $_GET
if (isset($parametres) && count($parametres) > 0) {
foreach ($parametres as $cle => $valeur) {
// les quotes, guillements et points-virgules ont été retirés des caractères à vérifier car
//ça n'a plus lieu d'être maintenant que l'on utilise protéger à peu près partout
$verifier = array('NULL', "\\", "\x00", "\x1a");
$parametres[$cle] = strip_tags(str_replace($verifier, '', $valeur));
}
}
return $parametres;
}
 
private function recupererParametresBruts() {
$parametres_bruts = array();
if (!empty($_SERVER['QUERY_STRING'])) {
$paires = explode('&', $_SERVER['QUERY_STRING']);
foreach ($paires as $paire) {
$nv = explode('=', $paire);
$nom = urldecode($nv[0]);
$valeur = urldecode($nv[1]);
$parametres_bruts[$nom] = $valeur;
}
$parametres_bruts = $this->nettoyerParametres($parametres_bruts);
}
return $parametres_bruts;
}
 
/**
* La méthode __autoload() charge dynamiquement les classes trouvées dans le code.
* Cette fonction est appelée par php5 quand il trouve une instanciation de classe dans le code.
*
*@param string le nom de la classe appelée.
*@return void le fichier contenant la classe doit être inclu par la fonction.
*/
public static function chargerClasse($classe) {
if (class_exists($classe)) {
return null;
}
$chemins = array('', self::$config['chemins']['api'], self::$config['chemins']['api_bibliotheque']);
foreach ($chemins as $chemin) {
$chemin = $chemin.$classe.'.php';
if (file_exists($chemin)) {
require_once $chemin;
}
}
}
 
/**
* Execute la requête.
*/
public function executer() {
$retour = '';
switch ($this->methode) {
case 'GET':
$retour = $this->get();
break;
case 'POST':
$retour = $this->post();// Retour pour l'alternative PUT
break;
case 'DELETE':
$retour = $this->delete();
break;
case 'PUT':
$retour = $this->put();
break;
// Autorise l'accès depuis des serveurs tiers
/*
case 'OPTIONS':
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers:origin, content-type');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Content-Type: application/json');
header('Access-Control-Max-Age: 3628800');
header('Access-Control-Allow-Credentials: false');
break;
*/
default :
self::envoyerEnteteStatutHttp(self::HTTP_CODE_METHODE_NON_AUTORISE);
header('Allow: GET, POST, DELETE, PUT');
$e = "La méthode HTTP '{$this->methode}' n'est pas prise en compte par ce serveur REST.\n".
"Consulter l'entête Allow pour connaître les méthodes autorisées.";
self::ajouterMessage($e);
}
$this->cloreAccesServeur($retour);
}
 
/**
* Execute a GET request. A GET request fetches a list of resource when no resource name is given, a list of element
* when a resource name is given, or a resource element when a resource and resource unique identifier are given. It does not change the
* database contents.
*/
private function get() {
$retour = '';
if ($this->service != null) {
$Service = new $this->service(self::$config);
if (method_exists($Service, self::METHODE_GET)) {
$methodeGet = self::METHODE_GET;
$parametres = $Service->utiliserParametresBruts() ? $this->parametresBruts : $this->parametres;
$retour = $Service->$methodeGet($this->ressources, $parametres);
} else {
self::envoyerEnteteStatutHttp(self::HTTP_CODE_RESSOURCE_INTROUVABLE);
$e = "Le service '{$this->service}' ne contient pas la méthode '".self::METHODE_GET."' nécessaire ".
"lors de l'appel du service via la méthode HTTP GET.";
self::ajouterMessage($e);
}
}
return $retour;
}
 
private function post() {
$retour = '';
$paires = $this->parserDonneesRequete();
if (count($paires) != 0) {
if (isset($paires['action']) && $paires['action'] == 'DELETE') {// Alternative à l'utilisation de DELETE
$retour = $this->delete();
} else if (count($this->ressources) == 0) {// Alternative à l'utilisation de PUT
$retour = $this->put();
} else {
if ($this->service != null) {
$Service = new $this->service(self::$config);
if (method_exists($Service, self::METHODE_POST)) {
$methodePost = self::METHODE_POST;
$info = $Service->$methodePost($this->ressources, $paires);
if ($info !== false) {
$this->envoyerEnteteStatutHttp(self::HTTP_CODE_CREATION_OK);
$retour = $info;
}
} else {
self::envoyerEnteteStatutHttp(self::HTTP_CODE_RESSOURCE_INTROUVABLE);
$e = "Le service '{$this->service}' ne contient pas la méthode '".self::METHODE_POST."' nécessaire ".
"lors de l'appel du service via la méthode HTTP GET.";
self::ajouterMessage($e);
}
}
}
} else {
$this->envoyerEnteteStatutHttp(self::HTTP_CODE_CONTENU_REQUIS);
$e = "Le service '{$this->service}' requiert de fournir le contenu à modifier dans le corps ".
"de la requête avec la méthode HTTP POST.";
self::ajouterMessage($e);
}
return $retour;
}
 
private function put() {
$retour = '';
$paires = $this->parserDonneesRequete();
if (count($paires) != 0) {
if ($this->service != null) {
$Service = new $this->service(self::$config);
if (method_exists($Service, self::METHODE_PUT)) {
$methodePut = self::METHODE_PUT;
$info = $Service->$methodePut($this->ressources, $paires);
if ($info !== false) {
$this->envoyerEnteteStatutHttp(self::HTTP_CODE_CREATION_OK);
$retour = $info;
}
} else {
self::envoyerEnteteStatutHttp(self::HTTP_CODE_RESSOURCE_INTROUVABLE);
$e = "Le service '{$this->service}' ne contient pas la méthode '".self::METHODE_PUT."' nécessaire ".
"lors de l'appel du service via la méthode HTTP GET.";
self::ajouterMessage($e);
}
}
} else {
$this->envoyerEnteteStatutHttp(self::HTTP_CODE_CONTENU_REQUIS);
$e = "Il est nécessaire de fournir du contenu dans le corps de la requête pour créer une nouvelle ressource.";
self::ajouterMessage($e);
}
return $retour;
}
 
private function delete() {
$retour = '';
if (count($this->ressources) != 0) {
$paires = $this->parserDonneesRequete();
if ($this->service != null) {
$Service = new $this->service(self::$config);
if (method_exists($Service, self::METHODE_DELETE)) {
$methodeDelete = self::METHODE_DELETE;
$info = $Service->$methodeDelete($this->ressources, $paires);
if ($info === true) {
$this->envoyerEnteteStatutHttp(self::HTTP_CODE_SUPPRESSION_OK);
} else if ($info === false) {
$this->envoyerEnteteStatutHttp(self::HTTP_CODE_RESSOURCE_INTROUVABLE);
$e = "La ressource à supprimer est introuvable. Il se peut qu'elle ait été préalablement supprimé.";
self::ajouterMessage($e);
} else {
$this->envoyerEnteteStatutHttp(self::HTTP_CODE_OK);
$retour = $info;
}
} else {
self::envoyerEnteteStatutHttp(self::HTTP_CODE_RESSOURCE_INTROUVABLE);
$e = "Le service '{$this->service}' ne contient pas la méthode '".self::METHODE_DELETE."' nécessaire ".
"lors de l'appel du service via la méthode HTTP GET.";
self::ajouterMessage($e);
}
}
} else {
$this->envoyerEnteteStatutHttp(self::HTTP_CODE_MAUVAISE_REQUETE);
$e = "Il est nécessaire d'indiquer dans l'url la ressource à supprimer.";
self::ajouterMessage($e);
}
return $retour;
}
 
/**
* Parse les données contenu dans le corps de la requête HTTP (= POST) en :
* - décodant les clés et valeurs.
* - supprimant les espaces en début et fin des clés et des valeurs.
*
* @return array Tableau de paires clé et valeur.
*/
private function parserDonneesRequete() {
$donnees = array();
if ($this->requeteDonneesParsees != null) {
$donnees = $this->requeteDonneesParsees;
} else if ($this->requeteDonnees != null) {
if (preg_match('/application\/json/', $_SERVER['CONTENT_TYPE'])) {
$donnees = json_decode($this->requeteDonnees, true);
} else {
$paires = explode('&', $this->requeteDonnees);
foreach ($paires as $paire) {
list($cle, $valeur) = explode('=', $paire);
$cle = (isset($cle)) ? trim(urldecode($cle)) : '';
$valeur = (isset($valeur)) ? trim(urldecode($valeur)) : '';
$donnees[$cle] = $valeur;
}
}
$this->requeteDonneesParsees = $donnees;
}
return $donnees;
}
 
/**
* Envoyer un entête HTTP (version 1.0) de statut.
* Il remplacera systématiquement tout entête HTTP de statut précédement envoyé.
* @param int $code entier indiquant le code du statut de l'entête HTTP à envoyer.
*/
public static function envoyerEnteteStatutHttp($code) {
if (isset(self::$http10[$code])) {
$txt = self::$http10[$code];
header("HTTP/1.0 $code $txt", true);
}
}
 
/**
* Termine l'accès au serveur après envoir envoyer les messages.
*/
private static function cloreAccesServeur($retour = '') {
// Gestion des exceptions et erreurs générées par les services
$retour .= self::gererErreurs();
 
// Envoie des messages d'erreur et d'avertissement du serveur
$retour .= self::envoyerMessages();
 
// Autorise l'accès depuis des serveurs tiers
//header('Access-Control-Allow-Origin: *');
 
// Envoie sur la sortie standard le contenu de la réponse HTTP
print $retour;
 
// Nous terminons le script
exit(0);
}
 
/**
* Si des exceptions ou des erreurs sont soulevées par le serveur ou les services, elles sont gérées par cette méthode.
* Si nous avec des erreurs d'un type différent d'E_USER_NOTICE (réservé au débogage), elle sont renvoyées sur la sortie
* standard (via echo).
* Si seulement des erreurs de type E_USER_NOTICE, sont présentes, elle sont envoyées en fonction du contenu du paramètre de
* config "debogage_mode" :
* - Debug::MODE_ECHO : les messages sont affichés en utilisant echo au moment où ils sont déclenchés dans le code.
* - Debug::MODE_NOTICE : les message sont stockés par le gestionnaire d'exception sous forme d'erreur de type
* E_USER_NOTICE et sont renvoyés sur la sortie standard à la fin de l'execution du programme (via echo).
* - Debug::MODE_ENTETE_HTTP : les message sont stockés par le gestionnaire d'exception sous forme d'erreur de type
* E_USER_NOTICE et sont renvoyés dans un entête HTTP (X_REST_DEBOGAGE_MESSAGES) à la fin de l'execution du programme.
* - Autre valeur : les messages sont formatés puis retournés par la fonction de débogage (à vous de les afficher).
*/
public static function gererErreurs() {
$retour = '';
if (self::$debogageActivation && GestionnaireException::getExceptionsNbre() > 0) {
 
$exceptionsTriees = GestionnaireException::getExceptionsTriees();
reset($exceptionsTriees);
$debogageSeulement = true;
if (array_key_exists(E_USER_ERROR, $exceptionsTriees)) {
self::envoyerEnteteStatutHttp(self::HTTP_CODE_ERREUR);
$debogageSeulement = false;
}
 
$exceptionsFormatees = array();
foreach ($exceptionsTriees as $exceptions) {
foreach ($exceptions as $e) {
if ($debogageSeulement && self::$debogageMode == Debug::MODE_ENTETE_HTTP) {
$exceptionsFormatees[] = GestionnaireException::formaterExceptionDebug($e);
} else {
$retour = GestionnaireException::formaterExceptionXhtml($e);
}
}
}
 
if ($debogageSeulement && self::$debogageMode == Debug::MODE_ENTETE_HTTP) {
header('X_REST_DEBOGAGE_MESSAGES: '.json_encode($exceptionsFormatees));
}
}
return $retour;
}
 
 
/**
* Permet d'ajouter un message d'erreur ou d'avertissement qui sera envoyé au client.
* Le message doit être au format texte et en UTF-8.
* @param string $message le message à envoyer.
*/
public static function ajouterMessage($message) {
if (isset($message) && !empty($message)) {
self::$messages[] = $message;
}
}
 
/**
* Envoie au client les éventuels messages d'erreur et d'avertissement du Serveur.
* Le format d'envoie est text/plain encodé en UTF-8.
*/
private static function envoyerMessages() {
if (count(self::$messages) > 0) {
header("Content-Type: text/plain; charset=utf-8");
return implode("\n", self::$messages);
}
}
}
?>
 
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/Script.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1805207323"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1805207323" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>Script.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Script.html">Script</a></td>
<td><em>Script est une classe abstraite qui doit être implémenté par les classes éxecutant des scripts en ligne de commande.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Script.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/utilitaires/Encodage.php.txt
New file
0,0 → 1,57
<?php
// declare(encoding='UTF-8');
/**
* Classe fournissant des méthodes statiques concernant l'encodage et le décodage des caractères de variable.
*
* @category PHP 5.2
* @package Utilitaire
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id: Encodage.php 299 2011-01-18 14:03:46Z jpm $
* @link /doc/framework/
*/
class Encodage {
/**
* Méthode permettant d'encoder par défaut de ISO-8859-15 vers UTF-8 une variable ou un tableau de variables.
*
* @param mixed la chaine ou le tableau à encoder en UTF-8 depuis ISO-8859-15.
* @param string l'encodage d'origine si ce n'est pas ISO-8859-15.
* @return mixed la chaine ou le tableau encodé en UTF-8.
* @access protected
*/
public static function encoderEnUtf8(&$variable, $encodage = 'ISO-8859-15') {
//echo print_r($variable, true)."\n";
if (is_array($variable)) {
foreach ($variable as $c => $v) {
$variable[$c] = self::encoderEnUtf8($v);
}
} else {
// Nous vérifions si nous avons un bon encodage UTF-8
if (!is_numeric($variable) && !empty($variable) && !self::detecterUtf8($variable)) {
// Les nombres, les valeurs vides et ce qui est déjà en UTF-8 ne sont pas encodés.
$variable = mb_convert_encoding($variable, 'UTF-8', $encodage);
}
}
return $variable;
}
/**
* Méthode permettant de détecter réellement l'encodage UTF-8.
* mb_detect_encoding plante si la chaine de caractère se termine par un caractère accentué.
* Provient de PHPDIG.
*
* @param string la chaine à vérifier.
* @return bool true si c'est de UTF-8, sinon false.
* @access private
*/
public static function detecterUtf8($chaine) {
if ($chaine === mb_convert_encoding(mb_convert_encoding($chaine, 'UTF-32', 'UTF-8'), 'UTF-8', 'UTF-32')) {
return true;
} else {
return false;
}
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/utilitaires/Chaine.php.txt
New file
0,0 → 1,68
<?php
// declare(encoding='UTF-8');
/**
* Classe fournissant des méthodes statiques de manipulation des chaînes de caractères (String).
*
* @category PHP 5.2
* @package Utilitaire
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id: Chaine.php 343 2011-06-09 14:59:36Z jpm $
* @link /doc/framework/
*/
class Chaine {
 
private static $caracteres_accentues = array(
'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î',
'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß',
'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î',
'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā',
'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď',
'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ',
'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ',
'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ',
'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ',
'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ',
'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ',
'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż',
'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ',
'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ');
 
private static $caracteres_normaux = array(
'A', 'A', 'A', 'A', 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I',
'I', 'D', 'N', 'O', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 's',
'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i',
'i', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'a',
'A', 'a', 'A', 'a', 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd',
'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g',
'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i',
'IJ', 'ij', 'J', 'j', 'K', 'k', 'L', 'l', 'L', 'l', 'L', 'l', 'L', 'l', 'l', 'l',
'N', 'n', 'N', 'n', 'N', 'n', 'n', 'O', 'o', 'O', 'o', 'O', 'o', 'OE', 'oe', 'R',
'r', 'R', 'r', 'R', 'r', 'S', 's', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't',
'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', 'Y',
'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I',
'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'A', 'a', 'AE', 'ae', 'O', 'o');
/**
* Supprime ou remplace les accents d'une chaine en PHP.
* La solution retenu, provenant du site
* {@link http://www.lecoindunet.com/zone_php/scripts_utiles/remplacer-les-caracteres-accentues-dune-chaine-en-php-72 lecoindunet.com},
* consiste en deux tableaux (caractères avec et sans accents) car cela permetra éventuellement
* de fournir des méthodes pour récupérer ces tableaux pour d'autres traitements.
* Une autre solution aurait été d'utiliser les entités HTML comme proposé par le site
* {@link http://www.weirdog.com/blog/php/supprimer-les-accents-des-caracteres-accentues.html weirdog.com}.
*
* @param String $chaine la chaine de caractères dans laquelle supprimer les accents.
* @param String $encodage le code d'encodage de la chaine si ce n'est pas de l'UTF-8.
* @return la chaine de caractères sans accent.
*/
public static function supprimerAccents($chaine, $encodage = 'UTF-8') {
if ($encodage != 'UTF-8') {
mb_convert_variables($encodage, 'UTF-8', self::$caracteres_accentues, self::$caracteres_normaux);
}
return str_replace(self::$caracteres_accentues, self::$caracteres_normaux, $chaine);
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/utilitaires/Fichier.php.txt
New file
0,0 → 1,202
<?php
// declare(encoding='UTF-8');
/**
* Classe fournissant des méthodes statiques de manipulation des fichiers.
*
* @category PHP 5.2
* @package Utilitaire
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id: Fichier.php 351 2011-07-21 10:22:34Z jpm $
* @link /doc/framework/
*/
class Fichier {
/**
* Créer et stocke du contenu dans un fichier.
*
* @param string le chemin et le nom du fichier.
* @param string le contenu à stocker dans le fichier.
* @return string true en cas de succès sinon false.
*/
public static function creerFichier($fichier, $contenu) {
$erreur = null;
// Début de l'écriture du fichier
if ($resource = fopen($fichier, 'w')) {
if (!fwrite($resource, $contenu)) {
if (!fclose($resource)) {
$erreur = "Le fichier '$fichier' n'a pas pu être fermé.";
}
} else {
$erreur = "Le contenu texte n'a pas pu être écrit dans le fichier '$fichier'.";
}
} else {
$erreur = "Le fichier '$fichier' n'a pas pu être ouvert.";
}
 
// Gestion des erreurs et du retour
if (is_null($erreur)) {
return true;
} else {
trigger_error($erreur, E_USER_WARNING);
return false;
}
}
/**
* Créer et stocke du contenu dans un fichier compressé en Gzip.
*
* @param string le chemin et le nom du fichier.
* @param string le contenu à stocker dans le fichier.
* @return string true en cas de succès sinon false.
*/
public static function creerFichierGzip($fichier, $contenu) {
$erreur = null;
// Ajout de l'extension gz
if (substr($fichier, -3) != '.gz') {
$fichier = $fichier.'.gz';
}
// Début de l'écriture du fichier compressé
if ($resource = gzopen($fichier, 'w9')) {
if (gzwrite($resource, $contenu)) {
if (!gzclose($resource)) {
$erreur = "Le fichier compressé '$fichier' n'a pas pu être fermé.";
}
} else {
$erreur = "Le contenu texte n'a pas pu être écrit dans le fichier compressé '$fichier'.";
}
} else {
$erreur = "Le fichier compressé '$fichier' n'a pas pu être ouvert.";
}
// Gestion des erreurs et du retour
if (is_null($erreur)) {
return true;
} else {
trigger_error($erreur, E_USER_WARNING);
return false;
}
}
/**
* Supprime récursivement un dossier et tout son contenu.
*
* @param string $dossier le chemin vers le dossier à supprimer.
* @return void
*/
public static function supprimerDossier($dossier) {
if (is_dir($dossier)) {
$objets = scandir($dossier);
foreach ($objets as $objet) {
if ($objet != '.' && $objet != '..') {
$chemin = $dossier.'/'.$objet;
if (filetype($chemin) == 'dir') {
$this->supprimerDossier($chemin);
} else {
unlink($chemin);
}
}
}
reset($objets);
rmdir($dossier);
}
}
/**
* Convertion d'un nombre d'octet en kB, MB, GB.
* @link http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html
* @param integer $taille la taille en octet à convertir
*
* @return string la chaine représentant la taille en octets.
*/
public static function convertirTaille($taille) {
$unite = array('B', 'kB', 'MB', 'GB');
return @round($taille / pow(1024, ($i = floor(log($taille,1024)))), 2).' '.$unite[$i];
}
/**
* Détermine le dossier système temporaire et détecte si nous y avons accès en lecture et écriture.
*
* Inspiré de Zend_File_Transfer_Adapter_Abstract & Zend_Cache
*
* @return string|false le chemine vers le dossier temporaire ou false en cas d'échec.
*/
public static function getDossierTmp() {
$dossier_tmp = false;
foreach (array($_ENV, $_SERVER) as $environnement) {
foreach (array('TMPDIR', 'TEMP', 'TMP', 'windir', 'SystemRoot') as $cle) {
if (isset($environnement[$cle])) {
if (($cle == 'windir') or ($cle == 'SystemRoot')) {
$dossier = realpath($environnement[$cle] . '\\temp');
} else {
$dossier = realpath($environnement[$cle]);
}
if (self::etreAccessibleEnLectureEtEcriture($dossier)) {
$dossier_tmp = $dossier;
break 2;
}
}
}
}
if ( ! $dossier_tmp) {
$dossier_televersement_tmp = ini_get('upload_tmp_dir');
if ($dossier_televersement_tmp) {
$dossier = realpath($dossier_televersement_tmp);
if (self::etreAccessibleEnLectureEtEcriture($dossier)) {
$dossier_tmp = $dossier;
}
}
}
if ( ! $dossier_tmp) {
if (function_exists('sys_get_temp_dir')) {
$dossier = sys_get_temp_dir();
if (self::etreAccessibleEnLectureEtEcriture($dossier)) {
$dossier_tmp = $dossier;
}
}
}
if ( ! $dossier_tmp) {
// Tentative de création d'un fichier temporaire dans le dossier courrant
$fichier_tmp = @tempnam(md5(uniqid(rand(), TRUE)), '');
if ($fichier_tmp) {
$dossier = @realpath(dirname($fichier_tmp));
@unlink($fichier_tmp);
if (self::etreAccessibleEnLectureEtEcriture($dossier)) {
$dossier_tmp = $dossier;
}
}
}
if ( ! $dossier_tmp && self::etreAccessibleEnLectureEtEcriture('/tmp')) {
$dossier_tmp = '/tmp';
}
if ( ! $dossier_tmp && self::etreAccessibleEnLectureEtEcriture('\\temp')) {
$dossier_tmp = '\\temp';
}
return $dossier_tmp;
}
/**
* Vérifie si le fichier ou dossier est accessible en lecture et écriture.
*
* @param $ressource chemin vers le dossier ou fichier à tester
* @return boolean true si la ressource est accessible en lecture et écriture.
*/
protected static function etreAccessibleEnLectureEtEcriture($ressource){
$accessible = false;
if (is_readable($ressource) && is_writable($ressource)) {
$accessible = true;
}
return $accessible;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/utilitaires/Pattern.php.txt
New file
0,0 → 1,24
<?php
// declare(encoding='UTF-8');
/**
* Classe fournissant des constantes correspondant à des expressions régulières de vérification très courrantes.
*
* @category PHP 5.2
* @package Utilitaire
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id: Pattern.php 299 2011-01-18 14:03:46Z jpm $
* @link /doc/framework/
*/
class Pattern {
const PRENOM = "[\p{L}-]+";// Pattern prénom
const NOM = "[\p{Lu}]+";// Pattern nom
const COURRIEL = "[a-z0-9!#$%&'*+=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?";// Pattern courriel
const URL = "^(?:(?:ht|f)tp(?:s?)\\:\\/\\/|~/|/)?(?:\\w+:\\w+@)?(?:(?:[-\\w]+\\.)+(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?::[\\d]{1,5})?(?:(?:(?:/(?:[-\\w~!$+|.,=]|%[a-f\\d]{2})+)+|/)+|\\?|#)?(?:(?:\\?(?:[-\\w~!$+|.,*:]|%[a-f\\d{2}])+=(?:[-\\w~!$+|.,*:=]|%[a-f\\d]{2})*)(?:&(?:[-\\w~!$+|.,*:]|%[a-f\\d{2}])+=(?:[-\\w~!$+|.,*:=]|%[a-f\\d]{2})*)*)*(?:#(?:[-\\w~!$+|.,*:=]|%[a-f\\d]{2})*)?$";
const HEURE_MINUTE = "^(?:[0-1][0-9]|2[0-4]):(?:[0-5][0-9]|60)$";// Heure au format 24h avec séparateur d'heure et minute ':'
const LATITUDE = "^-?([0-8]?[0-9]([.,][0-9]*)?|90)$"; // Nombre décimal positif ou négatif allant de 0 à 89 ou nombre entier valant 90 avec pour séparateur des décimales "." ou ","
const LONGITUDE = "^-?((1[0-7][0-9]|[1-9]?[0-9])([.,][0-9]*)?|180)$"; // Nombre décimal positif ou négatif allant de 0 à 179 ou nombre entier valant 180 avec pour séparateur des décimales "." ou ","
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/utilitaires/Tableau.php.txt
New file
0,0 → 1,97
<?php
// declare(encoding='UTF-8');
/**
* Classe fournissant des méthodes statiques de manipulation des tableaux (Array).
*
* @category PHP 5.2
* @package Utilitaire
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id: Tableau.php 400 2011-11-25 16:26:26Z jpm $
* @link /doc/framework/
*/
class Tableau {
 
/**
* Etend le tableau à étendre avec les données du tableau à copier. Si des clés sont identiques entre les deux tableaux
* une erreur est déclenchée et la valeur du tableau à étendre est gardée. Si les deux tableaux ont des clés numériques
* leurs valeurs sont gardées (à la différence de array_merge).
* Les tableaux sont passés par références et le tableau à copier est progressivement détruit pour éviter la consomation
* de mémoire.
*
* @param array $tableau_a_etendre
* @param array $tableau_a_copier
* @return void
*/
public static function etendre(Array &$tableau_a_etendre, Array &$tableau_a_copier) {
$cles_existantes = null;
foreach($tableau_a_copier as $cle => $val) {
if (!isset($tableau_a_etendre[$cle])) {
$tableau_a_etendre[$cle] = $val;
unset($tableau_a_copier[$cle]);
} else {
$cles_existantes[] = $cle;
}
}
if (is_array($cles_existantes)) {
$e = "Le tableau a étendre contenait déjà les clés suivantes : ".implode(', ', $cles_existantes);
trigger_error($e, E_USER_WARNING);
}
}
 
/**
* @deprecated Utiliser la méthode trierMD()
* @see trierMD()
*/
public static function trierTableauMd($array, $cols) {
return self::trierMD($array, $cols);
}
 
/**
* Permet de trier un tableau multi-dimenssionnel en gardant l'ordre des clés.
*
* @param Array $array le tableau à trier
* @param Array $cols tableau indiquant en clé la colonne à trier et en valeur l'ordre avec SORT_ASC ou SORT_DESC
* @return Array le tableau trié.
* @author cagret at gmail dot com
* @see http://fr.php.net/manual/fr/function.array-multisort.php Post du 21-Jun-2009 12:38
*/
public static function trierMD($array, $cols) {
$colarr = array();
foreach ($cols as $col => $order) {
$colarr[$col] = array();
foreach ($array as $k => $row) {
$colarr[$col]['_'.$k] = strtolower($row[$col]);
}
}
$params = array();
foreach ($cols as $col => $order) {
$params[] =& $colarr[$col];
$orders = (array) $order;
foreach($orders as $orderElement) {
$params[] =& $orderElement;
}
}
call_user_func_array('array_multisort', $params);
$ret = array();
$keys = array();
$first = true;
foreach ($colarr as $col => $arr) {
foreach ($arr as $k => $v) {
if ($first) {
$keys[$k] = substr($k, 1);
}
$k = $keys[$k];
if (!isset($ret[$k])) {
$ret[$k] = $array[$k];
}
$ret[$k][$col] = $array[$k][$col];
}
$first = false;
}
return $ret;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/GestionnaireException.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1574567134"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1574567134" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>GestionnaireException.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/GestionnaireException.html">GestionnaireException</a></td>
<td><em>Classe de gestion des exceptions.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/GestionnaireException.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/utilitaires.Fichier.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1203114952"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1203114952" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small>utilitaires</small>Fichier.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Fichier.html">Fichier</a></td>
<td><em>Classe fournissant des méthodes statiques de manipulation des fichiers.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/utilitaires/Fichier.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Controleur.php.txt
New file
0,0 → 1,122
<?php
// declare(encoding='UTF-8');
/**
* Classe Controleur, coeur d'une application, c'est normalement la seule classe d'une application
* qui devrait être appelée de l'extérieur.
* Elle est abstraite donc doit obligatoirement être étendue.
*
* @category php 5.2
* @package Framework
* @author Aurélien PERONNET <aurelien@tela-botanica.org>
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
* @version $Id: Controleur.php 332 2011-03-22 16:54:23Z delphine $
* @link /doc/framework/
*
*/
abstract class Controleur {
/** Variable statique indiquant que les tableaux _GET et _POST ont déjà été encodé au format de l'appli. */
private static $encodage = false;
 
/** Chemin de base vers les classes métiers de la partie Modèle de l'application. */
private $base_chemin_modele = null;
/** Chemin de base vers les fichiers squelette de la partie Vue de l'application. */
private $base_chemin_squelette = null;
/** Chemin de base vers les classes controleurs de la partie Controleur de l'application. */
private $base_chemin_controleur = null;
/** Objet URL contant l'url de la base de l'application. */
private $base_url_applicaton = null;
 
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
protected $parametres_obligatoires = array('chemin_modeles', 'chemin_squelettes', 'chemin_controleurs', 'base_url_application');
/**
* Constructeur par défaut
*/
public function __construct() {
Config::verifierPresenceParametres($this->parametres_obligatoires);
$this->base_chemin_modele = Config::get('chemin_modeles');
$this->base_chemin_squelette = Config::get('chemin_squelettes');
$this->base_chemin_controleur = Config::get('chemin_controleurs');
$this->base_url_application = new Url(Config::get('base_url_application'));
}
 
/**
* Charge un modele donné et le rend disponible sous la forme $this->nom_modele
*
* @param string $nom_modele le nom du modèle à  charger
*
* @return boolean false si le chargement a échoué, sinon true.
*/
final public function chargerModele($nom_modele) {
$sortie = true;
if (!isset($this->$nom_modele)) {
$modele = $this->getModele($nom_modele);
if ($modele !== false) {
$this->$nom_modele = $modele;
} else {
$sortie = false;
}
}
return $sortie;
}
 
/**
* Retourne un modele donné
*
* @param string $nom_modele le nom du fichier modèle à charger sans son extension
* @param String $ext l'extension du fichier du modèel (par défaut : ".php"
*
* @return mixed false si le chargement a échoué, sinon l'objet du modèle demandé.
*/
final protected function getModele($nom_modele, $ext = '.php') {
$sortie = false;
$chemin_modele = $this->registre->get('base_chemin_modele').$nom_modele.$ext;
if (file_exists($chemin_modele)) {
include_once $chemin_modele;
if (class_exists($nom_modele)) {
$sortie = new $nom_modele;
}
}
return $sortie;
}
 
/**
* Fonction prenant en paramètre le nom d'un squelette et un tableau associatif de données,
* en extrait les variables, charge le squelette et retourne le résultat des deux combinés.
*
* @param String $nom_squelette le nom du squelette sans son extension
* @param Array $donnees un tableau associatif contenant les variables a injecter dans la vue
* @param String $ext l'extension du fichier du squelette (par défaut : ".tpl.html"
*
* @return boolean false si la vue n'existe pas, sinon la chaine résultat.
*/
final protected function getVue($nom_squelette, &$donnees = array(), $ext = '.tpl.html') {
$donnees = $this->preTraiterDonnees($donnees);
$chemin_squelette = $this->base_chemin_squelette.$nom_squelette.$ext;
$sortie = SquelettePhp::analyser($chemin_squelette, $donnees);
 
return $sortie;
}
 
/**
* Fonction prenant en paramètre un tableau de données et effectuant un traitement dessus.
* Cette fonction est à surcharger dans les classes filles pour automatiser un traitement
* avant chaque chargement de vue.
*
* @param Array $donnees Le tableau de données à traiter
*
* @return Array $donnees Le tableau de données traité
*/
protected function preTraiterDonnees(&$donnees) {
return $donnees;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/Framework.php.txt
New file
0,0 → 1,251
<?php
// declare(encoding='UTF-8');
/**
* Classe de base du Framework :
* - fournissant des infos sur l'application,
* - paramétrant l'environnement de l'appli et du framework,
* - réalisant des traitements sur les variables globales ($_GET, $_POST, $_COOKIE...)
*
* Cette classe contient la fonction de chargement automatique de classes.
* Ce fichier doit toujours rester à la racine du framework car il initialise le chemin
* de l'application en se basant sur son propre emplacement.
*
* @category PHP 5.2
* @package Framework
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id: Framework.php 391 2011-11-09 16:55:53Z jpm $
* @since 0.3
* @link /doc/framework/
*/
class Framework {
 
/** Variable statique indiquant que les tableaux _GET et _POST ont déjà été encodé au format de l'appli. */
private static $encodage = false;
 
/** Tableau d'informations sur l'application */
private static $info = null;
 
/** Chemin de base de l'application */
private static $chemin = null;
 
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
private static $parametres_obligatoires = array('chemin_controleurs', 'chemin_modeles', 'chemin_bibliotheque',
'url_arg_separateur_entree', 'url_arg_separateur_sortie',
'encodage_sortie', 'encodage_appli');
 
/**
* Initialise l'environnement nécessaire au Framework : constantes globales, méthodeles autoload, séparateur d'arguments
* d'url.
* Cette méthode est appelée automatiquement suite à la définition du chemin de l'application via Application::setChemin().
*/
private static function initialiserEnvironnement() {
self::enregistrerMethodesAutoload();
self::initialiserUrl();
}
 
/**
* Initialise différentes classes du Framework nécessaires pour le fonctionnement de l'application.
* Ces classes sont ensuites controlées via les fichiers de config.ini.
* Elle est appelée automatiquement suite à la définition du chemin de l'application via Application::setChemin().
*/
private static function initialiserFramework() {
GestionnaireException::configurer();
//Log::configurer();
self::verifierEtReencoderTableauRequete();
}
 
/**
* Redéfinit des constantes globales utiles pour le Framework et les applis.
*/
private static function definirConstantesGlobales() {
if (!defined('DS')) {
/** Redéfinition de la constante DIRECTORY_SEPARATOR en version abrégée DS */
define('DS', DIRECTORY_SEPARATOR);
}
if (!defined('PS')) {
/** Redéfinition de la constante PATH_SEPARATOR en version abrégée PS */
define('PS', PATH_SEPARATOR);
}
}
 
private static function definirCheminAppli($chemin) {
if (is_file($chemin)) {
self::$chemin = dirname($chemin).DS;
} else if (is_dir($chemin)) {
self::$chemin = $chemin;
} else {
throw new Exception("Le chemin indiqué '$chemin' n'est ni un fichier ni un dossier.");
}
}
 
private static function enregistrerMethodesAutoload() {
spl_autoload_register(array(get_class(), 'autoloadFw'));
 
// Vérification des paramètres de configuration obligatoire pour assurer le fonctionnement du Framework
Config::verifierPresenceParametres(self::$parametres_obligatoires);
 
// Initialisation du gestionnaire d'erreur avant toute chose
GestionnaireException::initialiser();
 
spl_autoload_register(array(get_class(), 'autoloadAppliDefaut'));
 
// Autoload défini par l'application
if (function_exists('__autoload')) {
spl_autoload_register('__autoload');
}
}
 
/**
* Autoload pour le Framework.
*/
private static function autoloadFw($nom_classe_fw) {
$dossiers_classes = array( dirname(__FILE__).DS,
dirname(__FILE__).DS.'utilitaires'.DS);
foreach ($dossiers_classes as $chemin) {
$fichier_a_tester = $chemin.$nom_classe_fw.'.php';
if (file_exists($fichier_a_tester)) {
include_once $fichier_a_tester;
return null;
}
}
}
 
/**
* Autoload par défaut pour l'application
*/
private static function autoloadAppliDefaut($nom_classe) {
$dossiers_classes = array( Config::get('chemin_controleurs'),
Config::get('chemin_modeles'),
Config::get('chemin_bibliotheque'));
 
foreach ($dossiers_classes as $chemin) {
$fichier_a_tester = $chemin.$nom_classe.'.php';
if (file_exists($fichier_a_tester)) {
include_once $fichier_a_tester;
return null;
}
}
}
 
/**
* Initialise le format des urls.
*/
private static function initialiserUrl() {
ini_set('arg_separator.input', Config::get('furl_arg_separateur_entree'));
ini_set('arg_separator.output', Config::get('url_arg_separateur_sortie'));
}
 
/**
* Permet d'indiquer le chemin de base de l'Application.
* Cette méthode doit obligatoirement être utilisée par l'application pour que le Framework fonctionne correctement.
* @param string $chemin_fichier_principal chemin de base
*/
public static function setCheminAppli($chemin_fichier_principal) {
if (self::$chemin === null) {
if (!file_exists($chemin_fichier_principal)) {
trigger_error("Le fichier indiqué n'existe pas. Utilisez __FILE__ dans la méthode setCheminAppli().", E_USER_ERROR);
} else {
self::definirConstantesGlobales();
self::definirCheminAppli($chemin_fichier_principal);
self::initialiserEnvironnement();
self::initialiserFramework();
}
} else {
trigger_error("Le chemin de l'application a déjà été enregistré auprès du Framework", E_USER_WARNING);
}
}
 
/**
* accesseur pour le chemin
* @return string le chemin
*/
public static function getCheminAppli() {
return self::$chemin;
}
 
/** Le tableau des informations sur l'application possède les clés suivantes :
* - nom : nom de l'application
* - abr : abréviation de l'application
* - encodage : encodage de l'application (ISO-8859-15, UTF-8...)
*
* @param array $info tableau fournissant des informations sur l'application
* @return void
*/
public static function setInfoAppli($info) {
if (self::$info === null) {
self::$info = $info;
} else {
trigger_error("Le informations de l'application ont déjà été enregistrées auprès du Framework", E_USER_WARNING);
}
}
 
/**
* Accesseur pour le tableau d'infos sur l'application.
* @param string $cle la clé à laquelle on veut accéder
*/
public static function getInfoAppli($cle = null) {
if ($cle !== null) {
if (isset(self::$info[$cle])) {
return self::$info[$cle];
}
} else {
return self::$info;
}
}
 
/**
* Procédure vérifiant l'encodage des tableaux $_GET et $_POST et les transcodant dans l'encodage de l'application
*/
protected static function verifierEtReencoderTableauRequete() {
if (self::$encodage == false && Config::get('encodage_sortie') != Config::get('encodage_appli')) {
$_POST = self::encoderTableau($_POST, Config::get('encodage_appli'), Config::get('encodage_sortie'));
$_GET = self::encoderTableau($_GET, Config::get('encodage_appli'), Config::get('encodage_sortie'));
 
// Traitement des magic quotes
self::verifierEtTraiterSlashTableauRequete();
 
self::$encodage = true;
}
}
 
/**
* Procédure vérifiant l'activation des magic quotes et remplacant les slash dans les tableaux de requete
*/
private static function verifierEtTraiterSlashTableauRequete() {
if (get_magic_quotes_gpc()) {
if (!function_exists('nettoyerSlashProfond')) {
function nettoyerSlashProfond($valeur) {
return ( is_array($valeur) ) ? array_map('nettoyerSlashProfond', $valeur) : stripslashes($valeur);
}
}
$_GET = array_map('nettoyerSlashProfond', $_GET);
$_POST = array_map('nettoyerSlashProfond', $_POST);
$_COOKIE = array_map('nettoyerSlashProfond', $_COOKIE);
}
}
 
/**
* Fonction récursive transcodant toutes les valeurs d'un tableau de leur encodage d'entrée vers un encodage de sortie donné
* @param $tableau Array Un tableau de données à encoder
* @param $encodage_sortie String l'encodage vers lequel on doit transcoder
* @param $encodage_entree String l'encodage original des chaines du tableau (optionnel)
* @return Array Le tableau encodé dans l'encodage de sortie
*
*/
final static protected function encoderTableau($tableau, $encodage_sortie, $encodage_entree = null) {
if (is_array($tableau)) {
foreach ($tableau as $cle => $valeur) {
if (is_array($valeur)) {
$tableau[$cle] = self::encoderTableau($valeur, $encodage_sortie, $encodage_entree);
} else {
$tableau[$cle] = mb_convert_encoding($valeur, $encodage_sortie, $encodage_entree);
}
}
}
return $tableau;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/CacheFichier.php.txt
New file
0,0 → 1,871
<?php
class CacheFichier {
/**
* Options disponibles
*
* ====> (string) stockage_chemin :
* Chemin vers le dossier devant contenir l'arborescence du cache.
*
* =====> (boolean) fichier_verrou :
* - Active / Désactive le verrouillage des fichiers
* - Peut éviter la corruption du cache dans de mauvaises circonstances, mais cela ne fonctionne pas sur des serveur
* multithread et sur les systèmes de fichiers NFS par exemple.
*
* =====> (boolean) controle_lecture :
* - Activer / désactiver le contrôle de lecture
* - S'il est activé, une clé de contrôle est ajoutée dans le fichier de cache et cette clé est comparée avec celle calculée
* après la lecture.
*
* =====> (string) controle_lecture_type :
* Type de contrôle de lecture (seulement si le contrôle de lecture est activé).
* Les valeurs disponibles sont:
* - «md5» pour un contrôle md5 (le meilleur mais le plus lent)
* - «crc32» pour un contrôle de hachage crc32 (un peu moins sécurisé, mais plus rapide, un meilleur choix)
* - «adler32» pour un contrôle de hachage adler32 (excellent choix aussi, plus rapide que crc32)
* - «strlen» pour un test de longueur uniquement (le plus rapide)
*
* =====> (int) dossier_niveau :
* - Permet de réglez le nombre de niveau de sous-dossier que contiendra l'arborescence des dossiers du cache.
* 0 signifie "pas de sous-dossier pour le cache",
* 1 signifie "un niveau de sous-dossier",
* 2 signifie "deux niveaux" ...
* Cette option peut accélérer le cache seulement lorsque vous avez plusieurs centaines de fichiers de cache.
* Seuls des tests spécifiques peuvent vous aider à choisir la meilleure valeur possible pour vous.
* 1 ou 2 peut être est un bon début.
*
* =====> (int) dossier_umask :
* - Umask pour les sous-dossiers de l'arborescence du cache.
*
* =====> (string) fichier_prefixe :
* - préfixe pour les fichiers du cache
* - ATTENTION : faite vraiment attention avec cette option, car une valeur trop générique dans le dossier cache du système
* (comme /tmp) peut provoquer des catastrophes lors du nettoyage du cache.
*
* =====> (int) fichier_umask :
* - Umask pour les fichiers de cache
*
* =====> (int) metadonnees_max_taille :
* - taille maximum pour le tableau de métadonnées du cache (ne changer pas cette valeur sauf si vous savez ce que vous faite)
*
* @var array options disponibles
*/
protected $options = array(
'stockage_chemin' => null,
'fichier_verrou' => true,
'controle_lecture' => true,
'controle_lecture_type' => 'crc32',
'dossier_niveau' => 0,
'dossier_umask' => 0700,
'fichier_prefixe' => 'tbf',
'fichier_umask' => 0600,
'metadonnees_max_taille' => 100
);
 
/**
* Array of metadatas (each item is an associative array)
*
* @var array
*/
protected $metadonnees = array();
 
private $Cache = null;
/**
* Constructor
*
* @param array $options associative array of options
* @throws Zend_Cache_Exception
* @return void
*/
public function __construct(array $options = array(), Cache $cache) {
$this->Cache = $cache;
$this->initialiserOptionsParConfig();
$this->setOptions($options);
 
if (isset($this->options['prefixe_fichier'])) {
if (!preg_match('~^[a-zA-Z0-9_]+$~D', $this->options['prefixe_fichier'])) {
trigger_error("Préfixe de nom de fichier invalide : doit contenir seulement [a-zA-Z0-9_]", E_USER_WARNING);
}
}
if ($this->options['metadonnees_max_taille'] < 10) {
trigger_error("Taille du tableau des méta-données invalide, elle doit être > 10", E_USER_WARNING);
}
if (isset($options['dossier_umask']) && is_string($options['dossier_umask'])) {
// See #ZF-4422
$this->options['dossier_umask'] = octdec($this->options['dossier_umask']);
}
if (isset($options['fichier_umask']) && is_string($options['fichier_umask'])) {
// See #ZF-4422
$this->options['fichier_umask'] = octdec($this->options['fichier_umask']);
}
}
private function initialiserOptionsParConfig() {
while (list($nom, $valeur) = each($this->options)) {
if (Config::existe($nom)) {
$this->options[$nom] = Config::get($nom);
}
}
}
private function setOptions($options) {
while (list($nom, $valeur) = each($options)) {
if (!is_string($nom)) {
trigger_error("Nom d'option incorecte : $nom", E_USER_WARNING);
}
$nom = strtolower($nom);
if (array_key_exists($nom, $this->options)) {
$this->options[$nom] = $valeur;
}
}
}
 
public function setEmplacement($emplacement) {
if (!is_dir($emplacement)) {
trigger_error("L'emplacement doit être un dossier.", E_USER_WARNING);
}
if (!is_writable($emplacement)) {
trigger_error("Le dossier de stockage du cache n'est pas accessible en écriture", E_USER_WARNING);
}
$emplacement = rtrim(realpath($emplacement), '\\/').DS;
$this->options['stockage_chemin'] = $emplacement;
}
 
/**
* Test if a cache is available for the given id and (if yes) return it (false else)
*
* @param string $id cache id
* @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested
* @return string|false cached datas
*/
public function charger($id, $ne_pas_tester_validiter_du_cache = false) {
$donnees = false;
if ($this->tester($id, $ne_pas_tester_validiter_du_cache)) {
$metadonnees = $this->getMetadonneesFichier($id);
$fichier = $this->getFichierNom($id);
$donnees = $this->getContenuFichier($fichier);
if ($this->options['controle_lecture']) {
$cle_secu_donnees = $this->genererCleSecu($donnees, $this->options['controle_lecture_type']);
$cle_secu_controle = $metadonnees['hash'];
if ($cle_secu_donnees != $cle_secu_controle) {
// Probléme détecté par le contrôle de lecture !
// TODO : loguer le pb de sécu
$this->supprimer($id);
$donnees = false;
}
}
}
return $donnees;
}
 
/**
* Teste si un enregistrement en cache est disponible ou pas (pour l'id passé en paramètre).
*
* @param string $id identifiant de cache.
* @return mixed false (le cache n'est pas disponible) ou timestamp (int) "de dernière modification" de l'enregistrement en cache
*/
public function tester($id) {
clearstatcache();
return $this->testerExistenceCache($id, false);
}
 
/**
* Save some string datas into a cache record
*
* Note : $data is always "string" (serialization is done by the
* core not by the backend)
*
* @param string $data Datas to cache
* @param string $id Cache id
* @param array $tags Array of strings, the cache record will be tagged by each string entry
* @param int $specificLifetime If != false, set a specific lifetime for this cache record (null => infinite lifetime)
* @return boolean true if no problem
*/
public function sauver($donnees, $id, $tags = array(), $duree_vie_specifique = false) {
clearstatcache();
$fichier = $this->getFichierNom($id);
$chemin = $this->getChemin($id);
$resultat = true;
if ($this->options['dossier_niveau'] > 0) {
if (!is_writable($chemin)) {
// maybe, we just have to build the directory structure
$this->lancerMkdirEtChmodRecursif($id);
}
if (!is_writable($chemin)) {
$resultat = false;
}
}
if ($resultat === true) {
if ($this->options['controle_lecture']) {
$cle_secu = $this->genererCleSecu($donnees, $this->options['controle_lecture_type']);
} else {
$cle_secu = '';
}
$metadonnees = array(
'hash' => $cle_secu,
'mtime' => time(),
'expiration' => $this->Cache->getTimestampExpiration($duree_vie_specifique),
'tags' => $tags
);
 
if (! $resultat = $this->setMetadonnees($id, $metadonnees)) {
// TODO : ajouter un log
} else {
$resultat = $this->setContenuFichier($fichier, $donnees);
}
}
return $resultat;
}
 
/**
* Remove a cache record
*
* @param string $id cache id
* @return boolean true if no problem
*/
public function supprimer($id) {
$fichier = $this->getFichierNom($id);
$suppression_fichier = $this->supprimerFichier($fichier);
$suppression_metadonnees = $this->supprimerMetadonnees($id);
return $suppression_metadonnees && $suppression_fichier;
}
 
/**
* Clean some cache records
*
* Available modes are :
* 'all' (default) => remove all cache entries ($tags is not used)
* 'old' => remove too old cache entries ($tags is not used)
* 'matchingTag' => remove cache entries matching all given tags
* ($tags can be an array of strings or a single string)
* 'notMatchingTag' => remove cache entries not matching one of the given tags
* ($tags can be an array of strings or a single string)
* 'matchingAnyTag' => remove cache entries matching any given tags
* ($tags can be an array of strings or a single string)
*
* @param string $mode clean mode
* @param tags array $tags array of tags
* @return boolean true if no problem
*/
public function nettoyer($mode = Cache::NETTOYAGE_MODE_TOUS, $tags = array()) {
// We use this protected method to hide the recursive stuff
clearstatcache();
return $this->nettoyerFichiers($this->options['stockage_chemin'], $mode, $tags);
}
 
/**
* Return an array of stored cache ids
*
* @return array array of stored cache ids (string)
*/
public function getIds() {
return $this->analyserCache($this->options['stockage_chemin'], 'ids', array());
}
 
/**
* Return an array of stored tags
*
* @return array array of stored tags (string)
*/
public function getTags() {
return $this->analyserCache($this->options['stockage_chemin'], 'tags', array());
}
 
/**
* Return an array of stored cache ids which match given tags
*
* In case of multiple tags, a logical AND is made between tags
*
* @param array $tags array of tags
* @return array array of matching cache ids (string)
*/
public function getIdsAvecLesTags($tags = array()) {
return $this->analyserCache($this->options['stockage_chemin'], 'matching', $tags);
}
 
/**
* Return an array of stored cache ids which don't match given tags
*
* In case of multiple tags, a logical OR is made between tags
*
* @param array $tags array of tags
* @return array array of not matching cache ids (string)
*/
public function getIdsSansLesTags($tags = array()) {
return $this->analyserCache($this->options['stockage_chemin'], 'notMatching', $tags);
}
 
/**
* Return an array of stored cache ids which match any given tags
*
* In case of multiple tags, a logical AND is made between tags
*
* @param array $tags array of tags
* @return array array of any matching cache ids (string)
*/
public function getIdsAvecUnTag($tags = array()) {
return $this->analyserCache($this->options['stockage_chemin'], 'matchingAny', $tags);
}
 
/**
* Return the filling percentage of the backend storage
*
* @throws Zend_Cache_Exception
* @return int integer between 0 and 100
*/
public function getPourcentageRemplissage() {
$libre = disk_free_space($this->options['stockage_chemin']);
$total = disk_total_space($this->options['stockage_chemin']);
$pourcentage = 0;
if ($total == 0) {
trigger_error("Impossible d'utiliser la fonction disk_total_space", E_USER_WARNING);
} else {
$pourcentage = ($libre >= $total) ? 100 : ((int) (100. * ($total - $libre) / $total));
}
return $pourcentage;
}
 
/**
* Return an array of metadatas for the given cache id
*
* The array must include these keys :
* - expire : the expire timestamp
* - tags : a string array of tags
* - mtime : timestamp of last modification time
*
* @param string $id cache id
* @return array array of metadatas (false if the cache id is not found)
*/
public function getMetadonnees($id) {
if ($metadonnees = $this->getMetadonneesFichier($id)) {
if (time() > $metadonnees['expiration']) {
$metadonnees = false;
} else {
$metadonnees = array(
'expiration' => $metadonnees['expiration'],
'tags' => $metadonnees['tags'],
'mtime' => $metadonnees['mtime']
);
}
}
return $metadonnees;
}
 
/**
* Give (if possible) an extra lifetime to the given cache id
*
* @param string $id cache id
* @param int $extraLifetime
* @return boolean true if ok
*/
public function ajouterSupplementDureeDeVie($id, $supplement_duree_de_vie) {
$augmentation = true;
if ($metadonnees = $this->getMetadonneesFichier($id)) {
if (time() > $metadonnees['expiration']) {
$augmentation = false;
} else {
$metadonnees_nouvelle = array(
'hash' => $metadonnees['hash'],
'mtime' => time(),
'expiration' => $metadonnees['expiration'] + $supplement_duree_de_vie,
'tags' => $metadonnees['tags']
);
$augmentation = $this->setMetadonnees($id, $metadonnees_nouvelle);
}
}
return $augmentation;
}
 
/**
* Get a metadatas record
*
* @param string $id Cache id
* @return array|false Associative array of metadatas
*/
protected function getMetadonneesFichier($id) {
$metadonnees = false;
if (isset($this->metadonnees[$id])) {
$metadonnees = $this->metadonnees[$id];
} else {
if ($metadonnees = $this->chargerMetadonnees($id)) {
$this->setMetadonnees($id, $metadonnees, false);
}
}
return $metadonnees;
}
 
/**
* Set a metadatas record
*
* @param string $id Cache id
* @param array $metadatas Associative array of metadatas
* @param boolean $save optional pass false to disable saving to file
* @return boolean True if no problem
*/
protected function setMetadonnees($id, $metadonnees, $sauvegarde = true) {
if (count($this->metadonnees) >= $this->options['metadonnees_max_taille']) {
$n = (int) ($this->options['metadonnees_max_taille'] / 10);
$this->metadonnees = array_slice($this->metadonnees, $n);
}
$resultat = true;
if ($sauvegarde) {
$resultat = $this->sauverMetadonnees($id, $metadonnees);
}
if ($resultat == true) {
$this->metadonnees[$id] = $metadonnees;
}
return $resultat;
}
 
/**
* Drop a metadata record
*
* @param string $id Cache id
* @return boolean True if no problem
*/
protected function supprimerMetadonnees($id) {
if (isset($this->metadonnees[$id])) {
unset($this->metadonnees[$id]);
}
$fichier_meta = $this->getNomFichierMeta($id);
return $this->supprimerFichier($fichier_meta);
}
 
/**
* Clear the metadatas array
*
* @return void
*/
protected function nettoyerMetadonnees() {
$this->metadonnees = array();
}
 
/**
* Load metadatas from disk
*
* @param string $id Cache id
* @return array|false Metadatas associative array
*/
protected function chargerMetadonnees($id) {
$fichier = $this->getNomFichierMeta($id);
if ($resultat = $this->getContenuFichier($fichier)) {
$resultat = @unserialize($resultat);
}
return $resultat;
}
 
/**
* Save metadatas to disk
*
* @param string $id Cache id
* @param array $metadatas Associative array
* @return boolean True if no problem
*/
protected function sauverMetadonnees($id, $metadonnees) {
$fichier = $this->getNomFichierMeta($id);
$resultat = $this->setContenuFichier($fichier, serialize($metadonnees));
return $resultat;
}
 
/**
* Make and return a file name (with path) for metadatas
*
* @param string $id Cache id
* @return string Metadatas file name (with path)
*/
protected function getNomFichierMeta($id) {
$chemin = $this->getChemin($id);
$fichier_nom = $this->transformaterIdEnNomFichier('interne-meta---'.$id);
return $chemin.$fichier_nom;
}
 
/**
* Check if the given filename is a metadatas one
*
* @param string $fileName File name
* @return boolean True if it's a metadatas one
*/
protected function etreFichierMeta($fichier_nom) {
$id = $this->transformerNomFichierEnId($fichier_nom);
return (substr($id, 0, 21) == 'interne-meta---') ? true : false;
}
 
/**
* Remove a file
*
* If we can't remove the file (because of locks or any problem), we will touch
* the file to invalidate it
*
* @param string $file Complete file path
* @return boolean True if ok
*/
protected function supprimerFichier($fichier) {
$resultat = false;
if (is_file($fichier)) {
if ($resultat = @unlink($fichier)) {
// TODO : ajouter un log
}
}
return $resultat;
}
 
/**
* Clean some cache records (protected method used for recursive stuff)
*
* Available modes are :
* Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used)
* Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used)
* Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags
* ($tags can be an array of strings or a single string)
* Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags}
* ($tags can be an array of strings or a single string)
* Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => remove cache entries matching any given tags
* ($tags can be an array of strings or a single string)
*
* @param string $dir Directory to clean
* @param string $mode Clean mode
* @param array $tags Array of tags
* @throws Zend_Cache_Exception
* @return boolean True if no problem
*/
protected function nettoyerFichiers($dossier, $mode = Cache::NETTOYAGE_MODE_TOUS, $tags = array()) {
if (!is_dir($dossier)) {
return false;
}
$resultat = true;
$prefixe = $this->options['fichier_prefixe'];
$glob = @glob($dossier.$prefixe.'--*');
if ($glob === false) {
// On some systems it is impossible to distinguish between empty match and an error.
return true;
}
foreach ($glob as $fichier) {
if (is_file($fichier)) {
$fichier_nom = basename($fichier);
if ($this->etreFichierMeta($fichier_nom)) {
// Pour le mode Cache::NETTOYAGE_MODE_TOUS, nous essayons de tous supprimer même les vieux fichiers méta
if ($mode != Cache::NETTOYAGE_MODE_TOUS) {
continue;
}
}
$id = $this->transformerNomFichierEnId($fichier_nom);
$metadonnees = $this->getMetadonneesFichier($id);
if ($metadonnees === FALSE) {
$metadonnees = array('expiration' => 1, 'tags' => array());
}
switch ($mode) {
case Cache::NETTOYAGE_MODE_TOUS :
if ($resultat_suppression = $this->supprimer($id)) {
// Dans ce cas seulement, nous acception qu'il y ait un problème avec la suppresssion du fichier meta
$resultat_suppression = $this->supprimerFichier($fichier);
}
$resultat = $resultat && $resultat_suppression;
break;
case Cache::NETTOYAGE_MODE_EXPIRATION :
if (time() > $metadonnees['expiration']) {
$resultat = $this->supprimer($id) && $resultat;
}
break;
case Cache::NETTOYAGE_MODE_AVEC_LES_TAGS :
$correspondance = true;
foreach ($tags as $tag) {
if (!in_array($tag, $metadonnees['tags'])) {
$correspondance = false;
break;
}
}
if ($correspondance) {
$resultat = $this->supprimer($id) && $resultat;
}
break;
case Cache::NETTOYAGE_MODE_SANS_LES_TAGS :
$correspondance = false;
foreach ($tags as $tag) {
if (in_array($tag, $metadonnees['tags'])) {
$correspondance = true;
break;
}
}
if (!$correspondance) {
$resultat = $this->supprimer($id) && $resultat;
}
break;
case Cache::NETTOYAGE_MODE_AVEC_UN_TAG :
$correspondance = false;
foreach ($tags as $tag) {
if (in_array($tag, $metadonnees['tags'])) {
$correspondance = true;
break;
}
}
if ($correspondance) {
$resultat = $this->supprimer($id) && $resultat;
}
break;
default:
trigger_error("Mode de nettoyage invalide pour la méthode nettoyer()", E_USER_WARNING);
break;
}
}
if ((is_dir($fichier)) and ($this->options['dossier_niveau'] > 0)) {
// Appel récursif
$resultat = $this->nettoyerFichiers($fichier.DS, $mode, $tags) && $resultat;
if ($mode == Cache::NETTOYAGE_MODE_TOUS) {
// Si mode == Cache::NETTOYAGE_MODE_TOUS, nous essayons de supprimer la structure aussi
@rmdir($fichier);
}
}
}
return $resultat;
}
 
protected function analyserCache($dossier, $mode, $tags = array()) {
if (!is_dir($dossier)) {
return false;
}
$resultat = array();
$prefixe = $this->options['fichier_prefixe'];
$glob = @glob($dossier.$prefixe.'--*');
if ($glob === false) {
// On some systems it is impossible to distinguish between empty match and an error.
return array();
}
foreach ($glob as $fichier) {
if (is_file($fichier)) {
$nom_fichier = basename($fichier);
$id = $this->transformerNomFichierEnId($nom_fichier);
$metadonnees = $this->getMetadonneesFichier($id);
if ($metadonnees === FALSE) {
continue;
}
if (time() > $metadonnees['expiration']) {
continue;
}
switch ($mode) {
case 'ids':
$resultat[] = $id;
break;
case 'tags':
$resultat = array_unique(array_merge($resultat, $metadonnees['tags']));
break;
case 'matching':
$correspondance = true;
foreach ($tags as $tag) {
if (!in_array($tag, $metadonnees['tags'])) {
$correspondance = false;
break;
}
}
if ($correspondance) {
$resultat[] = $id;
}
break;
case 'notMatching':
$correspondance = false;
foreach ($tags as $tag) {
if (in_array($tag, $metadonnees['tags'])) {
$correspondance = true;
break;
}
}
if (!$correspondance) {
$resultat[] = $id;
}
break;
case 'matchingAny':
$correspondance = false;
foreach ($tags as $tag) {
if (in_array($tag, $metadonnees['tags'])) {
$correspondance = true;
break;
}
}
if ($correspondance) {
$resultat[] = $id;
}
break;
default:
trigger_error("Mode invalide pour la méthode analyserCache()", E_USER_WARNING);
break;
}
}
if ((is_dir($fichier)) and ($this->options['dossier_niveau'] > 0)) {
// Appel récursif
$resultat_analyse_recursive = $this->analyserCache($fichier.DS, $mode, $tags);
if ($resultat_analyse_recursive === false) {
// TODO : ajoute un log
} else {
$resultat = array_unique(array_merge($resultat, $resultat_analyse_recursive));
}
}
}
return array_unique($resultat);
}
 
/**
* Make a control key with the string containing datas
*
* @param string $data Data
* @param string $controlType Type of control 'md5', 'crc32' or 'strlen'
* @throws Zend_Cache_Exception
* @return string Control key
*/
protected function genererCleSecu($donnees, $type_de_controle) {
switch ($type_de_controle) {
case 'md5':
return md5($donnees);
case 'crc32':
return crc32($donnees);
case 'strlen':
return strlen($donnees);
case 'adler32':
return hash('adler32', $donnees);
default:
trigger_error("Fonction de génération de clé de sécurité introuvable : $type_de_controle", E_USER_WARNING);
}
}
 
/**
* Transform a cache id into a file name and return it
*
* @param string $id Cache id
* @return string File name
*/
protected function transformaterIdEnNomFichier($id) {
$prefixe = $this->options['fichier_prefixe'];
$resultat = $prefixe.'---'.$id;
return $resultat;
}
 
/**
* Make and return a file name (with path)
*
* @param string $id Cache id
* @return string File name (with path)
*/
protected function getFichierNom($id) {
$path = $this->getChemin($id);
$fileName = $this->transformaterIdEnNomFichier($id);
return $path . $fileName;
}
 
/**
* Return the complete directory path of a filename (including hashedDirectoryStructure)
*
* @param string $id Cache id
* @param boolean $decoupage if true, returns array of directory parts instead of single string
* @return string Complete directory path
*/
protected function getChemin($id, $decoupage = false) {
$morceaux = array();
$chemin = $this->options['stockage_chemin'];
$prefixe = $this->options['fichier_prefixe'];
if ($this->options['dossier_niveau'] > 0) {
$hash = hash('adler32', $id);
for ($i = 0 ; $i < $this->options['dossier_niveau'] ; $i++) {
$chemin .= $prefixe.'--'.substr($hash, 0, $i + 1).DS;
$morceaux[] = $chemin;
}
}
return ($decoupage) ? $morceaux : $chemin;
}
 
/**
* Make the directory strucuture for the given id
*
* @param string $id cache id
* @return boolean true
*/
protected function lancerMkdirEtChmodRecursif($id) {
$resultat = true;
if ($this->options['dossier_niveau'] > 0) {
$chemins = $this->getChemin($id, true);
foreach ($chemins as $chemin) {
if (!is_dir($chemin)) {
@mkdir($chemin, $this->options['dossier_umask']);
@chmod($chemin, $this->options['dossier_umask']); // see #ZF-320 (this line is required in some configurations)
}
}
}
return $resultat;
}
 
/**
* Test if the given cache id is available (and still valid as a cache record)
*
* @param string $id Cache id
* @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested
* @return boolean|mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record
*/
protected function testerExistenceCache($id, $ne_pas_tester_validiter_du_cache) {
$resultat = false;
if ($metadonnees = $this->getMetadonnees($id)) {
if ($ne_pas_tester_validiter_du_cache || (time() <= $metadonnees['expiration'])) {
$resultat = $metadonnees['mtime'];
}
}
return $resultat;
}
 
/**
* Return the file content of the given file
*
* @param string $file File complete path
* @return string File content (or false if problem)
*/
protected function getContenuFichier($fichier) {
$resultat = false;
if (is_file($fichier)) {
$f = @fopen($fichier, 'rb');
if ($f) {
if ($this->options['fichier_verrou']) @flock($f, LOCK_SH);
$resultat = stream_get_contents($f);
if ($this->options['fichier_verrou']) @flock($f, LOCK_UN);
@fclose($f);
}
}
return $resultat;
}
 
/**
* Put the given string into the given file
*
* @param string $file File complete path
* @param string $string String to put in file
* @return boolean true if no problem
*/
protected function setContenuFichier($fichier, $chaine) {
$resultat = false;
$f = @fopen($fichier, 'ab+');
if ($f) {
if ($this->options['fichier_verrou']) @flock($f, LOCK_EX);
fseek($f, 0);
ftruncate($f, 0);
$tmp = @fwrite($f, $chaine);
if (!($tmp === FALSE)) {
$resultat = true;
}
@fclose($f);
}
@chmod($fichier, $this->options['fichier_umask']);
return $resultat;
}
 
/**
* Transform a file name into cache id and return it
*
* @param string $fileName File name
* @return string Cache id
*/
protected function transformerNomFichierEnId($nom_de_fichier) {
$prefixe = $this->options['fichier_prefixe'];
return preg_replace('~^' . $prefixe . '---(.*)$~', '$1', $nom_de_fichier);
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/files/utilitaires.Pattern.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1167577130"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1167577130" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small>utilitaires</small>Pattern.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Pattern.html">Pattern</a></td>
<td><em>Classe fournissant des constantes correspondant à des expressions régulières de vérification très courrantes.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/utilitaires/Pattern.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/utilitaires.Tableau.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-171522627"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-171522627" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small>utilitaires</small>Tableau.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Tableau.html">Tableau</a></td>
<td><em>Classe fournissant des méthodes statiques de manipulation des tableaux (Array).</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/utilitaires/Tableau.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/RestClient.php.html
New file
0,0 → 1,278
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1042606038"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1042606038" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
 
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small></small>RestClient.php</h1>
<p><em></em></p>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/RestClient.html">RestClient</a></td>
<td><em>Classe client permettant d&#039;interroger des services web REST.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
 
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/RestClient.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/files/Url.php.txt
New file
0,0 → 1,426
<?php
// declare(encoding='UTF-8');
/**
* Classe Url, gérant le découpage des paramètres, leurs modification etc...
* Traduction et conversion d'une classe (NET_Url2) issue de Pear
*
* @category Php 5.2
* @package Framework
* @author Christian SCHMIDT <schmidt@php.net> (Auteur classe originale)
* @author Aurélien PERONNET <aurelien@tela-botanica.org>
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
* @version SVN: $Id: Url.php 404 2012-02-22 15:44:24Z gduche $
* @link /doc/framework/
*/
class Url {
 
/**
* Répresenter les tableaux dans les requêtes en utilisant la notation php []. Par défaut à true.
*/
const OPTION_UTILISER_CROCHETS = 'utiliser_crochets';
 
/**
* URL-encoder les clés des variables dans les requêtes. Par défaut à true.
*/
const OPTION_ENCODER_CLES = 'encoder_cles';
/**
* URL-encoder les valeurs des variables dans les requêtes. Par défaut à false.
*/
const OPTION_ENCODER_VALEURS = 'encoder_valeurs';
 
/**
* Séparateurs de variables lors du parsing de la requête. Chaque caractère
* est considéré comme un séparateur. Par défaut, spécifié par le paramêtre
* arg_separator.input dans php.ini (par défaut "&").
*/
const OPTION_SEPARATEUR_ENTREE = 'separateur_entree';
 
/**
* Séparateur de variables lors de la génération de la requête. Par défaut, spécifié
* par le paramètre arg_separator.output dans php.ini (par défaut "&").
*/
const OPTION_SEPARATEUR_SORTIE = 'separateur_sortie';
 
/**
* Options par défaut correspondant au comportement de php
* vis à vis de $_GET
*/
private $options = array(
self::OPTION_UTILISER_CROCHETS => true,
self::OPTION_ENCODER_CLES => true,
self::OPTION_ENCODER_VALEURS => false,
self::OPTION_SEPARATEUR_ENTREE => '&',
self::OPTION_SEPARATEUR_SORTIE => '&');
 
/**
* @var string|bool
*/
private $schema = false;
 
/**
* @var string|bool
*/
private $infoUtilisateur = false;
 
/**
* @var string|bool
*/
private $hote = false;
 
/**
* @var int|bool
*/
private $port = false;
 
/**
* @var string
*/
private $chemin = '';
 
/**
* @var string|bool
*/
private $requete = false;
 
/**
* @var string|bool
*/
private $fragment = false;
 
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
private $parametres_obligatoires = array('url_arg_separateur_entree', 'url_arg_separateur_sortie');
/**
* @param string $url une URL relative ou absolue
* @param array $options
*/
public function __construct($url, $options = null) {
Config::verifierPresenceParametres($this->parametres_obligatoires);
$this->setOption(self::OPTION_SEPARATEUR_ENTREE, Config::get('url_arg_separateur_entree'));
$this->setOption(self::OPTION_SEPARATEUR_SORTIE, Config::get('url_arg_separateur_sortie'));
if (is_array($options)) {
foreach ($options as $nomOption => $valeur) {
$this->setOption($nomOption);
}
}
 
if (preg_match('@^([a-z][a-z0-9.+-]*):@i', $url, $reg)) {
$this->schema = $reg[1];
$url = substr($url, strlen($reg[0]));
}
 
if (preg_match('@^//([^/#?]+)@', $url, $reg)) {
$this->setAutorite($reg[1]);
$url = substr($url, strlen($reg[0]));
}
 
$i = strcspn($url, '?#');
$this->chemin = substr($url, 0, $i);
$url = substr($url, $i);
 
if (preg_match('@^\?([^#]*)@', $url, $reg)) {
$this->requete = $reg[1];
$url = substr($url, strlen($reg[0]));
}
 
if ($url) {
$this->fragment = substr($url, 1);
}
}
/**
* Renvoie la valeur de l'option specifiée.
*
* @param string $nomOption Nom de l'option demandée
*
* @return mixed
*/
public function getOption($nomOption) {
return isset($this->options[$nomOption]) ? $this->options[$nomOption] : false;
}
 
/**
* Met à jour la valeur de l'option spécifiée.
*
* @param string $nomOption une des constantes commençant par self::OPTION_
* @param mixed $valeur valeur de l'option
*
* @return void
* @see self::OPTION_STRICTE
* @see self::OPTION_UTILISER_CROCHETS
* @see self::OPTION_ENCODER_CLES
*/
public function setOption($nomOption, $valeur) {
if (!array_key_exists($nomOption, $this->options)) {
return false;
}
$this->options[$nomOption] = $valeur;
}
 
/**
* Renvoie la partie autorité, i.e. [ infoUtilisateur "@" ] hote [ ":" port ], ou
* false si celle-ci est absente.
*
* @return string|bool
*/
private function getAutorite() {
if (!$this->hote) {
return false;
}
 
$autorite = '';
 
if ($this->infoUtilisateur !== false) {
$autorite .= $this->infoUtilisateur . '@';
}
 
$autorite .= $this->hote;
 
if ($this->port !== false) {
$autorite .= ':' . $this->port;
}
 
return $autorite;
}
 
/**
* @param string|false $autorite
*
* @return void
*/
private function setAutorite($autorite) {
$this->user = false;
$this->pass = false;
$this->hote = false;
$this->port = false;
if (preg_match('@^(([^\@]+)\@)?([^:]+)(:(\d*))?$@', $autorite, $reg)) {
if ($reg[1]) {
$this->infoUtilisateur = $reg[2];
}
 
$this->hote = $reg[3];
if (isset($reg[5])) {
$this->port = intval($reg[5]);
}
}
}
 
/**
* Renvoie vrai ou faux suivant que l'instance en cours représente une URL relative ou absolue.
*
* @return bool
*/
private function etreAbsolue() {
return (bool) $this->schema;
}
/**
* La suppression des segments à points est décrite dans la RFC 3986, section 5.2.4, e.g.
* "/foo/../bar/baz" => "/bar/baz"
*
* @param string $chemin un chemin
*
* @return string un chemin
*/
private static function supprimerSegmentsAPoints($chemin) {
$sortie = '';
 
// Assurons nous de ne pas nous retrouver piégés dans une boucle infinie due à un bug de cette méthode
$j = 0;
while ($chemin && $j++ < 100) {
if (substr($chemin, 0, 2) == './') {// Étape A
$chemin = substr($chemin, 2);
} else if (substr($chemin, 0, 3) == '../') {
$chemin = substr($chemin, 3);
} else if (substr($chemin, 0, 3) == '/./' || $chemin == '/.') {// Étape B
$chemin = '/' . substr($chemin, 3);
} else if (substr($chemin, 0, 4) == '/../' || $chemin == '/..') {// Étape C
$chemin = '/' . substr($chemin, 4);
$i = strrpos($sortie, '/');
$sortie = $i === false ? '' : substr($sortie, 0, $i);
} else if ($chemin == '.' || $chemin == '..') {// Étape D
$chemin = '';
} else {// Étape E
$i = strpos($chemin, '/');
if ($i === 0) {
$i = strpos($chemin, '/', 1);
}
if ($i === false) {
$i = strlen($chemin);
}
$sortie .= substr($chemin, 0, $i);
$chemin = substr($chemin, $i);
}
}
 
return $sortie;
}
/**
* (Re-)Création de la partie requête de l'URL à partir des données du tableau (passé en paramètre).
*
* @param array (nom => valeur) tableau de clés & valeurs pour la partie requête de l'url.
* @return void (Re-)Création de la partie requête.
*/
public function setRequete(Array $parametres) {
if (!$parametres) {
$this->requete = false;
} else {
foreach ($parametres as $nom => $valeur) {
if ($this->getOption(self::OPTION_ENCODER_CLES)) {
$nom = rawurlencode($nom);
}
if ($this->getOption(self::OPTION_ENCODER_VALEURS)) {
$valeur = rawurlencode($valeur);
}
 
if (is_array($valeur)) {
foreach ($valeur as $k => $v) {
if ($this->getOption(self::OPTION_UTILISER_CROCHETS)) {
$parties[] = sprintf('%s[%s]=%s', $nom, $k, $v);
} else {
$parties[] = $nom.'='.$v;
}
}
} else if (!is_null($valeur)) {
$parties[] = $nom . '=' . $valeur;
} else {
$parties[] = $nom;
}
}
$this->requete = implode($this->getOption(self::OPTION_SEPARATEUR_SORTIE), $parties);
}
}
/**
* (Re-)Création de la partie requête de l'URL à partir de la fusion du tableau (passé en paramètre) et
* les valeurs présentes dans $_GET.
*
* @param array (nom => valeur) tableau de clés & valeurs pour la partie requête de l'url.
* @return void (Re-)Création de la partie requête.
*/
public function fusionnerRequete(Array $parametres) {
if ($parametres) {
$requete = $parametres + $_GET;
$this->setRequete($requete);
}
}
 
/**
* Normalise les données de l'instance d'Url faisant appel à cette méthode.
*
* @return void l'instance d'Url courrante est normalisée.
*/
public function normaliser() {
// Voir RFC 3886, section 6
 
// les cchémas sont insesibles à la casse
if ($this->schema) {
$this->schema = strtolower($this->schema);
}
 
// les noms d'hotes sont insensibles à la casse
if ($this->hote) {
$this->hote = strtolower($this->hote);
}
 
// Supprimer le numéro de port par défaut pour les schemas connus (RFC 3986, section 6.2.3)
if ($this->port && $this->schema && $this->port == getservbyname($this->schema, 'tcp')) {
$this->port = false;
}
 
// normalisation dans le cas d'un encodage avec %XX pourcentage (RFC 3986, section 6.2.2.1)
foreach (array('infoUtilisateur', 'hote', 'chemin') as $partie) {
if ($this->$partie) {
$this->$partie = preg_replace('/%[0-9a-f]{2}/ie', 'strtoupper("\0")', $this->$partie);
}
}
 
// normalisation des segments du chemin (RFC 3986, section 6.2.2.3)
$this->chemin = self::supprimerSegmentsAPoints($this->chemin);
 
// normalisation basée sur le schéma (RFC 3986, section 6.2.3)
if ($this->hote && !$this->chemin) {
$this->chemin = '/';
}
}
 
/**
* Renvoie une instance d'objet Url representant l'URL canonique du script PHP en cours d'éxécution.
*
* @return Url retourne un objet Url ou null en cas d'erreur.
*/
public static function getCanonique() {
$url = null;
if (!isset($_SERVER['REQUEST_METHOD'])) {
trigger_error("Le script n'a pas été appellé à travers un serveur web", E_USER_WARNING);
} else {
// À partir d'une URL relative
$url = new self($_SERVER['PHP_SELF']);
$url->schema = isset($_SERVER['HTTPS']) ? 'https' : 'http';
$url->hote = $_SERVER['SERVER_NAME'];
$port = intval($_SERVER['SERVER_PORT']);
if ($url->schema == 'http' && $port != 80 || $url->schema == 'https' && $port != 443) {
$url->port = $port;
}
}
return $url;
}
 
/**
* Renvoie une instance d'objet Url representant l'URL utilisée pour récupérer la requête en cours.
*
* @return Url retourne un objet Url ou null en cas d'erreur.
*/
public static function getDemande() {
$url = null;
if (!isset($_SERVER['REQUEST_METHOD'])) {
trigger_error("Le script n'a pas été appellé à travers un serveur web", E_USER_WARNING);
} else {
// On part d'une URL relative
$url = new self($_SERVER['REQUEST_URI']);
$url->schema = isset($_SERVER['HTTPS']) ? 'https' : 'http';
// On met à jour les valeurs de l'hôte et si possible du port
$url->setAutorite($_SERVER['HTTP_hote']);
}
return $url;
}
 
/**
* Renvoie un représentation sous forme de chaine de l'URL.
*
* @return string l'url
*/
public function getURL() {
// Voir RFC 3986, section 5.3
$url = '';
if ($this->schema !== false) {
$url .= $this->schema . ':';
}
 
$autorite = $this->getAutorite();
if ($autorite !== false) {
$url .= '//' . $autorite;
}
$url .= $this->chemin;
 
if ($this->requete !== false) {
$url .= '?' . $this->requete;
}
 
if ($this->fragment !== false) {
$url .= '#' . $this->fragment;
}
 
return $url;
}
}
?>
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-52/phpdoc-cache-file_95ac810071946135cd004f6a2d287311.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-52/phpdoc-cache-file_95ac810071946135cd004f6a2d287311.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-70/phpdoc-cache-file_07f09baff0792f103b49c0c9b5a16fd1.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-70/phpdoc-cache-file_07f09baff0792f103b49c0c9b5a16fd1.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-19/phpdoc-cache-file_72e0fa05dee7578b9d5d12fdfd89e7f3.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-19/phpdoc-cache-file_72e0fa05dee7578b9d5d12fdfd89e7f3.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/icon-interface-13x13.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/icon-interface-13x13.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/icon-trait.svg
New file
0,0 → 1,73
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
 
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="220"
height="220"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(7.0217361,8.0694962)"
id="layer1">
<path
d="M 60,10 C 32.3,10 10,32.3 10,60 l 0,100 c 0,27.7 22.3,50 50,50 l 100,0 c 27.7,0 50,-22.3 50,-50 L 210,60 C 210,32.3 187.7,10 160,10 L 60,10 z m 8.90625,17.78125 82.1875,0 c 22.7744,0 41.125,18.350601 41.125,41.125 l 0,82.1875 c 0,22.7744 -18.3506,41.125 -41.125,41.125 l -82.1875,0 c -22.774399,0 -41.125,-18.3506 -41.125,-41.125 l 0,-82.1875 c 0,-22.774399 18.350601,-41.125 41.125,-41.125 z"
transform="translate(-7.0217361,-8.0694962)"
id="rect4991"
style="fill:#333333;fill-opacity:1;stroke:none" />
</g>
<g
id="layer2"
style="display:none">
<g
id="text3761"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">
<path
d="m 119.775,168.98893 c -8.84006,0 -16.77338,-1.36 -23.8,-4.08 -7.026702,-2.71999 -12.976696,-6.68665 -17.85,-11.9 -4.873353,-5.32664 -8.613349,-11.78664 -11.22,-19.38 -2.606677,-7.59329 -3.910009,-16.31995 -3.91,-26.18 -9e-6,-9.859927 1.473322,-18.586585 4.42,-26.179996 3.059983,-7.59324 7.196646,-13.996567 12.41,-19.21 5.213302,-5.326557 11.333296,-9.349886 18.36,-12.07 7.02662,-2.719881 14.56327,-4.079879 22.61,-4.08 4.87326,1.21e-4 9.29326,0.396787 13.26,1.19 3.96658,0.680119 7.42325,1.473452 10.37,2.38 2.94657,0.906783 5.38324,1.870115 7.31,2.89 1.92657,1.020113 3.28657,1.756779 4.08,2.21 l -6.29,17.51 c -2.72009,-1.699904 -6.63009,-3.286569 -11.73,-4.76 -4.98675,-1.586566 -10.42674,-2.379898 -16.32,-2.38 -5.10006,1.02e-4 -9.86006,0.906768 -14.28,2.72 -4.42005,1.700097 -8.273379,4.306761 -11.56,7.82 -3.173372,3.513421 -5.666703,7.933417 -7.48,13.26 -1.813366,5.326739 -2.720032,11.503396 -2.72,18.529996 -3.2e-5,6.23339 0.679967,11.95672 2.04,17.17 1.473298,5.21337 3.683296,9.7467 6.63,13.6 2.946623,3.74003 6.68662,6.68669 11.22,8.84 4.53328,2.04002 9.97327,3.06002 16.32,3.06 7.59326,2e-5 13.76992,-0.73665 18.53,-2.21 4.75991,-1.58664 8.44324,-3.05997 11.05,-4.42 l 5.78,17.51 c -1.3601,0.90668 -3.2301,1.81334 -5.61,2.72 -2.26676,0.90667 -4.98676,1.81334 -8.16,2.72 -3.17342,0.79334 -6.74342,1.41667 -10.71,1.87 -3.96674,0.56667 -8.21674,0.85 -12.75,0.85"
id="path5013"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium" />
</g>
</g>
<g
id="layer3"
style="display:none">
<g
id="text3761-9"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">
<path
d="m 99.289993,48.628934 21.419997,0 0,117.809996 -21.419997,0 0,-117.809996"
id="path5086"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium" />
</g>
</g>
<g
id="layer4"
style="display:inline">
<g
id="text3761-7"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">
<path
d="m 154.67148,48.628934 0,18.53 -36.21,0 0,99.279996 -21.589995,0 0,-99.279996 -36.21,0 0,-18.53 94.009995,0"
id="path5089"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium" />
</g>
</g>
</svg>
/branches/v0.3-aleaume/doc/PhpDoc/images/icon-class.svg
New file
0,0 → 1,77
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
 
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="220"
height="220"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(7.0217361,8.0694962)"
id="layer1">
<path
d="M 60,10 C 32.3,10 10,32.3 10,60 l 0,100 c 0,27.7 22.3,50 50,50 l 100,0 c 27.7,0 50,-22.3 50,-50 L 210,60 C 210,32.3 187.7,10 160,10 L 60,10 z m 8.90625,17.78125 82.1875,0 c 22.7744,0 41.125,18.350601 41.125,41.125 l 0,82.1875 c 0,22.7744 -18.3506,41.125 -41.125,41.125 l -82.1875,0 c -22.774399,0 -41.125,-18.3506 -41.125,-41.125 l 0,-82.1875 c 0,-22.774399 18.350601,-41.125 41.125,-41.125 z"
transform="translate(-7.0217361,-8.0694962)"
id="rect4991"
style="fill:#333333;fill-opacity:1;stroke:none" />
</g>
<g
id="layer2"
style="display:inline">
<g
id="text3761"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">
<path
d="m 119.775,168.98893 c -8.84006,0 -16.77338,-1.36 -23.8,-4.08 -7.026702,-2.71999 -12.976696,-6.68665 -17.85,-11.9 -4.873353,-5.32664 -8.613349,-11.78664 -11.22,-19.38 -2.606677,-7.59329 -3.910009,-16.31995 -3.91,-26.18 -9e-6,-9.859927 1.473322,-18.586585 4.42,-26.179996 3.059983,-7.59324 7.196646,-13.996567 12.41,-19.21 5.213302,-5.326557 11.333296,-9.349886 18.36,-12.07 7.02662,-2.719881 14.56327,-4.079879 22.61,-4.08 4.87326,1.21e-4 9.29326,0.396787 13.26,1.19 3.96658,0.680119 7.42325,1.473452 10.37,2.38 2.94657,0.906783 5.38324,1.870115 7.31,2.89 1.92657,1.020113 3.28657,1.756779 4.08,2.21 l -6.29,17.51 c -2.72009,-1.699904 -6.63009,-3.286569 -11.73,-4.76 -4.98675,-1.586566 -10.42674,-2.379898 -16.32,-2.38 -5.10006,1.02e-4 -9.86006,0.906768 -14.28,2.72 -4.42005,1.700097 -8.273379,4.306761 -11.56,7.82 -3.173372,3.513421 -5.666703,7.933417 -7.48,13.26 -1.813366,5.326739 -2.720032,11.503396 -2.72,18.529996 -3.2e-5,6.23339 0.679967,11.95672 2.04,17.17 1.473298,5.21337 3.683296,9.7467 6.63,13.6 2.946623,3.74003 6.68662,6.68669 11.22,8.84 4.53328,2.04002 9.97327,3.06002 16.32,3.06 7.59326,2e-5 13.76992,-0.73665 18.53,-2.21 4.75991,-1.58664 8.44324,-3.05997 11.05,-4.42 l 5.78,17.51 c -1.3601,0.90668 -3.2301,1.81334 -5.61,2.72 -2.26676,0.90667 -4.98676,1.81334 -8.16,2.72 -3.17342,0.79334 -6.74342,1.41667 -10.71,1.87 -3.96674,0.56667 -8.21674,0.85 -12.75,0.85"
id="path5013"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium" />
</g>
</g>
<g
id="layer3"
style="display:none">
<text
x="110.08234"
y="166.43893"
id="text3761-9"
xml:space="preserve"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"><tspan
x="110.08234"
y="166.43893"
id="tspan3763-5"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium">I</tspan></text>
</g>
<g
id="layer4"
style="display:none">
<text
x="107.59211"
y="166.43893"
id="text3761-7"
xml:space="preserve"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"><tspan
x="107.59211"
y="166.43893"
id="tspan3763-8"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium">T</tspan></text>
</g>
</svg>
/branches/v0.3-aleaume/doc/PhpDoc/images/icon-trait-13x13.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/icon-trait-13x13.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/apple-touch-icon.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/apple-touch-icon.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/hand.cur
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/hand.cur
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.zoom_fit.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.zoom_fit.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/grab.cur
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/grab.cur
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.rotate_left.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.rotate_left.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.zoom_in.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.zoom_in.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.rotate_right.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.rotate_right.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.zoom_out.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.zoom_out.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.zoom_zero.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/iviewer/iviewer.zoom_zero.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/apple-touch-icon-114x114.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/apple-touch-icon-114x114.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/icon-class-13x13.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/icon-class-13x13.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/hierarchy-item.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/hierarchy-item.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/favicon.ico
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/images/favicon.ico
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/apple-touch-icon-72x72.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/PhpDoc/images/apple-touch-icon-72x72.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/images/custom-icons.svg
New file
0,0 → 1,116
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
 
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="220"
height="220"
id="svg2"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="custom-icons.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="2.4181818"
inkscape:cx="60.37594"
inkscape:cy="110"
inkscape:document-units="px"
inkscape:current-layer="layer4"
showgrid="false"
inkscape:window-width="1366"
inkscape:window-height="718"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:showpageshadow="false"
fit-margin-top="10"
fit-margin-left="10"
fit-margin-right="10"
fit-margin-bottom="10" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Background"
inkscape:groupmode="layer"
id="layer1"
transform="translate(7.0217361,8.0694962)"
sodipodi:insensitive="true">
<path
style="fill:#333333;fill-opacity:1;stroke:none"
d="M 60,10 C 32.3,10 10,32.3 10,60 l 0,100 c 0,27.7 22.3,50 50,50 l 100,0 c 27.7,0 50,-22.3 50,-50 L 210,60 C 210,32.3 187.7,10 160,10 L 60,10 z m 8.90625,17.78125 82.1875,0 c 22.7744,0 41.125,18.350601 41.125,41.125 l 0,82.1875 c 0,22.7744 -18.3506,41.125 -41.125,41.125 l -82.1875,0 c -22.774399,0 -41.125,-18.3506 -41.125,-41.125 l 0,-82.1875 c 0,-22.774399 18.350601,-41.125 41.125,-41.125 z"
transform="translate(-7.0217361,-8.0694962)"
id="rect4991"
inkscape:connector-curvature="0" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Class"
style="display:none"
sodipodi:insensitive="true">
<g
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
id="text3761">
<path
d="m 119.775,168.98893 c -8.84006,0 -16.77338,-1.36 -23.8,-4.08 -7.026702,-2.71999 -12.976696,-6.68665 -17.85,-11.9 -4.873353,-5.32664 -8.613349,-11.78664 -11.22,-19.38 -2.606677,-7.59329 -3.910009,-16.31995 -3.91,-26.18 -9e-6,-9.859927 1.473322,-18.586585 4.42,-26.179996 3.059983,-7.59324 7.196646,-13.996567 12.41,-19.21 5.213302,-5.326557 11.333296,-9.349886 18.36,-12.07 7.02662,-2.719881 14.56327,-4.079879 22.61,-4.08 4.87326,1.21e-4 9.29326,0.396787 13.26,1.19 3.96658,0.680119 7.42325,1.473452 10.37,2.38 2.94657,0.906783 5.38324,1.870115 7.31,2.89 1.92657,1.020113 3.28657,1.756779 4.08,2.21 l -6.29,17.51 c -2.72009,-1.699904 -6.63009,-3.286569 -11.73,-4.76 -4.98675,-1.586566 -10.42674,-2.379898 -16.32,-2.38 -5.10006,1.02e-4 -9.86006,0.906768 -14.28,2.72 -4.42005,1.700097 -8.273379,4.306761 -11.56,7.82 -3.173372,3.513421 -5.666703,7.933417 -7.48,13.26 -1.813366,5.326739 -2.720032,11.503396 -2.72,18.529996 -3.2e-5,6.23339 0.679967,11.95672 2.04,17.17 1.473298,5.21337 3.683296,9.7467 6.63,13.6 2.946623,3.74003 6.68662,6.68669 11.22,8.84 4.53328,2.04002 9.97327,3.06002 16.32,3.06 7.59326,2e-5 13.76992,-0.73665 18.53,-2.21 4.75991,-1.58664 8.44324,-3.05997 11.05,-4.42 l 5.78,17.51 c -1.3601,0.90668 -3.2301,1.81334 -5.61,2.72 -2.26676,0.90667 -4.98676,1.81334 -8.16,2.72 -3.17342,0.79334 -6.74342,1.41667 -10.71,1.87 -3.96674,0.56667 -8.21674,0.85 -12.75,0.85"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium"
id="path5013"
inkscape:connector-curvature="0" />
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Interface"
style="display:none"
sodipodi:insensitive="true">
<g
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
id="text3761-9">
<path
d="m 99.289993,48.628934 21.419997,0 0,117.809996 -21.419997,0 0,-117.809996"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium"
id="path5086"
inkscape:connector-curvature="0" />
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="Trait"
style="display:inline"
sodipodi:insensitive="true">
<g
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
id="text3761-7">
<path
d="m 154.67148,48.628934 0,18.53 -36.21,0 0,99.279996 -21.589995,0 0,-99.279996 -36.21,0 0,-18.53 94.009995,0"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium"
id="path5089"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>
/branches/v0.3-aleaume/doc/PhpDoc/images/icon-interface.svg
New file
0,0 → 1,73
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
 
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="220"
height="220"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(7.0217361,8.0694962)"
id="layer1">
<path
d="M 60,10 C 32.3,10 10,32.3 10,60 l 0,100 c 0,27.7 22.3,50 50,50 l 100,0 c 27.7,0 50,-22.3 50,-50 L 210,60 C 210,32.3 187.7,10 160,10 L 60,10 z m 8.90625,17.78125 82.1875,0 c 22.7744,0 41.125,18.350601 41.125,41.125 l 0,82.1875 c 0,22.7744 -18.3506,41.125 -41.125,41.125 l -82.1875,0 c -22.774399,0 -41.125,-18.3506 -41.125,-41.125 l 0,-82.1875 c 0,-22.774399 18.350601,-41.125 41.125,-41.125 z"
transform="translate(-7.0217361,-8.0694962)"
id="rect4991"
style="fill:#333333;fill-opacity:1;stroke:none" />
</g>
<g
id="layer2"
style="display:none">
<g
id="text3761"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">
<path
d="m 119.775,168.98893 c -8.84006,0 -16.77338,-1.36 -23.8,-4.08 -7.026702,-2.71999 -12.976696,-6.68665 -17.85,-11.9 -4.873353,-5.32664 -8.613349,-11.78664 -11.22,-19.38 -2.606677,-7.59329 -3.910009,-16.31995 -3.91,-26.18 -9e-6,-9.859927 1.473322,-18.586585 4.42,-26.179996 3.059983,-7.59324 7.196646,-13.996567 12.41,-19.21 5.213302,-5.326557 11.333296,-9.349886 18.36,-12.07 7.02662,-2.719881 14.56327,-4.079879 22.61,-4.08 4.87326,1.21e-4 9.29326,0.396787 13.26,1.19 3.96658,0.680119 7.42325,1.473452 10.37,2.38 2.94657,0.906783 5.38324,1.870115 7.31,2.89 1.92657,1.020113 3.28657,1.756779 4.08,2.21 l -6.29,17.51 c -2.72009,-1.699904 -6.63009,-3.286569 -11.73,-4.76 -4.98675,-1.586566 -10.42674,-2.379898 -16.32,-2.38 -5.10006,1.02e-4 -9.86006,0.906768 -14.28,2.72 -4.42005,1.700097 -8.273379,4.306761 -11.56,7.82 -3.173372,3.513421 -5.666703,7.933417 -7.48,13.26 -1.813366,5.326739 -2.720032,11.503396 -2.72,18.529996 -3.2e-5,6.23339 0.679967,11.95672 2.04,17.17 1.473298,5.21337 3.683296,9.7467 6.63,13.6 2.946623,3.74003 6.68662,6.68669 11.22,8.84 4.53328,2.04002 9.97327,3.06002 16.32,3.06 7.59326,2e-5 13.76992,-0.73665 18.53,-2.21 4.75991,-1.58664 8.44324,-3.05997 11.05,-4.42 l 5.78,17.51 c -1.3601,0.90668 -3.2301,1.81334 -5.61,2.72 -2.26676,0.90667 -4.98676,1.81334 -8.16,2.72 -3.17342,0.79334 -6.74342,1.41667 -10.71,1.87 -3.96674,0.56667 -8.21674,0.85 -12.75,0.85"
id="path5013"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium" />
</g>
</g>
<g
id="layer3"
style="display:inline">
<g
id="text3761-9"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">
<path
d="m 99.289993,48.628934 21.419997,0 0,117.809996 -21.419997,0 0,-117.809996"
id="path5086"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium" />
</g>
</g>
<g
id="layer4"
style="display:none">
<g
id="text3761-7"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">
<path
d="m 154.67148,48.628934 0,18.53 -36.21,0 0,99.279996 -21.589995,0 0,-99.279996 -36.21,0 0,-18.53 94.009995,0"
id="path5089"
style="font-size:170px;font-weight:500;fill:#333333;-inkscape-font-specification:Ubuntu Medium" />
</g>
</g>
</svg>
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-75/phpdoc-cache-file_736975869f045847d0e0177c15dd5d33.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-75/phpdoc-cache-file_736975869f045847d0e0177c15dd5d33.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/js/jquery.iviewer.js
New file
0,0 → 1,1169
/*
* iviewer Widget for jQuery UI
* https://github.com/can3p/iviewer
*
* Copyright (c) 2009 - 2012 Dmitry Petrov
* Dual licensed under the MIT and GPL licenses.
* - http://www.opensource.org/licenses/mit-license.php
* - http://www.gnu.org/copyleft/gpl.html
*
* Author: Dmitry Petrov
* Version: 0.7.7
*/
 
( function( $, undefined ) {
 
//this code was taken from the https://github.com/furf/jquery-ui-touch-punch
var mouseEvents = {
touchstart: 'mousedown',
touchmove: 'mousemove',
touchend: 'mouseup'
},
gesturesSupport = 'ongesturestart' in document.createElement('div');
 
 
/**
* Convert a touch event to a mouse-like
*/
function makeMouseEvent (event) {
var touch = event.originalEvent.changedTouches[0];
 
return $.extend(event, {
type: mouseEvents[event.type],
which: 1,
pageX: touch.pageX,
pageY: touch.pageY,
screenX: touch.screenX,
screenY: touch.screenY,
clientX: touch.clientX,
clientY: touch.clientY,
isTouchEvent: true
});
}
 
var mouseProto = $.ui.mouse.prototype,
_mouseInit = $.ui.mouse.prototype._mouseInit;
 
mouseProto._mouseInit = function() {
var self = this;
self._touchActive = false;
 
this.element.bind( 'touchstart.' + this.widgetName, function(event) {
if (gesturesSupport && event.originalEvent.touches.length > 1) { return; }
self._touchActive = true;
return self._mouseDown(makeMouseEvent(event));
})
 
var self = this;
// these delegates are required to keep context
this._mouseMoveDelegate = function(event) {
if (gesturesSupport && event.originalEvent.touches && event.originalEvent.touches.length > 1) { return; }
if (self._touchActive) {
return self._mouseMove(makeMouseEvent(event));
}
};
this._mouseUpDelegate = function(event) {
if (self._touchActive) {
self._touchActive = false;
return self._mouseUp(makeMouseEvent(event));
}
};
 
$(document)
.bind('touchmove.'+ this.widgetName, this._mouseMoveDelegate)
.bind('touchend.' + this.widgetName, this._mouseUpDelegate);
 
_mouseInit.apply(this);
}
 
/**
* Simple implementation of jQuery like getters/setters
* var val = something();
* something(val);
*/
var setter = function(setter, getter) {
return function(val) {
if (arguments.length === 0) {
return getter.apply(this);
} else {
setter.apply(this, arguments);
}
}
};
 
/**
* Internet explorer rotates image relative left top corner, so we should
* shift image when it's rotated.
*/
var ieTransforms = {
'0': {
marginLeft: 0,
marginTop: 0,
filter: 'progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=0, M21=0, M22=1, SizingMethod="auto expand")'
},
 
'90': {
marginLeft: -1,
marginTop: 1,
filter: 'progid:DXImageTransform.Microsoft.Matrix(M11=0, M12=-1, M21=1, M22=0, SizingMethod="auto expand")'
},
 
'180': {
marginLeft: 0,
marginTop: 0,
filter: 'progid:DXImageTransform.Microsoft.Matrix(M11=-1, M12=0, M21=0, M22=-1, SizingMethod="auto expand")'
},
 
'270': {
marginLeft: -1,
marginTop: 1,
filter: 'progid:DXImageTransform.Microsoft.Matrix(M11=0, M12=1, M21=-1, M22=0, SizingMethod="auto expand")'
}
},
// this test is the inversion of the css filters test from the modernizr project
useIeTransforms = function() {
var modElem = document.createElement('modernizr'),
mStyle = modElem.style,
omPrefixes = 'Webkit Moz O ms',
domPrefixes = omPrefixes.toLowerCase().split(' '),
props = ("transform" + ' ' + domPrefixes.join("Transform ") + "Transform").split(' ');
for ( var i in props ) {
var prop = props[i];
if ( !$.contains(prop, "-") && mStyle[prop] !== undefined ) {
return false;
}
}
return true;
}();
 
$.widget( "ui.iviewer", $.ui.mouse, {
widgetEventPrefix: "iviewer",
options : {
/**
* start zoom value for image, not used now
* may be equal to "fit" to fit image into container or scale in %
**/
zoom: "fit",
/**
* base value to scale image
**/
zoom_base: 100,
/**
* maximum zoom
**/
zoom_max: 800,
/**
* minimum zoom
**/
zoom_min: 25,
/**
* base of rate multiplier.
* zoom is calculated by formula: zoom_base * zoom_delta^rate
**/
zoom_delta: 1.4,
/**
* whether the zoom should be animated.
*/
zoom_animation: true,
/**
* if true plugin doesn't add its own controls
**/
ui_disabled: false,
/**
* If false mousewheel will be disabled
*/
mousewheel: true,
/**
* if false, plugin doesn't bind resize event on window and this must
* be handled manually
**/
update_on_resize: true,
/**
* event is triggered when zoom value is changed
* @param int new zoom value
* @return boolean if false zoom action is aborted
**/
onZoom: jQuery.noop,
/**
* event is triggered when zoom value is changed after image is set to the new dimensions
* @param int new zoom value
* @return boolean if false zoom action is aborted
**/
onAfterZoom: jQuery.noop,
/**
* event is fired on drag begin
* @param object coords mouse coordinates on the image
* @return boolean if false is returned, drag action is aborted
**/
onStartDrag: jQuery.noop,
/**
* event is fired on drag action
* @param object coords mouse coordinates on the image
**/
onDrag: jQuery.noop,
/**
* event is fired on drag stop
* @param object coords mouse coordinates on the image
**/
onStopDrag: jQuery.noop,
/**
* event is fired when mouse moves over image
* @param object coords mouse coordinates on the image
**/
onMouseMove: jQuery.noop,
/**
* mouse click event
* @param object coords mouse coordinates on the image
**/
onClick: jQuery.noop,
/**
* event is fired when image starts to load
*/
onStartLoad: null,
/**
* event is fired, when image is loaded and initially positioned
*/
onFinishLoad: null,
/**
* event is fired when image load error occurs
*/
onErrorLoad: null
},
 
_create: function() {
var me = this;
 
//drag variables
this.dx = 0;
this.dy = 0;
 
/* object containing actual information about image
* @img_object.object - jquery img object
* @img_object.orig_{width|height} - original dimensions
* @img_object.display_{width|height} - actual dimensions
*/
this.img_object = {};
 
this.zoom_object = {}; //object to show zoom status
 
this._angle = 0;
 
this.current_zoom = this.options.zoom;
 
if(this.options.src === null){
return;
}
 
this.container = this.element;
 
this._updateContainerInfo();
 
//init container
this.container.css("overflow","hidden");
 
if (this.options.update_on_resize == true) {
$(window).resize(function() {
me.update();
});
}
 
this.img_object = new $.ui.iviewer.ImageObject(this.options.zoom_animation);
 
if (this.options.mousewheel) {
this.container.bind('mousewheel.iviewer', function(ev, delta)
{
//this event is there instead of containing div, because
//at opera it triggers many times on div
var zoom = (delta > 0)?1:-1,
container_offset = me.container.offset(),
mouse_pos = {
//jquery.mousewheel 3.1.0 uses strange MozMousePixelScroll event
//which is not being fixed by jQuery.Event
x: (ev.pageX || ev.originalEvent.pageX) - container_offset.left,
y: (ev.pageY || ev.originalEvent.pageX) - container_offset.top
};
 
me.zoom_by(zoom, mouse_pos);
return false;
});
 
if (gesturesSupport) {
var gestureThrottle = +new Date();
var originalScale, originalCenter;
this.img_object.object()
// .bind('gesturestart', function(ev) {
.bind('touchstart', function(ev) {
originalScale = me.current_zoom;
var touches = ev.originalEvent.touches,
container_offset;
if (touches.length == 2) {
container_offset = me.container.offset();
originalCenter = {
x: (touches[0].pageX + touches[1].pageX) / 2 - container_offset.left,
y: (touches[0].pageY + touches[1].pageY) / 2 - container_offset.top
};
} else {
originalCenter = null;
}
}).bind('gesturechange', function(ev) {
//do not want to import throttle function from underscore
var d = +new Date();
if ((d - gestureThrottle) < 50) { return; }
gestureThrottle = d;
var zoom = originalScale * ev.originalEvent.scale;
me.set_zoom(zoom, originalCenter);
ev.preventDefault();
}).bind('gestureend', function(ev) {
originalCenter = null;
});
}
}
 
//init object
this.img_object.object()
//bind mouse events
.click(function(e){return me._click(e)})
.prependTo(this.container);
 
this.container.bind('mousemove', function(ev) { me._handleMouseMove(ev); });
 
this.loadImage(this.options.src);
 
if(!this.options.ui_disabled)
{
this.createui();
}
 
this._mouseInit();
},
 
destroy: function() {
$.Widget.prototype.destroy.call( this );
this._mouseDestroy();
this.img_object.object().remove();
this.container.off('.iviewer');
this.container.css('overflow', ''); //cleanup styles on destroy
},
 
_updateContainerInfo: function()
{
this.options.height = this.container.height();
this.options.width = this.container.width();
},
 
update: function()
{
this._updateContainerInfo()
this.setCoords(this.img_object.x(), this.img_object.y());
},
 
loadImage: function( src )
{
this.current_zoom = this.options.zoom;
var me = this;
 
this._trigger('onStartLoad', 0, src);
 
this.container.addClass("iviewer_loading");
this.img_object.load(src, function() {
me._imageLoaded(src);
}, function() {
me._trigger("onErrorLoad", 0, src);
});
},
 
_imageLoaded: function(src) {
this.container.removeClass("iviewer_loading");
this.container.addClass("iviewer_cursor");
 
if(this.options.zoom == "fit"){
this.fit(true);
}
else {
this.set_zoom(this.options.zoom, true);
}
 
this._trigger('onFinishLoad', 0, src);
},
 
/**
* fits image in the container
*
* @param {boolean} skip_animation
**/
fit: function(skip_animation)
{
var aspect_ratio = this.img_object.orig_width() / this.img_object.orig_height();
var window_ratio = this.options.width / this.options.height;
var choose_left = (aspect_ratio > window_ratio);
var new_zoom = 0;
 
if(choose_left){
new_zoom = this.options.width / this.img_object.orig_width() * 100;
}
else {
new_zoom = this.options.height / this.img_object.orig_height() * 100;
}
 
this.set_zoom(new_zoom, skip_animation);
},
 
/**
* center image in container
**/
center: function()
{
this.setCoords(-Math.round((this.img_object.display_width() - this.options.width)/2),
-Math.round((this.img_object.display_height() - this.options.height)/2));
},
 
/**
* move a point in container to the center of display area
* @param x a point in container
* @param y a point in container
**/
moveTo: function(x, y)
{
var dx = x-Math.round(this.options.width/2);
var dy = y-Math.round(this.options.height/2);
 
var new_x = this.img_object.x() - dx;
var new_y = this.img_object.y() - dy;
 
this.setCoords(new_x, new_y);
},
 
/**
* Get container offset object.
*/
getContainerOffset: function() {
return jQuery.extend({}, this.container.offset());
},
 
/**
* set coordinates of upper left corner of image object
**/
setCoords: function(x,y)
{
//do nothing while image is being loaded
if(!this.img_object.loaded()) { return; }
 
var coords = this._correctCoords(x,y);
this.img_object.x(coords.x);
this.img_object.y(coords.y);
},
 
_correctCoords: function( x, y )
{
x = parseInt(x, 10);
y = parseInt(y, 10);
 
//check new coordinates to be correct (to be in rect)
if(y > 0){
y = 0;
}
if(x > 0){
x = 0;
}
if(y + this.img_object.display_height() < this.options.height){
y = this.options.height - this.img_object.display_height();
}
if(x + this.img_object.display_width() < this.options.width){
x = this.options.width - this.img_object.display_width();
}
if(this.img_object.display_width() <= this.options.width){
x = -(this.img_object.display_width() - this.options.width)/2;
}
if(this.img_object.display_height() <= this.options.height){
y = -(this.img_object.display_height() - this.options.height)/2;
}
 
return { x: x, y:y };
},
 
 
/**
* convert coordinates on the container to the coordinates on the image (in original size)
*
* @return object with fields x,y according to coordinates or false
* if initial coords are not inside image
**/
containerToImage : function (x,y)
{
var coords = { x : x - this.img_object.x(),
y : y - this.img_object.y()
};
 
coords = this.img_object.toOriginalCoords(coords);
 
return { x : util.descaleValue(coords.x, this.current_zoom),
y : util.descaleValue(coords.y, this.current_zoom)
};
},
 
/**
* convert coordinates on the image (in original size, and zero angle) to the coordinates on the container
*
* @return object with fields x,y according to coordinates
**/
imageToContainer : function (x,y)
{
var coords = {
x : util.scaleValue(x, this.current_zoom),
y : util.scaleValue(y, this.current_zoom)
};
 
return this.img_object.toRealCoords(coords);
},
 
/**
* get mouse coordinates on the image
* @param e - object containing pageX and pageY fields, e.g. mouse event object
*
* @return object with fields x,y according to coordinates or false
* if initial coords are not inside image
**/
_getMouseCoords : function(e)
{
var containerOffset = this.container.offset();
coords = this.containerToImage(e.pageX - containerOffset.left, e.pageY - containerOffset.top);
 
return coords;
},
 
/**
* set image scale to the new_zoom
*
* @param {number} new_zoom image scale in %
* @param {boolean} skip_animation
* @param {x: number, y: number} Coordinates of point the should not be moved on zoom. The default is the center of image.
**/
set_zoom: function(new_zoom, skip_animation, zoom_center)
{
if (this._trigger('onZoom', 0, new_zoom) == false) {
return;
}
 
//do nothing while image is being loaded
if(!this.img_object.loaded()) { return; }
 
zoom_center = zoom_center || {
x: Math.round(this.options.width/2),
y: Math.round(this.options.height/2)
}
 
if(new_zoom < this.options.zoom_min)
{
new_zoom = this.options.zoom_min;
}
else if(new_zoom > this.options.zoom_max)
{
new_zoom = this.options.zoom_max;
}
 
/* we fake these values to make fit zoom properly work */
if(this.current_zoom == "fit")
{
var old_x = zoom_center.x + Math.round(this.img_object.orig_width()/2);
var old_y = zoom_center.y + Math.round(this.img_object.orig_height()/2);
this.current_zoom = 100;
}
else {
var old_x = -this.img_object.x() + zoom_center.x;
var old_y = -this.img_object.y() + zoom_center.y
}
 
var new_width = util.scaleValue(this.img_object.orig_width(), new_zoom);
var new_height = util.scaleValue(this.img_object.orig_height(), new_zoom);
var new_x = util.scaleValue( util.descaleValue(old_x, this.current_zoom), new_zoom);
var new_y = util.scaleValue( util.descaleValue(old_y, this.current_zoom), new_zoom);
 
new_x = zoom_center.x - new_x;
new_y = zoom_center.y - new_y;
 
new_width = Math.floor(new_width);
new_height = Math.floor(new_height);
new_x = Math.floor(new_x);
new_y = Math.floor(new_y);
 
this.img_object.display_width(new_width);
this.img_object.display_height(new_height);
 
var coords = this._correctCoords( new_x, new_y ),
self = this;
 
this.img_object.setImageProps(new_width, new_height, coords.x, coords.y,
skip_animation, function() {
self._trigger('onAfterZoom', 0, new_zoom );
});
this.current_zoom = new_zoom;
 
this.update_status();
},
 
/**
* changes zoom scale by delta
* zoom is calculated by formula: zoom_base * zoom_delta^rate
* @param Integer delta number to add to the current multiplier rate number
* @param {x: number, y: number=} Coordinates of point the should not be moved on zoom.
**/
zoom_by: function(delta, zoom_center)
{
var closest_rate = this.find_closest_zoom_rate(this.current_zoom);
 
var next_rate = closest_rate + delta;
var next_zoom = this.options.zoom_base * Math.pow(this.options.zoom_delta, next_rate)
if(delta > 0 && next_zoom < this.current_zoom)
{
next_zoom *= this.options.zoom_delta;
}
 
if(delta < 0 && next_zoom > this.current_zoom)
{
next_zoom /= this.options.zoom_delta;
}
 
this.set_zoom(next_zoom, undefined, zoom_center);
},
 
/**
* Rotate image
* @param {num} deg Degrees amount to rotate. Positive values rotate image clockwise.
* Currently 0, 90, 180, 270 and -90, -180, -270 values are supported
*
* @param {boolean} abs If the flag is true if, the deg parameter will be considered as
* a absolute value and relative otherwise.
* @return {num|null} Method will return current image angle if called without any arguments.
**/
angle: function(deg, abs) {
if (arguments.length === 0) { return this.img_object.angle(); }
 
if (deg < -270 || deg > 270 || deg % 90 !== 0) { return; }
if (!abs) { deg += this.img_object.angle(); }
if (deg < 0) { deg += 360; }
if (deg >= 360) { deg -= 360; }
 
if (deg === this.img_object.angle()) { return; }
 
this.img_object.angle(deg);
//the rotate behavior is different in all editors. For now we just center the
//image. However, it will be better to try to keep the position.
this.center();
this._trigger('angle', 0, { angle: this.img_object.angle() });
},
 
/**
* finds closest multiplier rate for value
* basing on zoom_base and zoom_delta values from settings
* @param Number value zoom value to examine
**/
find_closest_zoom_rate: function(value)
{
if(value == this.options.zoom_base)
{
return 0;
}
 
function div(val1,val2) { return val1 / val2 };
function mul(val1,val2) { return val1 * val2 };
 
var func = (value > this.options.zoom_base)?mul:div;
var sgn = (value > this.options.zoom_base)?1:-1;
 
var mltplr = this.options.zoom_delta;
var rate = 1;
 
while(Math.abs(func(this.options.zoom_base, Math.pow(mltplr,rate)) - value) >
Math.abs(func(this.options.zoom_base, Math.pow(mltplr,rate+1)) - value))
{
rate++;
}
 
return sgn * rate;
},
 
/* update scale info in the container */
update_status: function()
{
if(!this.options.ui_disabled)
{
var percent = Math.round(100*this.img_object.display_height()/this.img_object.orig_height());
if(percent)
{
this.zoom_object.html(percent + "%");
}
}
},
 
/**
* Get some information about the image.
* Currently orig_(width|height), display_(width|height), angle, zoom and src params are supported.
*
* @param {string} parameter to check
* @param {boolean} withoutRotation if param is orig_width or orig_height and this flag is set to true,
* method will return original image width without considering rotation.
*
*/
info: function(param, withoutRotation) {
if (!param) { return; }
 
switch (param) {
case 'orig_width':
case 'orig_height':
if (withoutRotation) {
return (this.img_object.angle() % 180 === 0 ? this.img_object[param]() :
param === 'orig_width' ? this.img_object.orig_height() :
this.img_object.orig_width());
} else {
return this.img_object[param]();
}
case 'display_width':
case 'display_height':
case 'angle':
return this.img_object[param]();
case 'zoom':
return this.current_zoom;
case 'src':
return this.img_object.object().attr('src');
case 'coords':
return {
x: this.img_object.x(),
y: this.img_object.y()
};
}
},
 
/**
* callback for handling mousdown event to start dragging image
**/
_mouseStart: function( e )
{
$.ui.mouse.prototype._mouseStart.call(this, e);
if (this._trigger('onStartDrag', 0, this._getMouseCoords(e)) === false) {
return false;
}
 
/* start drag event*/
this.container.addClass("iviewer_drag_cursor");
 
//#10: fix movement quirks for ipad
this._dragInitialized = !(e.originalEvent.changedTouches && e.originalEvent.changedTouches.length==1);
 
this.dx = e.pageX - this.img_object.x();
this.dy = e.pageY - this.img_object.y();
return true;
},
 
_mouseCapture: function( e ) {
return true;
},
 
/**
* Handle mouse move if needed. User can avoid using this callback, because
* he can get the same information through public methods.
* @param {jQuery.Event} e
*/
_handleMouseMove: function(e) {
this._trigger('onMouseMove', e, this._getMouseCoords(e));
},
 
/**
* callback for handling mousemove event to drag image
**/
_mouseDrag: function(e)
{
$.ui.mouse.prototype._mouseDrag.call(this, e);
 
//#10: imitate mouseStart, because we can get here without it on iPad for some reason
if (!this._dragInitialized) {
this.dx = e.pageX - this.img_object.x();
this.dy = e.pageY - this.img_object.y();
this._dragInitialized = true;
}
 
var ltop = e.pageY - this.dy;
var lleft = e.pageX - this.dx;
 
this.setCoords(lleft, ltop);
this._trigger('onDrag', e, this._getMouseCoords(e));
return false;
},
 
/**
* callback for handling stop drag
**/
_mouseStop: function(e)
{
$.ui.mouse.prototype._mouseStop.call(this, e);
this.container.removeClass("iviewer_drag_cursor");
this._trigger('onStopDrag', 0, this._getMouseCoords(e));
},
 
_click: function(e)
{
this._trigger('onClick', 0, this._getMouseCoords(e));
},
 
/**
* create zoom buttons info box
**/
createui: function()
{
var me=this;
 
$("<div>", { 'class': "iviewer_zoom_in iviewer_common iviewer_button"})
.bind('mousedown touchstart',function(){me.zoom_by(1); return false;})
.appendTo(this.container);
 
$("<div>", { 'class': "iviewer_zoom_out iviewer_common iviewer_button"})
.bind('mousedown touchstart',function(){me.zoom_by(- 1); return false;})
.appendTo(this.container);
 
$("<div>", { 'class': "iviewer_zoom_zero iviewer_common iviewer_button"})
.bind('mousedown touchstart',function(){me.set_zoom(100); return false;})
.appendTo(this.container);
 
$("<div>", { 'class': "iviewer_zoom_fit iviewer_common iviewer_button"})
.bind('mousedown touchstart',function(){me.fit(this); return false;})
.appendTo(this.container);
 
this.zoom_object = $("<div>").addClass("iviewer_zoom_status iviewer_common")
.appendTo(this.container);
 
$("<div>", { 'class': "iviewer_rotate_left iviewer_common iviewer_button"})
.bind('mousedown touchstart',function(){me.angle(-90); return false;})
.appendTo(this.container);
 
$("<div>", { 'class': "iviewer_rotate_right iviewer_common iviewer_button" })
.bind('mousedown touchstart',function(){me.angle(90); return false;})
.appendTo(this.container);
 
this.update_status(); //initial status update
}
 
} );
 
/**
* @class $.ui.iviewer.ImageObject Class represents image and provides public api without
* extending image prototype.
* @constructor
* @param {boolean} do_anim Do we want to animate image on dimension changes?
*/
$.ui.iviewer.ImageObject = function(do_anim) {
this._img = $("<img>")
//this is needed, because chromium sets them auto otherwise
.css({ position: "absolute", top :"0px", left: "0px"});
 
this._loaded = false;
this._swapDimensions = false;
this._do_anim = do_anim || false;
this.x(0, true);
this.y(0, true);
this.angle(0);
};
 
 
/** @lends $.ui.iviewer.ImageObject.prototype */
(function() {
/**
* Restore initial object state.
*
* @param {number} w Image width.
* @param {number} h Image height.
*/
this._reset = function(w, h) {
this._angle = 0;
this._swapDimensions = false;
this.x(0);
this.y(0);
 
this.orig_width(w);
this.orig_height(h);
this.display_width(w);
this.display_height(h);
};
 
/**
* Check if image is loaded.
*
* @return {boolean}
*/
this.loaded = function() { return this._loaded; };
 
/**
* Load image.
*
* @param {string} src Image url.
* @param {Function=} loaded Function will be called on image load.
*/
this.load = function(src, loaded, error) {
var self = this;
 
loaded = loaded || jQuery.noop;
this._loaded = false;
 
//If we assign new image url to the this._img IE9 fires onload event and image width and
//height are set to zero. So, we create another image object and load image through it.
var img = new Image();
img.onload = function() {
self._loaded = true;
self._reset(this.width, this.height);
 
self._img
.removeAttr("width")
.removeAttr("height")
.removeAttr("style")
//max-width is reset, because plugin breaks in the twitter bootstrap otherwise
.css({ position: "absolute", top :"0px", left: "0px", maxWidth: "none"})
 
self._img[0].src = src;
loaded();
};
 
img.onerror = error;
 
//we need this because sometimes internet explorer 8 fires onload event
//right after assignment (synchronously)
setTimeout(function() {
img.src = src;
}, 0);
 
this.angle(0);
};
 
this._dimension = function(prefix, name) {
var horiz = '_' + prefix + '_' + name,
vert = '_' + prefix + '_' + (name === 'height' ? 'width' : 'height');
return setter(function(val) {
this[this._swapDimensions ? horiz: vert] = val;
},
function() {
return this[this._swapDimensions ? horiz: vert];
});
};
 
/**
* Getters and setter for common image dimensions.
* display_ means real image tag dimensions
* orig_ means physical image dimensions.
* Note, that dimensions are swapped if image is rotated. It necessary,
* because as little as possible code should know about rotation.
*/
this.display_width = this._dimension('display', 'width'),
this.display_height = this._dimension('display', 'height'),
this.display_diff = function() { return Math.floor( this.display_width() - this.display_height() ) };
this.orig_width = this._dimension('orig', 'width'),
this.orig_height = this._dimension('orig', 'height'),
 
/**
* Setter for X coordinate. If image is rotated we need to additionaly shift an
* image to map image coordinate to the visual position.
*
* @param {number} val Coordinate value.
* @param {boolean} skipCss If true, we only set the value and do not touch the dom.
*/
this.x = setter(function(val, skipCss) {
this._x = val;
if (!skipCss) {
this._finishAnimation();
this._img.css("left",this._x + (this._swapDimensions ? this.display_diff() / 2 : 0) + "px");
}
},
function() {
return this._x;
});
 
/**
* Setter for Y coordinate. If image is rotated we need to additionaly shift an
* image to map image coordinate to the visual position.
*
* @param {number} val Coordinate value.
* @param {boolean} skipCss If true, we only set the value and do not touch the dom.
*/
this.y = setter(function(val, skipCss) {
this._y = val;
if (!skipCss) {
this._finishAnimation();
this._img.css("top",this._y - (this._swapDimensions ? this.display_diff() / 2 : 0) + "px");
}
},
function() {
return this._y;
});
 
/**
* Perform image rotation.
*
* @param {number} deg Absolute image angle. The method will work with values 0, 90, 180, 270 degrees.
*/
this.angle = setter(function(deg) {
var prevSwap = this._swapDimensions;
 
this._angle = deg;
this._swapDimensions = deg % 180 !== 0;
 
if (prevSwap !== this._swapDimensions) {
var verticalMod = this._swapDimensions ? -1 : 1;
this.x(this.x() - verticalMod * this.display_diff() / 2, true);
this.y(this.y() + verticalMod * this.display_diff() / 2, true);
};
 
var cssVal = 'rotate(' + deg + 'deg)',
img = this._img;
 
jQuery.each(['', '-webkit-', '-moz-', '-o-', '-ms-'], function(i, prefix) {
img.css(prefix + 'transform', cssVal);
});
 
if (useIeTransforms) {
jQuery.each(['-ms-', ''], function(i, prefix) {
img.css(prefix + 'filter', ieTransforms[deg].filter);
});
 
img.css({
marginLeft: ieTransforms[deg].marginLeft * this.display_diff() / 2,
marginTop: ieTransforms[deg].marginTop * this.display_diff() / 2
});
}
},
function() { return this._angle; });
 
/**
* Map point in the container coordinates to the point in image coordinates.
* You will get coordinates of point on image with respect to rotation,
* but will be set as if image was not rotated.
* So, if image was rotated 90 degrees, it's (0,0) point will be on the
* top right corner.
*
* @param {{x: number, y: number}} point Point in container coordinates.
* @return {{x: number, y: number}}
*/
this.toOriginalCoords = function(point) {
switch (this.angle()) {
case 0: return { x: point.x, y: point.y }
case 90: return { x: point.y, y: this.display_width() - point.x }
case 180: return { x: this.display_width() - point.x, y: this.display_height() - point.y }
case 270: return { x: this.display_height() - point.y, y: point.x }
}
};
 
/**
* Map point in the image coordinates to the point in container coordinates.
* You will get coordinates of point on container with respect to rotation.
* Note, if image was rotated 90 degrees, it's (0,0) point will be on the
* top right corner.
*
* @param {{x: number, y: number}} point Point in container coordinates.
* @return {{x: number, y: number}}
*/
this.toRealCoords = function(point) {
switch (this.angle()) {
case 0: return { x: this.x() + point.x, y: this.y() + point.y }
case 90: return { x: this.x() + this.display_width() - point.y, y: this.y() + point.x}
case 180: return { x: this.x() + this.display_width() - point.x, y: this.y() + this.display_height() - point.y}
case 270: return { x: this.x() + point.y, y: this.y() + this.display_height() - point.x}
}
};
 
/**
* @return {jQuery} Return image node. this is needed to add event handlers.
*/
this.object = setter(jQuery.noop,
function() { return this._img; });
 
/**
* Change image properties.
*
* @param {number} disp_w Display width;
* @param {number} disp_h Display height;
* @param {number} x
* @param {number} y
* @param {boolean} skip_animation If true, the animation will be skiped despite the
* value set in constructor.
* @param {Function=} complete Call back will be fired when zoom will be complete.
*/
this.setImageProps = function(disp_w, disp_h, x, y, skip_animation, complete) {
complete = complete || jQuery.noop;
 
this.display_width(disp_w);
this.display_height(disp_h);
this.x(x, true);
this.y(y, true);
 
var w = this._swapDimensions ? disp_h : disp_w;
var h = this._swapDimensions ? disp_w : disp_h;
 
var params = {
width: w,
height: h,
top: y - (this._swapDimensions ? this.display_diff() / 2 : 0) + "px",
left: x + (this._swapDimensions ? this.display_diff() / 2 : 0) + "px"
};
 
if (useIeTransforms) {
jQuery.extend(params, {
marginLeft: ieTransforms[this.angle()].marginLeft * this.display_diff() / 2,
marginTop: ieTransforms[this.angle()].marginTop * this.display_diff() / 2
});
}
 
var swapDims = this._swapDimensions,
img = this._img;
 
//here we come: another IE oddness. If image is rotated 90 degrees with a filter, than
//width and height getters return real width and height of rotated image. The bad news
//is that to set height you need to set a width and vice versa. Fuck IE.
//So, in this case we have to animate width and height manually.
if(useIeTransforms && swapDims) {
var ieh = this._img.width(),
iew = this._img.height(),
iedh = params.height - ieh;
iedw = params.width - iew;
 
delete params.width;
delete params.height;
}
 
if (this._do_anim && !skip_animation) {
this._img.stop(true)
.animate(params, {
duration: 200,
complete: complete,
step: function(now, fx) {
if(useIeTransforms && swapDims && (fx.prop === 'top')) {
var percent = (now - fx.start) / (fx.end - fx.start);
 
img.height(ieh + iedh * percent);
img.width(iew + iedw * percent);
img.css('top', now);
}
}
});
} else {
this._img.css(params);
setTimeout(complete, 0); //both if branches should behave equally.
}
};
 
//if we set image coordinates we need to be sure that no animation is active atm
this._finishAnimation = function() {
this._img.stop(true, true);
}
 
}).apply($.ui.iviewer.ImageObject.prototype);
 
 
 
var util = {
scaleValue: function(value, toZoom)
{
return value * toZoom / 100;
},
 
descaleValue: function(value, fromZoom)
{
return value * 100 / fromZoom;
}
};
 
} )( jQuery, undefined );
/branches/v0.3-aleaume/doc/PhpDoc/js/jquery.dotdotdot-1.5.9.js
New file
0,0 → 1,602
/*
* jQuery dotdotdot 1.5.9
*
* Copyright (c) 2013 Fred Heusschen
* www.frebsite.nl
*
* Plugin website:
* dotdotdot.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
 
(function( $ )
{
if ( $.fn.dotdotdot )
{
return;
}
 
$.fn.dotdotdot = function( o )
{
if ( this.length == 0 )
{
if ( !o || o.debug !== false )
{
debug( true, 'No element found for "' + this.selector + '".' );
}
return this;
}
if ( this.length > 1 )
{
return this.each(
function()
{
$(this).dotdotdot( o );
}
);
}
 
 
var $dot = this;
 
if ( $dot.data( 'dotdotdot' ) )
{
$dot.trigger( 'destroy.dot' );
}
 
$dot.data( 'dotdotdot-style', $dot.attr( 'style' ) );
$dot.css( 'word-wrap', 'break-word' );
 
$dot.bind_events = function()
{
$dot.bind(
'update.dot',
function( e, c )
{
e.preventDefault();
e.stopPropagation();
 
opts.maxHeight = ( typeof opts.height == 'number' )
? opts.height
: getTrueInnerHeight( $dot );
 
opts.maxHeight += opts.tolerance;
 
if ( typeof c != 'undefined' )
{
if ( typeof c == 'string' || c instanceof HTMLElement )
{
c = $('<div />').append( c ).contents();
}
if ( c instanceof $ )
{
orgContent = c;
}
}
 
$inr = $dot.wrapInner( '<div class="dotdotdot" />' ).children();
$inr.empty()
.append( orgContent.clone( true ) )
.css({
'height' : 'auto',
'width' : 'auto',
'border' : 'none',
'padding' : 0,
'margin' : 0
});
 
var after = false,
trunc = false;
 
if ( conf.afterElement )
{
after = conf.afterElement.clone( true );
conf.afterElement.remove();
}
if ( test( $inr, opts ) )
{
if ( opts.wrap == 'children' )
{
trunc = children( $inr, opts, after );
}
else
{
trunc = ellipsis( $inr, $dot, $inr, opts, after );
}
}
$inr.replaceWith( $inr.contents() );
$inr = null;
if ( $.isFunction( opts.callback ) )
{
opts.callback.call( $dot[ 0 ], trunc, orgContent );
}
 
conf.isTruncated = trunc;
return trunc;
}
 
).bind(
'isTruncated.dot',
function( e, fn )
{
e.preventDefault();
e.stopPropagation();
 
if ( typeof fn == 'function' )
{
fn.call( $dot[ 0 ], conf.isTruncated );
}
return conf.isTruncated;
}
 
).bind(
'originalContent.dot',
function( e, fn )
{
e.preventDefault();
e.stopPropagation();
 
if ( typeof fn == 'function' )
{
fn.call( $dot[ 0 ], orgContent );
}
return orgContent;
}
 
).bind(
'destroy.dot',
function( e )
{
e.preventDefault();
e.stopPropagation();
 
$dot.unwatch()
.unbind_events()
.empty()
.append( orgContent )
.attr( 'style', $dot.data( 'dotdotdot-style' ) )
.data( 'dotdotdot', false );
}
);
return $dot;
}; // /bind_events
 
$dot.unbind_events = function()
{
$dot.unbind('.dot');
return $dot;
}; // /unbind_events
 
$dot.watch = function()
{
$dot.unwatch();
if ( opts.watch == 'window' )
{
var $window = $(window),
_wWidth = $window.width(),
_wHeight = $window.height();
 
$window.bind(
'resize.dot' + conf.dotId,
function()
{
if ( _wWidth != $window.width() || _wHeight != $window.height() || !opts.windowResizeFix )
{
_wWidth = $window.width();
_wHeight = $window.height();
if ( watchInt )
{
clearInterval( watchInt );
}
watchInt = setTimeout(
function()
{
$dot.trigger( 'update.dot' );
}, 10
);
}
}
);
}
else
{
watchOrg = getSizes( $dot );
watchInt = setInterval(
function()
{
var watchNew = getSizes( $dot );
if ( watchOrg.width != watchNew.width ||
watchOrg.height != watchNew.height )
{
$dot.trigger( 'update.dot' );
watchOrg = getSizes( $dot );
}
}, 100
);
}
return $dot;
};
$dot.unwatch = function()
{
$(window).unbind( 'resize.dot' + conf.dotId );
if ( watchInt )
{
clearInterval( watchInt );
}
return $dot;
};
 
var orgContent = $dot.contents(),
opts = $.extend( true, {}, $.fn.dotdotdot.defaults, o ),
conf = {},
watchOrg = {},
watchInt = null,
$inr = null;
 
conf.afterElement = getElement( opts.after, $dot );
conf.isTruncated = false;
conf.dotId = dotId++;
 
 
$dot.data( 'dotdotdot', true )
.bind_events()
.trigger( 'update.dot' );
 
if ( opts.watch )
{
$dot.watch();
}
 
return $dot;
};
 
 
// public
$.fn.dotdotdot.defaults = {
'ellipsis' : '... ',
'wrap' : 'word',
'lastCharacter': {
'remove' : [ ' ', ',', ';', '.', '!', '?' ],
'noEllipsis' : []
},
'tolerance' : 0,
'callback' : null,
'after' : null,
'height' : null,
'watch' : false,
'windowResizeFix': true,
'debug' : false
};
 
// private
var dotId = 1;
 
function children( $elem, o, after )
{
var $elements = $elem.children(),
isTruncated = false;
 
$elem.empty();
 
for ( var a = 0, l = $elements.length; a < l; a++ )
{
var $e = $elements.eq( a );
$elem.append( $e );
if ( after )
{
$elem.append( after );
}
if ( test( $elem, o ) )
{
$e.remove();
isTruncated = true;
break;
}
else
{
if ( after )
{
after.remove();
}
}
}
return isTruncated;
}
function ellipsis( $elem, $d, $i, o, after )
{
var $elements = $elem.contents(),
isTruncated = false;
 
$elem.empty();
 
var notx = 'table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, select, optgroup, option, textarea, script, style';
for ( var a = 0, l = $elements.length; a < l; a++ )
{
 
if ( isTruncated )
{
break;
}
 
var e = $elements[ a ],
$e = $(e);
 
if ( typeof e == 'undefined' )
{
continue;
}
 
$elem.append( $e );
if ( after )
{
$elem[ ( $elem.is( notx ) ) ? 'after' : 'append' ]( after );
}
if ( e.nodeType == 3 )
{
if ( test( $i, o ) )
{
isTruncated = ellipsisElement( $e, $d, $i, o, after );
}
}
else
{
isTruncated = ellipsis( $e, $d, $i, o, after );
}
 
if ( !isTruncated )
{
if ( after )
{
after.remove();
}
}
}
return isTruncated;
}
function ellipsisElement( $e, $d, $i, o, after )
{
var isTruncated = false,
e = $e[ 0 ];
 
if ( typeof e == 'undefined' )
{
return false;
}
 
var seporator = ( o.wrap == 'letter' ) ? '' : ' ',
textArr = getTextContent( e ).split( seporator ),
position = -1,
midPos = -1,
startPos = 0,
endPos = textArr.length - 1;
 
while ( startPos <= endPos )
{
var m = Math.floor( ( startPos + endPos ) / 2 );
if ( m == midPos )
{
break;
}
midPos = m;
 
setTextContent( e, textArr.slice( 0, midPos + 1 ).join( seporator ) + o.ellipsis );
 
if ( !test( $i, o ) )
{
position = midPos;
startPos = midPos;
}
else
{
endPos = midPos;
}
}
if ( position != -1 && !( textArr.length == 1 && textArr[ 0 ].length == 0 ) )
{
var txt = addEllipsis( textArr.slice( 0, position + 1 ).join( seporator ), o );
isTruncated = true;
setTextContent( e, txt );
}
else
{
var $w = $e.parent();
$e.remove();
 
var afterLength = ( after ) ? after.length : 0 ;
 
if ( $w.contents().size() > afterLength )
{
var $n = $w.contents().eq( -1 - afterLength );
isTruncated = ellipsisElement( $n, $d, $i, o, after );
}
else
{
var $p = $w.prev()
var e = $p.contents().eq( -1 )[ 0 ];
 
if ( typeof e != 'undefined' )
{
var txt = addEllipsis( getTextContent( e ), o );
setTextContent( e, txt );
if ( after )
{
$p.append( after );
}
$w.remove();
isTruncated = true;
}
 
}
}
 
return isTruncated;
}
function test( $i, o )
{
return $i.innerHeight() > o.maxHeight;
}
function addEllipsis( txt, o )
{
while( $.inArray( txt.slice( -1 ), o.lastCharacter.remove ) > -1 )
{
txt = txt.slice( 0, -1 );
}
if ( $.inArray( txt.slice( -1 ), o.lastCharacter.noEllipsis ) < 0 )
{
txt += o.ellipsis;
}
return txt;
}
function getSizes( $d )
{
return {
'width' : $d.innerWidth(),
'height': $d.innerHeight()
};
}
function setTextContent( e, content )
{
if ( e.innerText )
{
e.innerText = content;
}
else if ( e.nodeValue )
{
e.nodeValue = content;
}
else if (e.textContent)
{
e.textContent = content;
}
 
}
function getTextContent( e )
{
if ( e.innerText )
{
return e.innerText;
}
else if ( e.nodeValue )
{
return e.nodeValue;
}
else if ( e.textContent )
{
return e.textContent;
}
else
{
return "";
}
}
function getElement( e, $i )
{
if ( typeof e == 'undefined' )
{
return false;
}
if ( !e )
{
return false;
}
if ( typeof e == 'string' )
{
e = $(e, $i);
return ( e.length )
? e
: false;
}
if ( typeof e == 'object' )
{
return ( typeof e.jquery == 'undefined' )
? false
: e;
}
return false;
}
function getTrueInnerHeight( $el )
{
var h = $el.innerHeight(),
a = [ 'paddingTop', 'paddingBottom' ];
 
for ( var z = 0, l = a.length; z < l; z++ ) {
var m = parseInt( $el.css( a[ z ] ), 10 );
if ( isNaN( m ) )
{
m = 0;
}
h -= m;
}
return h;
}
function debug( d, m )
{
if ( !d )
{
return false;
}
if ( typeof m == 'string' )
{
m = 'dotdotdot: ' + m;
}
else
{
m = [ 'dotdotdot:', m ];
}
 
if ( typeof window.console != 'undefined' )
{
if ( typeof window.console.log != 'undefined' )
{
window.console.log( m );
}
}
return false;
}
 
// override jQuery.html
var _orgHtml = $.fn.html;
$.fn.html = function( str ) {
if ( typeof str != 'undefined' )
{
if ( this.data( 'dotdotdot' ) )
{
if ( typeof str != 'function' )
{
return this.trigger( 'update', [ str ] );
}
}
return _orgHtml.call( this, str );
}
return _orgHtml.call( this );
};
 
 
// override jQuery.text
var _orgText = $.fn.text;
$.fn.text = function( str ) {
if ( typeof str != 'undefined' )
{
if ( this.data( 'dotdotdot' ) )
{
var temp = $( '<div />' );
temp.text( str );
str = temp.html();
temp.remove();
return this.trigger( 'update', [ str ] );
}
return _orgText.call( this, str );
}
return _orgText.call( this );
};
 
 
})( jQuery );
/branches/v0.3-aleaume/doc/PhpDoc/js/jquery.iviewer.min.js
New file
0,0 → 1,47
/*
* iviewer Widget for jQuery UI
* https://github.com/can3p/iviewer
*
* Copyright (c) 2009 - 2012 Dmitry Petrov
* Dual licensed under the MIT and GPL licenses.
* - http://www.opensource.org/licenses/mit-license.php
* - http://www.gnu.org/copyleft/gpl.html
*
* Author: Dmitry Petrov
* Version: 0.7.7
*/
(function($,undefined){var mouseEvents={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},gesturesSupport="ongesturestart"in document.createElement("div");function makeMouseEvent(event){var touch=event.originalEvent.changedTouches[0];return $.extend(event,{type:mouseEvents[event.type],which:1,pageX:touch.pageX,pageY:touch.pageY,screenX:touch.screenX,screenY:touch.screenY,clientX:touch.clientX,clientY:touch.clientY,isTouchEvent:true})}var mouseProto=$.ui.mouse.prototype,_mouseInit=$.ui.mouse.prototype._mouseInit;
mouseProto._mouseInit=function(){var self=this;self._touchActive=false;this.element.bind("touchstart."+this.widgetName,function(event){if(gesturesSupport&&event.originalEvent.touches.length>1)return;self._touchActive=true;return self._mouseDown(makeMouseEvent(event))});var self=this;this._mouseMoveDelegate=function(event){if(gesturesSupport&&event.originalEvent.touches&&event.originalEvent.touches.length>1)return;if(self._touchActive)return self._mouseMove(makeMouseEvent(event))};this._mouseUpDelegate=
function(event){if(self._touchActive){self._touchActive=false;return self._mouseUp(makeMouseEvent(event))}};$(document).bind("touchmove."+this.widgetName,this._mouseMoveDelegate).bind("touchend."+this.widgetName,this._mouseUpDelegate);_mouseInit.apply(this)};var setter=function(setter,getter){return function(val){if(arguments.length===0)return getter.apply(this);else setter.apply(this,arguments)}};var ieTransforms={"0":{marginLeft:0,marginTop:0,filter:'progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=0, M21=0, M22=1, SizingMethod="auto expand")'},
90:{marginLeft:-1,marginTop:1,filter:'progid:DXImageTransform.Microsoft.Matrix(M11=0, M12=-1, M21=1, M22=0, SizingMethod="auto expand")'},180:{marginLeft:0,marginTop:0,filter:'progid:DXImageTransform.Microsoft.Matrix(M11=-1, M12=0, M21=0, M22=-1, SizingMethod="auto expand")'},270:{marginLeft:-1,marginTop:1,filter:'progid:DXImageTransform.Microsoft.Matrix(M11=0, M12=1, M21=-1, M22=0, SizingMethod="auto expand")'}},useIeTransforms=function(){var el=document.createElement("div");el.style.cssText=["-ms-",
"",""].join("filter:blur(2px); ");return!!el.style.cssText&&document.documentMode<9}();$.widget("ui.iviewer",$.ui.mouse,{widgetEventPrefix:"iviewer",options:{zoom:"fit",zoom_base:100,zoom_max:800,zoom_min:25,zoom_delta:1.4,zoom_animation:true,ui_disabled:false,mousewheel:true,update_on_resize:true,onZoom:jQuery.noop,onAfterZoom:jQuery.noop,onStartDrag:jQuery.noop,onDrag:jQuery.noop,onStopDrag:jQuery.noop,onMouseMove:jQuery.noop,onClick:jQuery.noop,onStartLoad:null,onFinishLoad:null,onErrorLoad:null},
_create:function(){var me=this;this.dx=0;this.dy=0;this.img_object={};this.zoom_object={};this._angle=0;this.current_zoom=this.options.zoom;if(this.options.src===null)return;this.container=this.element;this._updateContainerInfo();this.container.css("overflow","hidden");if(this.options.update_on_resize==true)$(window).resize(function(){me.update()});this.img_object=new $.ui.iviewer.ImageObject(this.options.zoom_animation);if(this.options.mousewheel){this.container.bind("mousewheel.iviewer",function(ev,
delta){var zoom=delta>0?1:-1,container_offset=me.container.offset(),mouse_pos={x:ev.pageX-container_offset.left,y:ev.pageY-container_offset.top};me.zoom_by(zoom,mouse_pos);return false});if(gesturesSupport){var gestureThrottle=+new Date;var originalScale,originalCenter;this.img_object.object().bind("touchstart",function(ev){originalScale=me.current_zoom;var touches=ev.originalEvent.touches,container_offset;if(touches.length==2){container_offset=me.container.offset();originalCenter={x:(touches[0].pageX+
touches[1].pageX)/2-container_offset.left,y:(touches[0].pageY+touches[1].pageY)/2-container_offset.top}}else originalCenter=null}).bind("gesturechange",function(ev){var d=+new Date;if(d-gestureThrottle<50)return;gestureThrottle=d;var zoom=originalScale*ev.originalEvent.scale;me.set_zoom(zoom,originalCenter);ev.preventDefault()}).bind("gestureend",function(ev){originalCenter=null})}}this.img_object.object().click(function(e){return me._click(e)}).prependTo(this.container);this.container.bind("mousemove",
function(ev){me._handleMouseMove(ev)});this.loadImage(this.options.src);if(!this.options.ui_disabled)this.createui();this._mouseInit()},destroy:function(){$.Widget.prototype.destroy.call(this);this._mouseDestroy();this.img_object.object().remove();this.container.off(".iviewer");this.container.css("overflow","")},_updateContainerInfo:function(){this.options.height=this.container.height();this.options.width=this.container.width()},update:function(){this._updateContainerInfo();this.setCoords(this.img_object.x(),
this.img_object.y())},loadImage:function(src){this.current_zoom=this.options.zoom;var me=this;this._trigger("onStartLoad",0,src);this.container.addClass("iviewer_loading");this.img_object.load(src,function(){me._imageLoaded(src)},function(){me._trigger("onErrorLoad",0,src)})},_imageLoaded:function(src){this.container.removeClass("iviewer_loading");this.container.addClass("iviewer_cursor");if(this.options.zoom=="fit")this.fit(true);else this.set_zoom(this.options.zoom,true);this._trigger("onFinishLoad",
0,src)},fit:function(skip_animation){var aspect_ratio=this.img_object.orig_width()/this.img_object.orig_height();var window_ratio=this.options.width/this.options.height;var choose_left=aspect_ratio>window_ratio;var new_zoom=0;if(choose_left)new_zoom=this.options.width/this.img_object.orig_width()*100;else new_zoom=this.options.height/this.img_object.orig_height()*100;this.set_zoom(new_zoom,skip_animation)},center:function(){this.setCoords(-Math.round((this.img_object.display_width()-this.options.width)/
2),-Math.round((this.img_object.display_height()-this.options.height)/2))},moveTo:function(x,y){var dx=x-Math.round(this.options.width/2);var dy=y-Math.round(this.options.height/2);var new_x=this.img_object.x()-dx;var new_y=this.img_object.y()-dy;this.setCoords(new_x,new_y)},getContainerOffset:function(){return jQuery.extend({},this.container.offset())},setCoords:function(x,y){if(!this.img_object.loaded())return;var coords=this._correctCoords(x,y);this.img_object.x(coords.x);this.img_object.y(coords.y)},
_correctCoords:function(x,y){x=parseInt(x,10);y=parseInt(y,10);if(y>0)y=0;if(x>0)x=0;if(y+this.img_object.display_height()<this.options.height)y=this.options.height-this.img_object.display_height();if(x+this.img_object.display_width()<this.options.width)x=this.options.width-this.img_object.display_width();if(this.img_object.display_width()<=this.options.width)x=-(this.img_object.display_width()-this.options.width)/2;if(this.img_object.display_height()<=this.options.height)y=-(this.img_object.display_height()-
this.options.height)/2;return{x:x,y:y}},containerToImage:function(x,y){var coords={x:x-this.img_object.x(),y:y-this.img_object.y()};coords=this.img_object.toOriginalCoords(coords);return{x:util.descaleValue(coords.x,this.current_zoom),y:util.descaleValue(coords.y,this.current_zoom)}},imageToContainer:function(x,y){var coords={x:util.scaleValue(x,this.current_zoom),y:util.scaleValue(y,this.current_zoom)};return this.img_object.toRealCoords(coords)},_getMouseCoords:function(e){var containerOffset=this.container.offset();
coords=this.containerToImage(e.pageX-containerOffset.left,e.pageY-containerOffset.top);return coords},set_zoom:function(new_zoom,skip_animation,zoom_center){if(this._trigger("onZoom",0,new_zoom)==false)return;if(!this.img_object.loaded())return;zoom_center=zoom_center||{x:Math.round(this.options.width/2),y:Math.round(this.options.height/2)};if(new_zoom<this.options.zoom_min)new_zoom=this.options.zoom_min;else if(new_zoom>this.options.zoom_max)new_zoom=this.options.zoom_max;if(this.current_zoom=="fit"){var old_x=
zoom_center.x+Math.round(this.img_object.orig_width()/2);var old_y=zoom_center.y+Math.round(this.img_object.orig_height()/2);this.current_zoom=100}else{var old_x=-this.img_object.x()+zoom_center.x;var old_y=-this.img_object.y()+zoom_center.y}var new_width=util.scaleValue(this.img_object.orig_width(),new_zoom);var new_height=util.scaleValue(this.img_object.orig_height(),new_zoom);var new_x=util.scaleValue(util.descaleValue(old_x,this.current_zoom),new_zoom);var new_y=util.scaleValue(util.descaleValue(old_y,
this.current_zoom),new_zoom);new_x=zoom_center.x-new_x;new_y=zoom_center.y-new_y;new_width=Math.floor(new_width);new_height=Math.floor(new_height);new_x=Math.floor(new_x);new_y=Math.floor(new_y);this.img_object.display_width(new_width);this.img_object.display_height(new_height);var coords=this._correctCoords(new_x,new_y),self=this;this.img_object.setImageProps(new_width,new_height,coords.x,coords.y,skip_animation,function(){self._trigger("onAfterZoom",0,new_zoom)});this.current_zoom=new_zoom;this.update_status()},
zoom_by:function(delta,zoom_center){var closest_rate=this.find_closest_zoom_rate(this.current_zoom);var next_rate=closest_rate+delta;var next_zoom=this.options.zoom_base*Math.pow(this.options.zoom_delta,next_rate);if(delta>0&&next_zoom<this.current_zoom)next_zoom*=this.options.zoom_delta;if(delta<0&&next_zoom>this.current_zoom)next_zoom/=this.options.zoom_delta;this.set_zoom(next_zoom,undefined,zoom_center)},angle:function(deg,abs){if(arguments.length===0)return this.img_object.angle();if(deg<-270||
deg>270||deg%90!==0)return;if(!abs)deg+=this.img_object.angle();if(deg<0)deg+=360;if(deg>=360)deg-=360;if(deg===this.img_object.angle())return;this.img_object.angle(deg);this.center();this._trigger("angle",0,{angle:this.img_object.angle()})},find_closest_zoom_rate:function(value){if(value==this.options.zoom_base)return 0;function div(val1,val2){return val1/val2}function mul(val1,val2){return val1*val2}var func=value>this.options.zoom_base?mul:div;var sgn=value>this.options.zoom_base?1:-1;var mltplr=
this.options.zoom_delta;var rate=1;while(Math.abs(func(this.options.zoom_base,Math.pow(mltplr,rate))-value)>Math.abs(func(this.options.zoom_base,Math.pow(mltplr,rate+1))-value))rate++;return sgn*rate},update_status:function(){if(!this.options.ui_disabled){var percent=Math.round(100*this.img_object.display_height()/this.img_object.orig_height());if(percent)this.zoom_object.html(percent+"%")}},info:function(param,withoutRotation){if(!param)return;switch(param){case "orig_width":case "orig_height":if(withoutRotation)return this.img_object.angle()%
180===0?this.img_object[param]():param==="orig_width"?this.img_object.orig_height():this.img_object.orig_width();else return this.img_object[param]();case "display_width":case "display_height":case "angle":return this.img_object[param]();case "zoom":return this.current_zoom;case "src":return this.img_object.object().attr("src");case "coords":return{x:this.img_object.x(),y:this.img_object.y()}}},_mouseStart:function(e){$.ui.mouse.prototype._mouseStart.call(this,e);if(this._trigger("onStartDrag",0,
this._getMouseCoords(e))===false)return false;this.container.addClass("iviewer_drag_cursor");this._dragInitialized=!(e.originalEvent.changedTouches&&e.originalEvent.changedTouches.length==1);this.dx=e.pageX-this.img_object.x();this.dy=e.pageY-this.img_object.y();return true},_mouseCapture:function(e){return true},_handleMouseMove:function(e){this._trigger("onMouseMove",e,this._getMouseCoords(e))},_mouseDrag:function(e){$.ui.mouse.prototype._mouseDrag.call(this,e);if(!this._dragInitialized){this.dx=
e.pageX-this.img_object.x();this.dy=e.pageY-this.img_object.y();this._dragInitialized=true}var ltop=e.pageY-this.dy;var lleft=e.pageX-this.dx;this.setCoords(lleft,ltop);this._trigger("onDrag",e,this._getMouseCoords(e));return false},_mouseStop:function(e){$.ui.mouse.prototype._mouseStop.call(this,e);this.container.removeClass("iviewer_drag_cursor");this._trigger("onStopDrag",0,this._getMouseCoords(e))},_click:function(e){this._trigger("onClick",0,this._getMouseCoords(e))},createui:function(){var me=
this;$("<div>",{"class":"iviewer_zoom_in iviewer_common iviewer_button"}).bind("mousedown touchstart",function(){me.zoom_by(1);return false}).appendTo(this.container);$("<div>",{"class":"iviewer_zoom_out iviewer_common iviewer_button"}).bind("mousedown touchstart",function(){me.zoom_by(-1);return false}).appendTo(this.container);$("<div>",{"class":"iviewer_zoom_zero iviewer_common iviewer_button"}).bind("mousedown touchstart",function(){me.set_zoom(100);return false}).appendTo(this.container);$("<div>",
{"class":"iviewer_zoom_fit iviewer_common iviewer_button"}).bind("mousedown touchstart",function(){me.fit(this);return false}).appendTo(this.container);this.zoom_object=$("<div>").addClass("iviewer_zoom_status iviewer_common").appendTo(this.container);$("<div>",{"class":"iviewer_rotate_left iviewer_common iviewer_button"}).bind("mousedown touchstart",function(){me.angle(-90);return false}).appendTo(this.container);$("<div>",{"class":"iviewer_rotate_right iviewer_common iviewer_button"}).bind("mousedown touchstart",
function(){me.angle(90);return false}).appendTo(this.container);this.update_status()}});$.ui.iviewer.ImageObject=function(do_anim){this._img=$("<img>").css({position:"absolute",top:"0px",left:"0px"});this._loaded=false;this._swapDimensions=false;this._do_anim=do_anim||false;this.x(0,true);this.y(0,true);this.angle(0)};(function(){this._reset=function(w,h){this._angle=0;this._swapDimensions=false;this.x(0);this.y(0);this.orig_width(w);this.orig_height(h);this.display_width(w);this.display_height(h)};
this.loaded=function(){return this._loaded};this.load=function(src,loaded,error){var self=this;loaded=loaded||jQuery.noop;this._loaded=false;var img=new Image;img.onload=function(){self._loaded=true;self._reset(this.width,this.height);self._img.removeAttr("width").removeAttr("height").removeAttr("style").css({position:"absolute",top:"0px",left:"0px",maxWidth:"none"});self._img[0].src=src;loaded()};img.onerror=error;setTimeout(function(){img.src=src},0);this.angle(0)};this._dimension=function(prefix,
name){var horiz="_"+prefix+"_"+name,vert="_"+prefix+"_"+(name==="height"?"width":"height");return setter(function(val){this[this._swapDimensions?horiz:vert]=val},function(){return this[this._swapDimensions?horiz:vert]})};this.display_width=this._dimension("display","width"),this.display_height=this._dimension("display","height"),this.display_diff=function(){return Math.floor(this.display_width()-this.display_height())};this.orig_width=this._dimension("orig","width"),this.orig_height=this._dimension("orig",
"height"),this.x=setter(function(val,skipCss){this._x=val;if(!skipCss){this._finishAnimation();this._img.css("left",this._x+(this._swapDimensions?this.display_diff()/2:0)+"px")}},function(){return this._x});this.y=setter(function(val,skipCss){this._y=val;if(!skipCss){this._finishAnimation();this._img.css("top",this._y-(this._swapDimensions?this.display_diff()/2:0)+"px")}},function(){return this._y});this.angle=setter(function(deg){var prevSwap=this._swapDimensions;this._angle=deg;this._swapDimensions=
deg%180!==0;if(prevSwap!==this._swapDimensions){var verticalMod=this._swapDimensions?-1:1;this.x(this.x()-verticalMod*this.display_diff()/2,true);this.y(this.y()+verticalMod*this.display_diff()/2,true)}var cssVal="rotate("+deg+"deg)",img=this._img;jQuery.each(["","-webkit-","-moz-","-o-","-ms-"],function(i,prefix){img.css(prefix+"transform",cssVal)});if(useIeTransforms){jQuery.each(["-ms-",""],function(i,prefix){img.css(prefix+"filter",ieTransforms[deg].filter)});img.css({marginLeft:ieTransforms[deg].marginLeft*
this.display_diff()/2,marginTop:ieTransforms[deg].marginTop*this.display_diff()/2})}},function(){return this._angle});this.toOriginalCoords=function(point){switch(this.angle()){case 0:return{x:point.x,y:point.y};case 90:return{x:point.y,y:this.display_width()-point.x};case 180:return{x:this.display_width()-point.x,y:this.display_height()-point.y};case 270:return{x:this.display_height()-point.y,y:point.x}}};this.toRealCoords=function(point){switch(this.angle()){case 0:return{x:this.x()+point.x,y:this.y()+
point.y};case 90:return{x:this.x()+this.display_width()-point.y,y:this.y()+point.x};case 180:return{x:this.x()+this.display_width()-point.x,y:this.y()+this.display_height()-point.y};case 270:return{x:this.x()+point.y,y:this.y()+this.display_height()-point.x}}};this.object=setter(jQuery.noop,function(){return this._img});this.setImageProps=function(disp_w,disp_h,x,y,skip_animation,complete){complete=complete||jQuery.noop;this.display_width(disp_w);this.display_height(disp_h);this.x(x,true);this.y(y,
true);var w=this._swapDimensions?disp_h:disp_w;var h=this._swapDimensions?disp_w:disp_h;var params={width:w,height:h,top:y-(this._swapDimensions?this.display_diff()/2:0)+"px",left:x+(this._swapDimensions?this.display_diff()/2:0)+"px"};if(useIeTransforms)jQuery.extend(params,{marginLeft:ieTransforms[this.angle()].marginLeft*this.display_diff()/2,marginTop:ieTransforms[this.angle()].marginTop*this.display_diff()/2});var swapDims=this._swapDimensions,img=this._img;if(useIeTransforms&&swapDims){var ieh=
this._img.width(),iew=this._img.height(),iedh=params.height-ieh;iedw=params.width-iew;delete params.width;delete params.height}if(this._do_anim&&!skip_animation)this._img.stop(true).animate(params,{duration:200,complete:complete,step:function(now,fx){if(useIeTransforms&&swapDims&&fx.prop==="top"){var percent=(now-fx.start)/(fx.end-fx.start);img.height(ieh+iedh*percent);img.width(iew+iedw*percent);img.css("top",now)}}});else{this._img.css(params);setTimeout(complete,0)}};this._finishAnimation=function(){this._img.stop(true,
true)}}).apply($.ui.iviewer.ImageObject.prototype);var util={scaleValue:function(value,toZoom){return value*toZoom/100},descaleValue:function(value,fromZoom){return value*100/fromZoom}}})(jQuery,undefined);
/branches/v0.3-aleaume/doc/PhpDoc/js/jquery.dotdotdot-1.5.9.min.js
New file
0,0 → 1,15
/*
* jQuery dotdotdot 1.5.9
*
* Copyright (c) 2013 Fred Heusschen
* www.frebsite.nl
*
* Plugin website:
* dotdotdot.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
 
(function(a){function c(a,b,c){var d=a.children(),e=!1;a.empty();for(var g=0,h=d.length;h>g;g++){var i=d.eq(g);if(a.append(i),c&&a.append(c),f(a,b)){i.remove(),e=!0;break}c&&c.remove()}return e}function d(b,c,g,h,i){var j=b.contents(),k=!1;b.empty();for(var l="table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, select, optgroup, option, textarea, script, style",m=0,n=j.length;n>m&&!k;m++){var o=j[m],p=a(o);void 0!==o&&(b.append(p),i&&b[b.is(l)?"after":"append"](i),3==o.nodeType?f(g,h)&&(k=e(p,c,g,h,i)):k=d(p,c,g,h,i),k||i&&i.remove())}return k}function e(a,b,c,d,h){var k=!1,l=a[0];if(l===void 0)return!1;for(var m="letter"==d.wrap?"":" ",n=j(l).split(m),o=-1,p=-1,q=0,r=n.length-1;r>=q;){var s=Math.floor((q+r)/2);if(s==p)break;p=s,i(l,n.slice(0,p+1).join(m)+d.ellipsis),f(c,d)?r=p:(o=p,q=p)}if(-1==o||1==n.length&&0==n[0].length){var u=a.parent();a.remove();var v=h?h.length:0;if(u.contents().size()>v){var w=u.contents().eq(-1-v);k=e(w,b,c,d,h)}else{var x=u.prev(),l=x.contents().eq(-1)[0];if(l!==void 0){var t=g(j(l),d);i(l,t),h&&x.append(h),u.remove(),k=!0}}}else{var t=g(n.slice(0,o+1).join(m),d);k=!0,i(l,t)}return k}function f(a,b){return a.innerHeight()>b.maxHeight}function g(b,c){for(;a.inArray(b.slice(-1),c.lastCharacter.remove)>-1;)b=b.slice(0,-1);return 0>a.inArray(b.slice(-1),c.lastCharacter.noEllipsis)&&(b+=c.ellipsis),b}function h(a){return{width:a.innerWidth(),height:a.innerHeight()}}function i(a,b){a.innerText?a.innerText=b:a.nodeValue?a.nodeValue=b:a.textContent&&(a.textContent=b)}function j(a){return a.innerText?a.innerText:a.nodeValue?a.nodeValue:a.textContent?a.textContent:""}function k(b,c){return b===void 0?!1:b?"string"==typeof b?(b=a(b,c),b.length?b:!1):"object"==typeof b?b.jquery===void 0?!1:b:!1:!1}function l(a){for(var b=a.innerHeight(),c=["paddingTop","paddingBottom"],d=0,e=c.length;e>d;d++){var f=parseInt(a.css(c[d]),10);isNaN(f)&&(f=0),b-=f}return b}function m(a,b){return a?(b="string"==typeof b?"dotdotdot: "+b:["dotdotdot:",b],window.console!==void 0&&window.console.log!==void 0&&window.console.log(b),!1):!1}if(!a.fn.dotdotdot){a.fn.dotdotdot=function(e){if(0==this.length)return e&&e.debug===!1||m(!0,'No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){a(this).dotdotdot(e)});var g=this;g.data("dotdotdot")&&g.trigger("destroy.dot"),g.data("dotdotdot-style",g.attr("style")),g.css("word-wrap","break-word"),g.bind_events=function(){return g.bind("update.dot",function(b,e){b.preventDefault(),b.stopPropagation(),j.maxHeight="number"==typeof j.height?j.height:l(g),j.maxHeight+=j.tolerance,e!==void 0&&(("string"==typeof e||e instanceof HTMLElement)&&(e=a("<div />").append(e).contents()),e instanceof a&&(i=e)),q=g.wrapInner('<div class="dotdotdot" />').children(),q.empty().append(i.clone(!0)).css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var h=!1,k=!1;return n.afterElement&&(h=n.afterElement.clone(!0),n.afterElement.remove()),f(q,j)&&(k="children"==j.wrap?c(q,j,h):d(q,g,q,j,h)),q.replaceWith(q.contents()),q=null,a.isFunction(j.callback)&&j.callback.call(g[0],k,i),n.isTruncated=k,k}).bind("isTruncated.dot",function(a,b){return a.preventDefault(),a.stopPropagation(),"function"==typeof b&&b.call(g[0],n.isTruncated),n.isTruncated}).bind("originalContent.dot",function(a,b){return a.preventDefault(),a.stopPropagation(),"function"==typeof b&&b.call(g[0],i),i}).bind("destroy.dot",function(a){a.preventDefault(),a.stopPropagation(),g.unwatch().unbind_events().empty().append(i).attr("style",g.data("dotdotdot-style")).data("dotdotdot",!1)}),g},g.unbind_events=function(){return g.unbind(".dot"),g},g.watch=function(){if(g.unwatch(),"window"==j.watch){var b=a(window),c=b.width(),d=b.height();b.bind("resize.dot"+n.dotId,function(){c==b.width()&&d==b.height()&&j.windowResizeFix||(c=b.width(),d=b.height(),p&&clearInterval(p),p=setTimeout(function(){g.trigger("update.dot")},10))})}else o=h(g),p=setInterval(function(){var a=h(g);(o.width!=a.width||o.height!=a.height)&&(g.trigger("update.dot"),o=h(g))},100);return g},g.unwatch=function(){return a(window).unbind("resize.dot"+n.dotId),p&&clearInterval(p),g};var i=g.contents(),j=a.extend(!0,{},a.fn.dotdotdot.defaults,e),n={},o={},p=null,q=null;return n.afterElement=k(j.after,g),n.isTruncated=!1,n.dotId=b++,g.data("dotdotdot",!0).bind_events().trigger("update.dot"),j.watch&&g.watch(),g},a.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",lastCharacter:{remove:[" ",",",";",".","!","?"],noEllipsis:[]},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0,debug:!1};var b=1,n=a.fn.html;a.fn.html=function(a){return a!==void 0?this.data("dotdotdot")&&"function"!=typeof a?this.trigger("update",[a]):n.call(this,a):n.call(this)};var o=a.fn.text;a.fn.text=function(b){if(b!==void 0){if(this.data("dotdotdot")){var c=a("<div />");return c.text(b),b=c.html(),c.remove(),this.trigger("update",[b])}return o.call(this,b)}return o.call(this)}}})(jQuery);
/branches/v0.3-aleaume/doc/PhpDoc/js/prism.min.js
New file
0,0 → 1,16
/**
* Prism: Lightweight, robust, elegant syntax highlighting
* MIT license http://www.opensource.org/licenses/mit-license.php/
* @author Lea Verou http://lea.verou.me
*/(function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.util.clone(e[i]));return r;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var r=t.util.clone(t.languages[e]);for(var i in n)r[i]=n[i];return r},insertBefore:function(e,n,r,i){i=i||t.languages;var s=i[e],o={};for(var u in s)if(s.hasOwnProperty(u)){if(u==n)for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);o[u]=s[u]}return i[e]=o},DFS:function(e,n){for(var r in e){n.call(e,r,e[r]);t.util.type(e)==="Object"&&t.languages.DFS(e[r],n)}}},highlightAll:function(e,n){var r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');for(var i=0,s;s=r[i++];)t.highlightElement(s,e===!0,n)},highlightElement:function(r,i,s){var o,u,a=r;while(a&&!e.test(a.className))a=a.parentNode;if(a){o=(a.className.match(e)||[,""])[1];u=t.languages[o]}if(!u)return;r.className=r.className.replace(e,"").replace(/\s+/g," ")+" language-"+o;a=r.parentNode;/pre/i.test(a.nodeName)&&(a.className=a.className.replace(e,"").replace(/\s+/g," ")+" language-"+o);var f=r.textContent;if(!f)return;f=f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ");var l={element:r,language:o,grammar:u,code:f};t.hooks.run("before-highlight",l);if(i&&self.Worker){var c=new Worker(t.filename);c.onmessage=function(e){l.highlightedCode=n.stringify(JSON.parse(e.data),o);t.hooks.run("before-insert",l);l.element.innerHTML=l.highlightedCode;s&&s.call(l.element);t.hooks.run("after-highlight",l)};c.postMessage(JSON.stringify({language:l.language,code:l.code}))}else{l.highlightedCode=t.highlight(l.code,l.grammar,l.language);t.hooks.run("before-insert",l);l.element.innerHTML=l.highlightedCode;s&&s.call(r);t.hooks.run("after-highlight",l)}},highlight:function(e,r,i){return n.stringify(t.tokenize(e,r),i)},tokenize:function(e,n,r){var i=t.Token,s=[e],o=n.rest;if(o){for(var u in o)n[u]=o[u];delete n.rest}e:for(var u in n){if(!n.hasOwnProperty(u)||!n[u])continue;var a=n[u],f=a.inside,l=!!a.lookbehind,c=0;a=a.pattern||a;for(var h=0;h<s.length;h++){var p=s[h];if(s.length>e.length)break e;if(p instanceof i)continue;a.lastIndex=0;var d=a.exec(p);if(d){l&&(c=d[1].length);var v=d.index-1+c,d=d[0].slice(c),m=d.length,g=v+m,y=p.slice(0,v+1),b=p.slice(g+1),w=[h,1];y&&w.push(y);var E=new i(u,f?t.tokenize(d,f):d);w.push(E);b&&w.push(b);Array.prototype.splice.apply(s,w)}}}return s},hooks:{all:{},add:function(e,n){var r=t.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.hooks.all[e];if(!r||!r.length)return;for(var i=0,s;s=r[i++];)s(n)}}},n=t.Token=function(e,t){this.type=e;this.content=t};n.stringify=function(e,r,i){if(typeof e=="string")return e;if(Object.prototype.toString.call(e)=="[object Array]")return e.map(function(t){return n.stringify(t,r,e)}).join("");var s={type:e.type,content:n.stringify(e.content,r,i),tag:"span",classes:["token",e.type],attributes:{},language:r,parent:i};s.type=="comment"&&(s.attributes.spellcheck="true");t.hooks.run("wrap",s);var o="";for(var u in s.attributes)o+=u+'="'+(s.attributes[u]||"")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'" '+o+">"+s.content+"</"+s.tag+">"};if(!self.document){self.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,i=n.code;self.postMessage(JSON.stringify(t.tokenize(i,t.languages[r])));self.close()},!1);return}var r=document.getElementsByTagName("script");r=r[r.length-1];if(r){t.filename=r.src;document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)}})();;
Prism.languages.markup={comment:/&lt;!--[\w\W]*?-->/g,prolog:/&lt;\?.+?\?>/,doctype:/&lt;!DOCTYPE.+?>/,cdata:/&lt;!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/&lt;\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|\w+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^&lt;\/?[\w:-]+/i,inside:{punctuation:/^&lt;\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/&amp;#?[\da-z]{1,8};/gi};Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))});;
Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/ig,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,ignore:/&(lt|gt|amp);/gi,punctuation:/[\{\};:]/g};Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{style:{pattern:/(&lt;|<)style[\w\W]*?(>|&gt;)[\w\W]*?(&lt;|<)\/style(>|&gt;)/ig,inside:{tag:{pattern:/(&lt;|<)style[\w\W]*?(>|&gt;)|(&lt;|<)\/style(>|&gt;)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.css}}});;
Prism.languages.css.selector={pattern:/[^\{\}\s][^\{\}]*(?=\s*\{)/g,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/g,"pseudo-class":/:[-\w]+(?:\(.*\))?/g,"class":/\.[-:\.\w]+/g,id:/#[-:\.\w]+/g}};Prism.languages.insertBefore("css","ignore",{hexcode:/#[\da-f]{3,6}/gi,entity:/\\[\da-f]{1,8}/gi,number:/[\d%\.]+/g,"function":/(attr|calc|cross-fade|cycle|element|hsla?|image|lang|linear-gradient|matrix3d|matrix|perspective|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|rgba?|rotatex|rotatey|rotatez|rotate3d|rotate|scalex|scaley|scalez|scale3d|scale|skewx|skewy|skew|steps|translatex|translatey|translatez|translate3d|translate|url|var)/ig});;
Prism.languages.clike={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|(^|[^:])\/\/.*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,"class-name":{pattern:/((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/ig,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,"function":{pattern:/[a-z0-9_]+\(/ig,inside:{punctuation:/\(/}}, number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|!|&lt;=?|>=?|={1,3}|(&amp;){1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};;
Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(var|let|if|else|while|do|for|return|in|instanceof|function|new|with|typeof|try|catch|finally|null|break|continue)\b/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g});Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}});Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(&lt;|<)script[\w\W]*?(>|&gt;)[\w\W]*?(&lt;|<)\/script(>|&gt;)/ig,inside:{tag:{pattern:/(&lt;|<)script[\w\W]*?(>|&gt;)|(&lt;|<)\/script(>|&gt;)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.javascript}}});;
Prism.languages.php=Prism.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|extends|private|protected|parent|static|throw|null|echo|print|trait|namespace|use|final|yield|goto|instanceof|finally|try|catch)\b/ig, constant:/\b[A-Z0-9_]{2,}\b/g});Prism.languages.insertBefore("php","keyword",{delimiter:/(\?>|&lt;\?php|&lt;\?)/ig,variable:/(\$\w+)\b/ig,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/g,lookbehind:!0,inside:{punctuation:/\\/}}});Prism.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/g,lookbehind:!0}}); Prism.languages.markup&&(Prism.hooks.add("before-highlight",function(a){"php"===a.language&&(a.tokenStack=[],a.code=a.code.replace(/(?:&lt;\?php|&lt;\?|<\?php|<\?)[\w\W]*?(?:\?&gt;|\?>)/ig,function(b){a.tokenStack.push(b);return"{{{PHP"+a.tokenStack.length+"}}}"}))}),Prism.hooks.add("after-highlight",function(a){if("php"===a.language){for(var b=0,c;c=a.tokenStack[b];b++)a.highlightedCode=a.highlightedCode.replace("{{{PHP"+(b+1)+"}}}",Prism.highlight(c,a.grammar,"php"));a.element.innerHTML=a.highlightedCode}}), Prism.hooks.add("wrap",function(a){"php"===a.language&&"markup"===a.type&&(a.content=a.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'<span class="token php">$1</span>'))}),Prism.languages.insertBefore("php","comment",{markup:{pattern:/(&lt;|<)[^?]\/?(.*?)(>|&gt;)/g,inside:Prism.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/g}));;
Prism.languages.insertBefore("php","variable",{"this":/\$this/g,global:/\$_?(GLOBALS|SERVER|GET|POST|FILES|REQUEST|SESSION|ENV|COOKIE|HTTP_RAW_POST_DATA|argc|argv|php_errormsg|http_response_header)/g,scope:{pattern:/\b[\w\\]+::/g,inside:{keyword:/(static|self|parent)/,punctuation:/(::|\\)/}}});;
(function(){function e(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function n(e,t,n){var r=t.replace(/\s+/g,"").split(","),i=+e.getAttribute("data-line-offset")||0,s=parseFloat(getComputedStyle(e).lineHeight);for(var o=0,u;u=r[o++];){u=u.split("-");var a=+u[0],f=+u[1]||a,l=document.createElement("div");l.textContent=Array(f-a+2).join(" \r\n");l.className=(n||"")+" line-highlight";l.setAttribute("data-start",a);f>a&&l.setAttribute("data-end",f);l.style.top=(a-i-1)*s+"px";(e.querySelector("code")||e).appendChild(l)}}function r(){var t=location.hash.slice(1);e(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var r=(t.match(/\.([\d,-]+)$/)||[,""])[1];if(!r||document.getElementById(t))return;var i=t.slice(0,t.lastIndexOf(".")),s=document.getElementById(i);if(!s)return;s.hasAttribute("data-line")||s.setAttribute("data-line","");n(s,r,"temporary ");document.querySelector(".temporary.line-highlight").scrollIntoView()}if(!window.Prism)return;var t=crlf=/\r?\n|\r/g,i=0;Prism.hooks.add("after-highlight",function(t){var s=t.element.parentNode,o=s&&s.getAttribute("data-line");if(!s||!o||!/pre/i.test(s.nodeName))return;clearTimeout(i);e(".line-highlight",s).forEach(function(e){e.parentNode.removeChild(e)});n(s,o);i=setTimeout(r,1)});addEventListener("hashchange",r)})();;
Prism.hooks.add("after-highlight",function(e){var t=e.element.parentNode;if(!t||!/pre/i.test(t.nodeName)||t.className.indexOf("line-numbers")===-1){return}var n=1+e.code.split("\n").length;var r;lines=new Array(n);lines=lines.join("<span></span>");r=document.createElement("span");r.className="line-numbers-rows";r.innerHTML=lines;if(t.hasAttribute("data-start")){t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)}e.element.appendChild(r)})
;
(function(){if(!self.Prism||!self.document||!document.querySelector)return;var e={js:"javascript",html:"markup",svg:"markup"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(t){var n=t.getAttribute("data-src"),r=(n.match(/\.(\w+)$/)||[,""])[1],i=e[r]||r,s=document.createElement("code");s.className="language-"+i;t.textContent="";s.textContent="Loading…";t.appendChild(s);var o=new XMLHttpRequest;o.open("GET",n,!0);o.onreadystatechange=function(){if(o.readyState==4)if(o.status<400&&o.responseText){s.textContent=o.responseText;Prism.highlightElement(s)}else o.status>=400?s.textContent="✖ Error "+o.status+" while fetching file: "+o.statusText:s.textContent="✖ Error: File does not exist or is empty"};o.send(null)})})();;
/branches/v0.3-aleaume/doc/PhpDoc/js/jquery.smooth-scroll.js
New file
0,0 → 1,32
$(document).ready(function() {
function filterPath(string) {
return string
.replace(/^\//,'')
.replace(/(index|default).[a-zA-Z]{3,4}$/,'')
.replace(/\/$/,'');
}
var locationPath = filterPath(location.pathname);
 
$('a[href*=#]').each(function() {
var thisPath = filterPath(this.pathname) || locationPath;
if ( locationPath == thisPath
&& (location.hostname == this.hostname || !this.hostname)
&& this.hash.replace(/#/,'') ) {
var $target = $(this.hash), target = this.hash;
if (target) {
$(this).click(function(event) {
if (!$(this.hash).offset()) {
return;
}
 
event.preventDefault();
position = $(this.hash).offset().top;
 
$('html,body').animate({scrollTop: position}, 400, function() {
location.hash = target;
});
});
}
}
});
});
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-98/phpdoc-cache-file_dd77e54ff89c835ae0f416f4edab9c35.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-98/phpdoc-cache-file_dd77e54ff89c835ae0f416f4edab9c35.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-b0/phpdoc-cache-file_e58b2c25bb3f22169e34a0eefaf424eb.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-b0/phpdoc-cache-file_e58b2c25bb3f22169e34a0eefaf424eb.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-0c/phpdoc-cache-file_2115f90b0e81f12bc4ef706e92d8ffc1.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-0c/phpdoc-cache-file_2115f90b0e81f12bc4ef706e92d8ffc1.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-0d/phpdoc-cache-file_f90d35be0c8f3486d33aac180b8d39a1.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-0d/phpdoc-cache-file_f90d35be0c8f3486d33aac180b8d39a1.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/namespaces/default.html
New file
0,0 → 1,433
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-271129899"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-271129899" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content namespace">
<nav>
</nav>
<h1><small></small>\</h1>
 
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Url.html">Url</a></td>
<td><em>Classe Url, gérant le découpage des paramètres, leurs modification etc.</em></td>
</tr>
<tr>
<td><a href="../classes/Debug.html">Debug</a></td>
<td><em>Classe fournissant des fonctions de débogage équivalante à var_dump et print_r.</em></td>
</tr>
<tr>
<td><a href="../classes/Chronometre.html">Chronometre</a></td>
<td><em>Chronometre permet de stocker et d&#039;afficher les temps d&#039;éxécution de script.</em></td>
</tr>
<tr>
<td><a href="../classes/RestServeur.html">RestServeur</a></td>
<td><em>Classe principale gérant les services web de type (@link(REST, http://fr.wikipedia.org/wiki/Rest).</em></td>
</tr>
<tr>
<td><a href="../classes/SquelettePhp.html">SquelettePhp</a></td>
<td><em>Classe SquelettePhp, traitant les squelette Php utilisant la syntaxe courte php ou pas.</em></td>
</tr>
<tr>
<td><a href="../classes/Controleur.html">Controleur</a></td>
<td><em>Classe Controleur, coeur d&#039;une application, c&#039;est normalement la seule classe d&#039;une application
qui devrait être appelée de l&#039;extérieur.</em></td>
</tr>
<tr>
<td><a href="../classes/Cache.html">Cache</a></td>
<td><em>Classe Cache permettant de mettre en cache des données.</em></td>
</tr>
<tr>
<td><a href="../classes/RestClient.html">RestClient</a></td>
<td><em>Classe client permettant d&#039;interroger des services web REST.</em></td>
</tr>
<tr>
<td><a href="../classes/GestionnaireException.html">GestionnaireException</a></td>
<td><em>Classe de gestion des exceptions.</em></td>
</tr>
<tr>
<td><a href="../classes/Script.html">Script</a></td>
<td><em>Script est une classe abstraite qui doit être implémenté par les classes éxecutant des scripts en ligne de commande.</em></td>
</tr>
<tr>
<td><a href="../classes/Registre.html">Registre</a></td>
<td><em>Classe Registre, qui permet un accès à différentes variables et paramètres à travers les autres classes.</em></td>
</tr>
<tr>
<td><a href="../classes/RestService.html">RestService</a></td>
<td><em>Classe principale gérant les services.</em></td>
</tr>
<tr>
<td><a href="../classes/Cli.html">Cli</a></td>
<td><em>CLI permet de récupérer les paramètres passés en ligne de commande pour instancier une classe héritant de la classe abstraite
Script.</em></td>
</tr>
<tr>
<td><a href="../classes/Encodage.html">Encodage</a></td>
<td><em>Classe fournissant des méthodes statiques concernant l&#039;encodage et le décodage des caractères de variable.</em></td>
</tr>
<tr>
<td><a href="../classes/Tableau.html">Tableau</a></td>
<td><em>Classe fournissant des méthodes statiques de manipulation des tableaux (Array).</em></td>
</tr>
<tr>
<td><a href="../classes/Pattern.html">Pattern</a></td>
<td><em>Classe fournissant des constantes correspondant à des expressions régulières de vérification très courrantes.</em></td>
</tr>
<tr>
<td><a href="../classes/Chaine.html">Chaine</a></td>
<td><em>Classe fournissant des méthodes statiques de manipulation des chaînes de caractères (String).</em></td>
</tr>
<tr>
<td><a href="../classes/Fichier.html">Fichier</a></td>
<td><em>Classe fournissant des méthodes statiques de manipulation des fichiers.</em></td>
</tr>
<tr>
<td><a href="../classes/I18n.html">I18n</a></td>
<td><em>I18n permet de traduire une application à partir de données stockées dans des fichiers ini.</em></td>
</tr>
<tr>
<td><a href="../classes/Config.html">Config</a></td>
<td><em>Config permet de charger automatiquement les fichiers ini du Framework et de l&#039;application.</em></td>
</tr>
<tr>
<td><a href="../classes/CacheSqlite.html">CacheSqlite</a></td>
<td><em></em></td>
</tr>
<tr>
<td><a href="../classes/Bdd.html">Bdd</a></td>
<td><em>Classe Bdd, d&#039;accés au base de données.</em></td>
</tr>
<tr>
<td><a href="../classes/Log.html">Log</a></td>
<td><em>Classe permettant de logger des messages dans les fichier situés dans le dossier de log.</em></td>
</tr>
<tr>
<td><a href="../classes/CacheFichier.html">CacheFichier</a></td>
<td><em></em></td>
</tr>
<tr>
<td><a href="../classes/Framework.html">Framework</a></td>
<td><em>Classe de base du Framework :
- fournissant des infos sur l&#039;application,
- paramétrant l&#039;environnement de l&#039;appli et du framework,
- réalisant des traitements sur les variables globales ($_GET, $_POST, $_COOKIE.</em></td>
</tr>
<tr>
<td><a href="../classes/CacheSimple.html">CacheSimple</a></td>
<td><em>Classe Cache permettant de mettre en cache des données de façon extremement simple.</em></td>
</tr>
</table>
</div>
 
<aside class="span4 detailsbar">
<dl>
<dt>Namespace hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\</div>
</dd>
</dl>
</aside>
</div>
 
<div class="row-fluid">
<section class="span8 content namespace">
<h2>Constants</h2>
</section>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_DS" name="constant_DS" class="anchor"></a>
<article id="constant_DS" class="constant">
<h3 class="">DS</h3>
<pre class="signature">DS</pre>
<p><em>Redéfinition de la constante DIRECTORY_SEPARATOR en version abrégée DS</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_PS" name="constant_PS" class="anchor"></a>
<article id="constant_PS" class="constant">
<h3 class="">PS</h3>
<pre class="signature">PS</pre>
<p><em>Redéfinition de la constante PATH_SEPARATOR en version abrégée PS</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<section class="span8 content namespace">
<h2>Functions</h2>
</section>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyerSlashProfond" name="method_nettoyerSlashProfond" class="anchor"></a>
<article class="method">
<h3 class=" ">nettoyerSlashProfond()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyerSlashProfond( <span class="argument">$valeur</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$valeur</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-f0/phpdoc-cache-file_19fba3fd5f6df8a705d3aef2a9c12310.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-f0/phpdoc-cache-file_19fba3fd5f6df8a705d3aef2a9c12310.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-2e/phpdoc-cache-settings.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-2e/phpdoc-cache-settings.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-f5/phpdoc-cache-file_f503dc934ce8ca1b9cd46ef44f1dd267.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-f5/phpdoc-cache-file_f503dc934ce8ca1b9cd46ef44f1dd267.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-d9/phpdoc-cache-file_b3f0e6492d633f3fac64cdbc534eaa5d.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-d9/phpdoc-cache-file_b3f0e6492d633f3fac64cdbc534eaa5d.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/css/jquery.iviewer.css
New file
0,0 → 1,65
.viewer {
-ms-touch-action: none;
}
 
.iviewer_common {
position:absolute;
bottom:10px;
border: 1px solid #000;
height: 28px;
z-index: 5000;
}
 
.iviewer_cursor {
cursor: url(../images/iviewer/hand.cur) 6 8, pointer;
}
 
.iviewer_drag_cursor {
cursor: url(../images/iviewer/grab.cur) 6 8, pointer;
}
 
.iviewer_button {
width: 28px;
cursor: pointer;
background-position: center center;
background-repeat: no-repeat;
}
 
.iviewer_zoom_in {
left: 20px;
background: url(../images/iviewer/iviewer.zoom_in.png);
}
 
.iviewer_zoom_out {
left: 55px;
background: url(../images/iviewer/iviewer.zoom_out.png);
}
 
.iviewer_zoom_zero {
left: 90px;
background: url(../images/iviewer/iviewer.zoom_zero.png);
}
 
.iviewer_zoom_fit {
left: 125px;
background: url(../images/iviewer/iviewer.zoom_fit.png);
}
 
.iviewer_zoom_status {
left: 160px;
font: 1em/28px Sans;
color: #000;
background-color: #fff;
text-align: center;
width: 60px;
}
 
.iviewer_rotate_left {
left: 227px;
background: #fff url(../images/iviewer/iviewer.rotate_left.png) center center no-repeat;
}
 
.iviewer_rotate_right {
left: 262px;
background: #fff url(../images/iviewer/iviewer.rotate_right.png) center center no-repeat;
}
/branches/v0.3-aleaume/doc/PhpDoc/css/phpdocumentor-clean-icons/lte-ie7.js
New file
0,0 → 1,30
/* Load this script using conditional IE comments if you need to support IE 7 and IE 6. */
 
window.onload = function() {
function addIcon(el, entity) {
var html = el.innerHTML;
el.innerHTML = '<span style="font-family: \'phpdocumentor-clean-icons\'">' + entity + '</span>' + html;
}
var icons = {
'icon-trait' : '&#xe000;',
'icon-interface' : '&#xe001;',
'icon-class' : '&#xe002;'
},
els = document.getElementsByTagName('*'),
i, attr, html, c, el;
for (i = 0; ; i += 1) {
el = els[i];
if(!el) {
break;
}
attr = el.getAttribute('data-icon');
if (attr) {
addIcon(el, attr);
}
c = el.className;
c = c.match(/icon-[^\s'"]+/);
if (c && icons[c[0]]) {
addIcon(el, icons[c[0]]);
}
}
};
/branches/v0.3-aleaume/doc/PhpDoc/css/phpdocumentor-clean-icons/style.css
New file
0,0 → 1,48
@font-face {
font-family: 'phpdocumentor-clean-icons';
src:url('fonts/phpdocumentor-clean-icons.eot');
src:url('fonts/phpdocumentor-clean-icons.eot?#iefix') format('embedded-opentype'),
url('fonts/phpdocumentor-clean-icons.woff') format('woff'),
url('fonts/phpdocumentor-clean-icons.ttf') format('truetype'),
url('fonts/phpdocumentor-clean-icons.svg#phpdocumentor-clean-icons') format('svg');
font-weight: normal;
font-style: normal;
}
 
/* Use the following CSS code if you want to use data attributes for inserting your icons */
[data-icon]:before {
font-family: 'phpdocumentor-clean-icons';
content: attr(data-icon);
speak: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
 
/* Use the following CSS code if you want to have a class per icon */
/*
Instead of a list of all class selectors,
you can use the generic selector below, but it's slower:
[class*="icon-"] {
*/
.icon-trait, .icon-interface, .icon-class {
font-family: 'phpdocumentor-clean-icons';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
.icon-trait:before {
content: "\e000";
}
.icon-interface:before {
content: "\e001";
}
.icon-class:before {
content: "\e002";
}
/branches/v0.3-aleaume/doc/PhpDoc/css/phpdocumentor-clean-icons/fonts/phpdocumentor-clean-icons.woff
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/css/phpdocumentor-clean-icons/fonts/phpdocumentor-clean-icons.woff
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/css/phpdocumentor-clean-icons/fonts/phpdocumentor-clean-icons.eot
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/css/phpdocumentor-clean-icons/fonts/phpdocumentor-clean-icons.eot
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/css/phpdocumentor-clean-icons/fonts/phpdocumentor-clean-icons.dev.svg
New file
0,0 → 1,17
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
This is a custom SVG font generated by IcoMoon.
<iconset id="phpdocumentor-clean-icons" name="phpdocumentor-clean-icons" href="http://www.phpdoc.org" grid="16"></iconset><author name="Mike van Riel" href="http://www.mikevanriel.com"></author><license name="SIL"></license>
</metadata>
<defs>
<font id="phpdocumentor-clean-icons" horiz-adv-x="512" >
<font-face units-per-em="512" ascent="480" descent="-32" />
<missing-glyph horiz-adv-x="512" />
<glyph class="hidden" unicode="&#xf000;" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" />
<glyph unicode="&#xe000;" d="M 139.636,456.727 C 75.171,456.727 23.273,404.829 23.273,340.364 l 0-232.727 c 0-64.465 51.898-116.364 116.364-116.364 l 232.727,0 c 64.465,0 116.364,51.898 116.364,116.364 L 488.727,340.364 C 488.727,404.829 436.829,456.727 372.364,456.727 L 139.636,456.727 z m 20.727-41.381 191.274,0 c 53.001,0 95.709-42.708 95.709-95.709 l 0-191.274 c 0-53.001 -42.708-95.709 -95.709-95.709 l -191.274,0 c -53.001,0 -95.709,42.708 -95.709,95.709 l 0,191.274 c 0,53.001 42.708,95.709 95.709,95.709 zM 359.963,366.827 m0,0,0-43.124 -84.271,0 0-231.052 -50.246,0 0,231.052 -84.271,0 0,43.124 218.787,0" data-tags="trait" />
<glyph unicode="&#xe001;" d="M 139.636,456.727 C 75.171,456.727 23.273,404.829 23.273,340.364 l 0-232.727 c 0-64.465 51.898-116.364 116.364-116.364 l 232.727,0 c 64.465,0 116.364,51.898 116.364,116.364 L 488.727,340.364 C 488.727,404.829 436.829,456.727 372.364,456.727 L 139.636,456.727 z m 20.727-41.381 191.274,0 c 53.001,0 95.709-42.708 95.709-95.709 l 0-191.274 c 0-53.001 -42.708-95.709 -95.709-95.709 l -191.274,0 c -53.001,0 -95.709,42.708 -95.709,95.709 l 0,191.274 c 0,53.001 42.708,95.709 95.709,95.709 zM 231.075,366.827 m0,0, 49.85,0 0-274.176 -49.85,0 0,274.176" data-tags="interface" />
<glyph unicode="&#xe002;" d="M 139.636,456.727 C 75.171,456.727 23.273,404.829 23.273,340.364 l 0-232.727 c 0-64.465 51.898-116.364 116.364-116.364 l 232.727,0 c 64.465,0 116.364,51.898 116.364,116.364 L 488.727,340.364 C 488.727,404.829 436.829,456.727 372.364,456.727 L 139.636,456.727 z m 20.727-41.381 191.274,0 c 53.001,0 95.709-42.708 95.709-95.709 l 0-191.274 c 0-53.001 -42.708-95.709 -95.709-95.709 l -191.274,0 c -53.001,0 -95.709,42.708 -95.709,95.709 l 0,191.274 c 0,53.001 42.708,95.709 95.709,95.709 zM 278.749,86.717 m0,0,c -20.573,0 -39.036,3.165 -55.389,9.495 -16.353,6.33 -30.2,15.562 -41.542,27.695 -11.342,12.397 -20.046,27.431 -26.112,45.103 -6.066,17.672 -9.1,37.981 -9.1,60.928 0,22.947 3.429,43.256 10.287,60.928 7.121,17.672 16.749,32.574 28.881,44.707 12.133,12.396 26.376,21.76 42.729,28.090 16.353,6.33 33.893,9.495 52.62,9.495 11.341,0 21.628-0.923 30.86-2.769 9.231-1.583 17.276-3.429 24.134-5.539 6.857-2.11 12.528-4.352 17.012-6.726 4.484-2.374 7.649-4.089 9.495-5.143 l -14.639-40.751 c -6.33,3.956 -15.43,7.649 -27.299,11.078 -11.606,3.692 -24.266,5.539 -37.981,5.539 -11.869,0 -22.947-2.11 -33.233-6.33 -10.287-3.957 -19.254-10.023 -26.903-18.199 -7.385-8.177 -13.188-18.463 -17.408-30.86 -4.22-12.397 -6.33-26.772 -6.33-43.124 0-14.507 1.582-27.827 4.748-39.959 3.429-12.133 8.572-22.683 15.43-31.651 6.858-8.704 15.562-15.562 26.112-20.573 10.55-4.748 23.211-7.122 37.981-7.121 17.672,0 32.046,1.714 43.124,5.143 11.078,3.693 19.65,7.121 25.716,10.287 l 13.452-40.751 c -3.165-2.11 -7.517-4.22 -13.056-6.33 -5.275-2.11 -11.606-4.22 -18.991-6.33 -7.385-1.846 -15.694-3.297 -24.925-4.352 -9.232-1.319 -19.123-1.978 -29.673-1.978" data-tags="class" />
<glyph unicode="&#x20;" horiz-adv-x="256" />
</font></defs></svg>
/branches/v0.3-aleaume/doc/PhpDoc/css/phpdocumentor-clean-icons/fonts/phpdocumentor-clean-icons.ttf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/css/phpdocumentor-clean-icons/fonts/phpdocumentor-clean-icons.ttf
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/css/phpdocumentor-clean-icons/fonts/phpdocumentor-clean-icons.svg
New file
0,0 → 1,17
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
This is a custom SVG font generated by IcoMoon.
<iconset id="phpdocumentor-clean-icons" name="phpdocumentor-clean-icons" href="http://www.phpdoc.org" grid="16"></iconset><author name="Mike van Riel" href="http://www.mikevanriel.com"></author><license name="SIL"></license>
</metadata>
<defs>
<font id="phpdocumentor-clean-icons" horiz-adv-x="512" >
<font-face units-per-em="512" ascent="480" descent="-32" />
<missing-glyph horiz-adv-x="512" />
<glyph class="hidden" unicode="&#xf000;" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" />
<glyph unicode="&#xe000;" d="M 139.636,456.727 C 75.171,456.727 23.273,404.829 23.273,340.364 l 0-232.727 c 0-64.465 51.898-116.364 116.364-116.364 l 232.727,0 c 64.465,0 116.364,51.898 116.364,116.364 L 488.727,340.364 C 488.727,404.829 436.829,456.727 372.364,456.727 L 139.636,456.727 z m 20.727-41.381 191.274,0 c 53.001,0 95.709-42.708 95.709-95.709 l 0-191.274 c 0-53.001 -42.708-95.709 -95.709-95.709 l -191.274,0 c -53.001,0 -95.709,42.708 -95.709,95.709 l 0,191.274 c 0,53.001 42.708,95.709 95.709,95.709 zM 359.963,366.827 m0,0,0-43.124 -84.271,0 0-231.052 -50.246,0 0,231.052 -84.271,0 0,43.124 218.787,0" />
<glyph unicode="&#xe001;" d="M 139.636,456.727 C 75.171,456.727 23.273,404.829 23.273,340.364 l 0-232.727 c 0-64.465 51.898-116.364 116.364-116.364 l 232.727,0 c 64.465,0 116.364,51.898 116.364,116.364 L 488.727,340.364 C 488.727,404.829 436.829,456.727 372.364,456.727 L 139.636,456.727 z m 20.727-41.381 191.274,0 c 53.001,0 95.709-42.708 95.709-95.709 l 0-191.274 c 0-53.001 -42.708-95.709 -95.709-95.709 l -191.274,0 c -53.001,0 -95.709,42.708 -95.709,95.709 l 0,191.274 c 0,53.001 42.708,95.709 95.709,95.709 zM 231.075,366.827 m0,0, 49.85,0 0-274.176 -49.85,0 0,274.176" />
<glyph unicode="&#xe002;" d="M 139.636,456.727 C 75.171,456.727 23.273,404.829 23.273,340.364 l 0-232.727 c 0-64.465 51.898-116.364 116.364-116.364 l 232.727,0 c 64.465,0 116.364,51.898 116.364,116.364 L 488.727,340.364 C 488.727,404.829 436.829,456.727 372.364,456.727 L 139.636,456.727 z m 20.727-41.381 191.274,0 c 53.001,0 95.709-42.708 95.709-95.709 l 0-191.274 c 0-53.001 -42.708-95.709 -95.709-95.709 l -191.274,0 c -53.001,0 -95.709,42.708 -95.709,95.709 l 0,191.274 c 0,53.001 42.708,95.709 95.709,95.709 zM 278.749,86.717 m0,0,c -20.573,0 -39.036,3.165 -55.389,9.495 -16.353,6.33 -30.2,15.562 -41.542,27.695 -11.342,12.397 -20.046,27.431 -26.112,45.103 -6.066,17.672 -9.1,37.981 -9.1,60.928 0,22.947 3.429,43.256 10.287,60.928 7.121,17.672 16.749,32.574 28.881,44.707 12.133,12.396 26.376,21.76 42.729,28.090 16.353,6.33 33.893,9.495 52.62,9.495 11.341,0 21.628-0.923 30.86-2.769 9.231-1.583 17.276-3.429 24.134-5.539 6.857-2.11 12.528-4.352 17.012-6.726 4.484-2.374 7.649-4.089 9.495-5.143 l -14.639-40.751 c -6.33,3.956 -15.43,7.649 -27.299,11.078 -11.606,3.692 -24.266,5.539 -37.981,5.539 -11.869,0 -22.947-2.11 -33.233-6.33 -10.287-3.957 -19.254-10.023 -26.903-18.199 -7.385-8.177 -13.188-18.463 -17.408-30.86 -4.22-12.397 -6.33-26.772 -6.33-43.124 0-14.507 1.582-27.827 4.748-39.959 3.429-12.133 8.572-22.683 15.43-31.651 6.858-8.704 15.562-15.562 26.112-20.573 10.55-4.748 23.211-7.122 37.981-7.121 17.672,0 32.046,1.714 43.124,5.143 11.078,3.693 19.65,7.121 25.716,10.287 l 13.452-40.751 c -3.165-2.11 -7.517-4.22 -13.056-6.33 -5.275-2.11 -11.606-4.22 -18.991-6.33 -7.385-1.846 -15.694-3.297 -24.925-4.352 -9.232-1.319 -19.123-1.978 -29.673-1.978" />
<glyph unicode="&#x20;" horiz-adv-x="256" />
</font></defs></svg>
/branches/v0.3-aleaume/doc/PhpDoc/css/phpdocumentor-clean-icons/Read Me.txt
New file
0,0 → 1,3
To modify your generated font, use the *dev.svg* file, located in the *fonts* folder in this package. You can import this dev.svg file to the IcoMoon app. All the tags (class names) and the Unicode points of your glyphs are saved in this file.
 
See the documentation for more info on how to use this package: http://icomoon.io/#docs/font-face
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/css/prism.css
New file
0,0 → 1,204
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
 
code[class*="language-"],
pre[class*="language-"] {
color: black;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', monospace;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
 
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
 
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
 
::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
 
::selection {
text-shadow: none;
background: #b3d4fc;
}
 
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
 
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
 
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
 
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
}
 
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
 
.token.punctuation {
color: #999;
}
 
.namespace {
opacity: .7;
}
 
.token.property,
.token.tag,
.token.boolean,
.token.number {
color: #905;
}
 
.token.selector,
.token.attr-name,
.token.string {
color: #690;
}
 
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #a67f59;
background: hsla(0,0%,100%,.5);
}
 
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
 
 
.token.regex,
.token.important {
color: #e90;
}
 
.token.important {
font-weight: bold;
}
 
.token.entity {
cursor: help;
}
pre[data-line] {
position: relative;
padding: 1em 0 1em 3em;
}
 
.line-highlight {
position: absolute;
left: 0;
right: 0;
padding: inherit 0;
margin-top: 1em; /* Same as .prism’s padding-top */
 
background: hsla(24, 20%, 50%,.08);
background: -moz-linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
background: -webkit-linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
background: -o-linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
background: linear-gradient(left, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
pointer-events: none;
line-height: inherit;
white-space: pre;
}
 
.line-highlight:before,
.line-highlight[data-end]:after {
content: attr(data-start);
position: absolute;
top: .4em;
left: .6em;
min-width: 1em;
padding: 0 .5em;
background-color: hsla(24, 20%, 50%,.4);
color: hsl(24, 20%, 95%);
font: bold 65%/1.5 sans-serif;
text-align: center;
vertical-align: .3em;
border-radius: 999px;
text-shadow: none;
box-shadow: 0 1px white;
}
.line-highlight[data-end]:after {
content: attr(data-end);
top: auto;
bottom: .4em;
}
pre.line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber;
}
 
pre.line-numbers > code {
position: relative;
}
 
.line-numbers .line-numbers-rows {
position: absolute;
pointer-events: none;
top: 0;
font-size: 100%;
left: -3.8em;
width: 3em; /* works for line-numbers below 1000 lines */
letter-spacing: -1px;
border-right: 1px solid #999;
 
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
 
}
 
.line-numbers-rows > span {
pointer-events: none;
display: block;
counter-increment: linenumber;
}
 
.line-numbers-rows > span:before {
content: counter(linenumber);
color: #999;
display: block;
padding-right: 0.8em;
text-align: right;
}
/branches/v0.3-aleaume/doc/PhpDoc/css/template.css
New file
0,0 → 1,418
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);
@import url('phpdocumentor-clean-icons/style.css');
 
body {
padding-top: 40px;
background-color: #333333;
}
 
a {
color: #6495ed;
}
a.anchor {
height: 40px;
margin-top: -40px;
display: block;
}
 
h1, h2, h3, h4, h5, h6, .brand {
font-family: 'Source Sans Pro', sans-serif;
font-weight: normal;
letter-spacing: 0.05em;
}
 
h2, h3, .detailsbar h1 {
overflow: hidden;
white-space: nowrap;
margin: 30px 0 20px 0;
}
 
h2:after, h3:after, .detailsbar h1:after {
content: '';
display: inline-block;
vertical-align: middle;
width: 100%;
height: 2px;
margin-left: 1em;
background: silver;
}
 
h3 {
margin: 10px 0 20px 0;
}
 
h4 {
margin: 20px 0 10px 0;
color: gray;
font-size: 18.5px;
}
 
h3.public, h3.protected, h3.private {
padding-left: 10px;
text-overflow: ellipsis;
}
 
.table tr:first-of-type th, .table tr:first-of-type td {
border-top: none;
}
.detailsbar {
color: #eeeeee;
background-color: #333333;
font-size: 0.9em;
overflow: hidden;
border-left: 2px solid gray;
}
 
.detailsbar h1 {
font-size: 1.5em;
margin-bottom: 20px;
margin-top: 0;
}
 
.detailsbar h2 {
font-size: 1.2em;
margin: 0;
padding: 0;
}
 
.detailsbar h1:after {
background: gray;
}
.detailsbar h2:after, .detailsbar h3:after {
background: transparent;
}
 
.detailsbar dt {
font-variant: small-caps;
text-transform: lowercase;
font-size: 1.1em;
letter-spacing: 0.1em;
color: silver;
}
 
.hierarchy div:nth-of-type(2) { margin-left: 11px; }
.hierarchy div:nth-of-type(3) { margin-left: 22px; }
.hierarchy div:nth-of-type(4) { margin-left: 33px; }
.hierarchy div:nth-of-type(5) { margin-left: 44px; }
.hierarchy div:nth-of-type(6) { margin-left: 55px; }
.hierarchy div:nth-of-type(7) { margin-left: 66px; }
.hierarchy div:nth-of-type(8) { margin-left: 77px; }
.hierarchy div:nth-of-type(9) { margin-left: 88px; }
.hierarchy div:before {
content: "\f0da";
font-family: FontAwesome;
margin-right: 5px;
}
 
.row-fluid {
background-color: white;
overflow: hidden;
}
 
footer.row-fluid, footer.row-fluid * {
background-color: #333333;
color: white;
}
 
footer.row-fluid {
border-top: 2px dashed #555;
margin-top: 2px;
}
 
.footer-sections .span4 {
border: 2px solid #555;
text-align: center;
border-radius: 10px;
margin-top: 70px;
margin-bottom: 20px;
background: #373737;
}
 
.footer-sections .span4 h1 {
background: transparent;
margin-top: -30px;
margin-bottom: 20px;
font-size: 5em;
}
 
.footer-sections .span4 h1 * {
background: transparent;
}
 
.footer-sections .span4 div {
border-bottom-right-radius: 6px;
border-bottom-left-radius: 6px;
padding: 10px;
min-height: 40px;
}
.footer-sections .span4 div, .footer-sections .span4 div * {
background-color: #555;
}
.footer-sections .span4 ul {
text-align: left;
list-style: none;
margin: 0;
padding: 0;
}
 
.content {
background-color: white;
padding-right: 20px;
}
 
.content nav {
text-align: center;
border-bottom: 1px solid silver;
margin: 5px 0 20px 0;
padding-bottom: 5px;
}
 
.content > h1 {
padding-bottom: 15px;
}
 
.content > h1 small {
display: block;
padding-bottom: 8px;
font-size: 0.6em;
}
 
.deprecated {
text-decoration: line-through;
}
 
.method {
margin-bottom: 20px;
}
 
.method .signature .argument {
color: maroon;
font-weight: bold;
}
 
.class #summary section.row-fluid {
overflow: hidden
}
 
.class #summary .heading {
font-weight: bold;
text-align: center;
}
 
.class #summary section .span4 {
padding: 3px;
overflow: hidden;
margin-bottom: -9999px;
padding-bottom: 9999px;
white-space: nowrap;
text-overflow: ellipsis;
border-left: 5px solid transparent;
}
 
.class #summary section.public .span4:first-of-type:before,
.class #summary section.public .span6:first-of-type:before,
h3.public:before {
font-family: FontAwesome;
content: "\f046";
color: green;
display: inline-block;
width: 1.2em;
}
 
.class #summary section .span4:first-of-type,
.class #summary section .span6:first-of-type {
padding-left: 21px;
}
.class #summary section .span4:first-of-type:before,
.class #summary section .span6:first-of-type:before {
margin-left: -21px;
}
.class #summary section.protected .span4:first-of-type:before,
.class #summary section.protected .span6:first-of-type:before,
h3.protected:before {
font-family: FontAwesome;
content: "\f132";
color: orange;
display: inline-block;
width: 1.2em;
}
 
.class #summary section.private .span4:first-of-type:before,
.class #summary section.private .span6:first-of-type:before,
h3.private:before {
font-family: FontAwesome;
content: "\f023";
color: red;
display: inline-block;
width: 1.2em;
}
 
.class #summary section em {
font-size: 0.9em;
color: silver;
}
.class #summary .inherited {
color: gray;
font-style: italic;
}
 
.accordion-group {
border: none;
}
 
.accordion {
margin-bottom: 0;
}
 
.accordion a:hover {
text-decoration: none;
background: #333333;
color: #eeeeee;
}
 
.accordion-heading .accordion-toggle:before {
content: "\f078";
font-family: FontAwesome;
margin-right: 5px;
}
 
.accordion-heading .accordion-toggle.collapsed:before {
content: "\f054";
}
.accordion-heading .accordion-toggle {
float: left;
width: 16px;
height: 16px;
padding: 4px 2px 4px 12px;
}
.accordion-heading a {
display: block;
padding: 4px 12px;
}
 
.accordion-inner a {
display: block;
padding: 4px 12px;
}
 
.accordion-inner > ul a:before {
font-family: 'phpdocumentor-clean-icons';
content: "\e001";
margin-right: 5px;
}
 
.accordion-inner li.class a:before {
content: "\e002";
}
 
.accordion-inner li.interface a:before {
content: "\e001";
}
 
.accordion-inner li.trait a:before {
content: "\e000";
}
 
.accordion-inner {
padding: 4px 0 4px 12px;
}
.accordion-inner ul {
list-style: none;
padding: 0;
margin: 0;
}
 
.row-fluid .span2 {
width: 16.5%;
}
 
body .modal {
width: 90%; /* desired relative width */
left: 5%; /* (100%-width)/2 */
/* place center */
margin-left:auto;
margin-right:auto;
}
 
@media (min-width: 767px) {
.sidebar {
position: fixed;
top: 40px;
bottom: 0;
background-color: #f3f3f3;
left: 0;
border-right: 1px solid #e9e9e9;
overflow-y: scroll;
overflow-x: hidden;
padding-top: 10px;
}
 
.sidebar::-webkit-scrollbar {
width: 10px;
}
 
.sidebar::-webkit-scrollbar-thumb {
background: #cccccc;
background-clip: padding-box;
border: 3px solid #f3f3f3;
border-radius: 5px;
}
 
.sidebar::-webkit-scrollbar-button {
display: none;
}
 
.sidebar::-webkit-scrollbar-track {
background: #f3f3f3;
}
}
 
@media (max-width: 979px) {
body {
padding-top: 0;
}
}
 
@media (max-width: 767px) {
.class #summary .heading {
display: none;
}
 
.detailsbar h1 {
display: none;
}
 
body {
background-color: white;
}
 
footer.row-fluid, footer.row-fluid * {
background-color: white;
}
 
.footer-sections h1 {
color: #ccccd9;
}
 
.detailsbar {
background-color: white;
color: #333;
border: none;
}
}
 
@media (min-width: 767px) {
.detailsbar {
min-height: 100%;
margin-bottom: -99999px;
padding-bottom: 99999px;
padding-left: 20px;
padding-top: 10px;
}
}
 
@media (min-width: 1200px) {
.row-fluid .span2 {
width: 16.5%;
}
}
/branches/v0.3-aleaume/doc/PhpDoc/classes/Cache.html
New file
0,0 → 1,1944
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-928765481"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-928765481" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Cache</h1>
<p><em>Classe Cache permettant de mettre en cache des données.</em></p>
<p>Basée sur les principes de Zend_Cache (Copyright (c) 2005-2010, Zend Technologies USA, Inc. All rights reserved.)</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Cache.html#method___construct" class="">__construct()</a><br />
<a href="../classes/Cache.html#method_setEmplacement" class="">setEmplacement()</a><br />
<a href="../classes/Cache.html#method_fabriquer" class="">fabriquer()</a><br />
<a href="../classes/Cache.html#method_charger" class="">charger()</a><br />
<a href="../classes/Cache.html#method_tester" class="">tester()</a><br />
<a href="../classes/Cache.html#method_sauver" class="">sauver()</a><br />
<a href="../classes/Cache.html#method_supprimer" class="">supprimer()</a><br />
<a href="../classes/Cache.html#method_nettoyer" class="">nettoyer()</a><br />
<a href="../classes/Cache.html#method_getIds" class="">getIds()</a><br />
<a href="../classes/Cache.html#method_getTags" class="">getTags()</a><br />
<a href="../classes/Cache.html#method_getIdsAvecLesTags" class="">getIdsAvecLesTags()</a><br />
<a href="../classes/Cache.html#method_getIdsSansLesTags" class="">getIdsSansLesTags()</a><br />
<a href="../classes/Cache.html#method_getIdsAvecUnTag" class="">getIdsAvecUnTag()</a><br />
<a href="../classes/Cache.html#method_getPourcentageRemplissage" class="">getPourcentageRemplissage()</a><br />
<a href="../classes/Cache.html#method_getMetadonnees" class="">getMetadonnees()</a><br />
<a href="../classes/Cache.html#method_ajouterSupplementDureeDeVie" class="">ajouterSupplementDureeDeVie()</a><br />
<a href="../classes/Cache.html#method_getTimestampExpiration" class="">getTimestampExpiration()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<a href="../classes/Cache.html#constant_STOCKAGE_MODE_SIMPLE" class="">STOCKAGE_MODE_SIMPLE</a><br />
<a href="../classes/Cache.html#constant_STOCKAGE_MODE_FICHIER" class="">STOCKAGE_MODE_FICHIER</a><br />
<a href="../classes/Cache.html#constant_STOCKAGE_MODE_SQLITE" class="">STOCKAGE_MODE_SQLITE</a><br />
<a href="../classes/Cache.html#constant_NETTOYAGE_MODE_TOUS" class="">NETTOYAGE_MODE_TOUS</a><br />
<a href="../classes/Cache.html#constant_NETTOYAGE_MODE_EXPIRATION" class="">NETTOYAGE_MODE_EXPIRATION</a><br />
<a href="../classes/Cache.html#constant_NETTOYAGE_MODE_AVEC_LES_TAGS" class="">NETTOYAGE_MODE_AVEC_LES_TAGS</a><br />
<a href="../classes/Cache.html#constant_NETTOYAGE_MODE_SANS_LES_TAGS" class="">NETTOYAGE_MODE_SANS_LES_TAGS</a><br />
<a href="../classes/Cache.html#constant_NETTOYAGE_MODE_AVEC_UN_TAG" class="">NETTOYAGE_MODE_AVEC_UN_TAG</a><br />
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<a href="../classes/Cache.html#method_validerIdOuTag" class="">validerIdOuTag()</a><br />
<a href="../classes/Cache.html#method_validerTableauDeTags" class="">validerTableauDeTags()</a><br />
</section>
<section class="span4">
<a href="../classes/Cache.html#property_options" class="">$options</a><br />
<a href="../classes/Cache.html#property_stockage" class="">$stockage</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/Cache.html#method_initialiserOptionsParConfig" class="">initialiserOptionsParConfig()</a><br />
<a href="../classes/Cache.html#method_setOptions" class="">setOptions()</a><br />
<a href="../classes/Cache.html#method_prefixerId" class="">prefixerId()</a><br />
<a href="../classes/Cache.html#method_executerMethodeStockage" class="">executerMethodeStockage()</a><br />
<a href="../classes/Cache.html#method_supprimerPrefixe" class="">supprimerPrefixe()</a><br />
<a href="../classes/Cache.html#method_controlerEcriture" class="">controlerEcriture()</a><br />
<a href="../classes/Cache.html#method_deserialiserAutomatiquement" class="">deserialiserAutomatiquement()</a><br />
<a href="../classes/Cache.html#method_serialiserAutomatiquement" class="">serialiserAutomatiquement()</a><br />
<a href="../classes/Cache.html#method_nettoyerAutomatiquement" class="">nettoyerAutomatiquement()</a><br />
</section>
<section class="span4">
<a href="../classes/Cache.html#property_dernier_id" class="">$dernier_id</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/Cache.php.html"><div class="path-wrapper">Cache.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Cache</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>php 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://framework.zend.com/license/new-bsd">http://framework.zend.com/license/new-bsd</a> Licence New BSD</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL</p>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Cache.php 299 2011-01-18 14:03:46Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="constants" name="constants"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Constants</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_STOCKAGE_MODE_SIMPLE" name="constant_STOCKAGE_MODE_SIMPLE" class="anchor"></a>
<article id="constant_STOCKAGE_MODE_SIMPLE" class="constant">
<h3 class="">STOCKAGE_MODE_SIMPLE</h3>
<pre class="signature">STOCKAGE_MODE_SIMPLE</pre>
<p><em>Socke les enregistrements du cache dans des fichiers textes de façon extremement simple.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_STOCKAGE_MODE_FICHIER" name="constant_STOCKAGE_MODE_FICHIER" class="anchor"></a>
<article id="constant_STOCKAGE_MODE_FICHIER" class="constant">
<h3 class="">STOCKAGE_MODE_FICHIER</h3>
<pre class="signature">STOCKAGE_MODE_FICHIER</pre>
<p><em>Socke les enregistrements du cache dans des fichiers textes.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_STOCKAGE_MODE_SQLITE" name="constant_STOCKAGE_MODE_SQLITE" class="anchor"></a>
<article id="constant_STOCKAGE_MODE_SQLITE" class="constant">
<h3 class="">STOCKAGE_MODE_SQLITE</h3>
<pre class="signature">STOCKAGE_MODE_SQLITE</pre>
<p><em>Socke les enregistrements du cache dans une base de données SQLite.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_NETTOYAGE_MODE_TOUS" name="constant_NETTOYAGE_MODE_TOUS" class="anchor"></a>
<article id="constant_NETTOYAGE_MODE_TOUS" class="constant">
<h3 class="">NETTOYAGE_MODE_TOUS</h3>
<pre class="signature">NETTOYAGE_MODE_TOUS</pre>
<p><em>&#039;tous&#039; (par défaut) : supprime tous les enregistrements.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_NETTOYAGE_MODE_EXPIRATION" name="constant_NETTOYAGE_MODE_EXPIRATION" class="anchor"></a>
<article id="constant_NETTOYAGE_MODE_EXPIRATION" class="constant">
<h3 class="">NETTOYAGE_MODE_EXPIRATION</h3>
<pre class="signature">NETTOYAGE_MODE_EXPIRATION</pre>
<p><em>&#039;expiration&#039; : supprime tous les enregistrements dont la date d&#039;expériration est dépassée.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_NETTOYAGE_MODE_AVEC_LES_TAGS" name="constant_NETTOYAGE_MODE_AVEC_LES_TAGS" class="anchor"></a>
<article id="constant_NETTOYAGE_MODE_AVEC_LES_TAGS" class="constant">
<h3 class="">NETTOYAGE_MODE_AVEC_LES_TAGS</h3>
<pre class="signature">NETTOYAGE_MODE_AVEC_LES_TAGS</pre>
<p><em>&#039;avecLesTags&#039; : supprime tous les enregistrements contenant tous les tags indiqués.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_NETTOYAGE_MODE_SANS_LES_TAGS" name="constant_NETTOYAGE_MODE_SANS_LES_TAGS" class="anchor"></a>
<article id="constant_NETTOYAGE_MODE_SANS_LES_TAGS" class="constant">
<h3 class="">NETTOYAGE_MODE_SANS_LES_TAGS</h3>
<pre class="signature">NETTOYAGE_MODE_SANS_LES_TAGS</pre>
<p><em>&#039;sansLesTags&#039; : supprime tous les enregistrements contenant aucun des tags indiqués.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_NETTOYAGE_MODE_AVEC_UN_TAG" name="constant_NETTOYAGE_MODE_AVEC_UN_TAG" class="anchor"></a>
<article id="constant_NETTOYAGE_MODE_AVEC_UN_TAG" class="constant">
<h3 class="">NETTOYAGE_MODE_AVEC_UN_TAG</h3>
<pre class="signature">NETTOYAGE_MODE_AVEC_UN_TAG</pre>
<p><em>&#039;avecUnTag&#039; : supprime tous les enregistrements contenant au moins un des tags indiqués.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_options" name="property_options" class="anchor"></a>
<article class="property">
<h3 class="protected ">$options</h3>
<pre class="signature">$options : array</pre>
<p><em>Les options disponibles pour le cache :
====&gt; (string) stockage_mode :
Indique le mode de stockage du cache à utiliser parmis :
- Cache::STOCKAGE_MODE_FICHIER : sous forme d&#039;une arborescence de fichiers et dossier
- Cache::STOCKAGE_MODE_SQLITE : sous forme d&#039;une base de données SQLite</em></p>
<p>====> (string) stockage_chemin :
Chemin vers :</p>
<ul>
<li>Cache::STOCKAGE_MODE_FICHIER : le dossier devant contenir l'arborescence.</li>
<li>Cache::STOCKAGE_MODE_SQLITE : le fichier contenant la base SQLite.</li>
</ul>
<p>====> (boolean) controle_ecriture :</p>
<ul>
<li>Active / Désactive le controle d'écriture (le cache est lue jute après l'écriture du fichier pour détecter sa corruption)</li>
<li>Activer le controle d'écriture ralentira légèrement l'écriture du fichier de cache mais pas sa lecture
Le controle d'écriture peut détecter la corruption de fichier mais ce n'est pas un système de controle parfait.</li>
</ul>
<p>====> (boolean) mise_en_cache :</p>
<ul>
<li>Active / Désactive la mise en cache
(peut être très utile pour le débogage des scripts utilisant le cache</li>
</ul>
<p>=====> (string) cache_id_prefixe :</p>
<ul>
<li>préfixe pour les identifiant de cache ( = espace de nom)</li>
</ul>
<p>====> (boolean) serialisation_auto :</p>
<ul>
<li>Active / Désactive la sérialisation automatique</li>
<li>Peut être utilisé pour sauver directement des données qui ne sont pas des chaines (mais c'est plus lent)</li>
</ul>
<p>====> (int) nettoyage_auto :</p>
<ul>
<li>Désactive / Régler le processus de nettoyage automatique</li>
<li>Le processus de nettoyage automatiques détruit les fichier trop vieux (pour la durée de vie donnée)
quand un nouveau fichier de cache est écrit :
0 => pas de nettoyage automatique
1 => nettoyage automatique systématique
x (integer) > 1 => nettoyage automatique toutes les 1 fois (au hasard) sur x écriture de fichier de cache</li>
</ul>
<p>====> (int) duree_de_vie :</p>
<ul>
<li>Durée de vie du cache (en secondes)</li>
<li>Si null, le cache est valide indéfiniment.</li>
</ul>
 
<h4>Type</h4>
array
&mdash; les options disponibles pour le cache . </article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_stockage" name="property_stockage" class="anchor"></a>
<article class="property">
<h3 class="protected ">$stockage</h3>
<pre class="signature">$stockage</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_dernier_id" name="property_dernier_id" class="anchor"></a>
<article class="property">
<h3 class="private ">$dernier_id</h3>
<pre class="signature">$dernier_id : string</pre>
<p><em>Dernier identifiant de cache utilisé.</em></p>
 
<h4>Type</h4>
string
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="public ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct( <span class="argument">$options</span>, <span class="argument">$options_stockage</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$options</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$options_stockage</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setEmplacement" name="method_setEmplacement" class="anchor"></a>
<article class="method">
<h3 class="public ">setEmplacement()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setEmplacement(string <span class="argument">$emplacement</span>) : void</pre>
<p><em>Permet de (re-)définir l&#039;emplacement pour le stockage du cache.</em></p>
<p>En fonction du mode de stockage utilisé , l'emplacement indiqué correspondra au chemin du :</p>
<ul>
<li>dossier où stocker les fichiers pour le mode "fichier".</li>
<li>fichier de la base de données pour le mode "sqlite".</li>
</ul>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$emplacement</td>
<td><p>chemin vers dossier (Cache::STOCKAGE_MODE_FICHIER) ou fichier base Sqlite (Cache::STOCKAGE_MODE_SQLITE)</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_fabriquer" name="method_fabriquer" class="anchor"></a>
<article class="method">
<h3 class="public ">fabriquer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">fabriquer( <span class="argument">$mode</span>, <span class="argument">$options</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$mode</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$options</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_charger" name="method_charger" class="anchor"></a>
<article class="method">
<h3 class="public ">charger()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">charger(string <span class="argument">$id</span>, boolean <span class="argument">$ne_pas_tester_validiter_du_cache</span>) : mixed|false</pre>
<p><em>Teste si un cache est disponible pour l&#039;identifiant donné et (si oui) le retourne (false dans le cas contraire)</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Identifiant de cache.</p></td>
</tr>
<tr>
<td>boolean</td>
<td>$ne_pas_tester_validiter_du_cache</td>
<td><p>Si mis à true, la validité du cache n'est pas testée</p></td>
</tr>
</table>
<h4>Returns</h4>
mixed|false
&mdash; <p>Cached datas</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_tester" name="method_tester" class="anchor"></a>
<article class="method">
<h3 class="public ">tester()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">tester(string <span class="argument">$id</span>) : int|false</pre>
<p><em>Test if a cache is available for the given id</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
int|false
&mdash; <p>Last modified time of cache entry if it is available, false otherwise</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_sauver" name="method_sauver" class="anchor"></a>
<article class="method">
<h3 class="public ">sauver()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">sauver(mixed <span class="argument">$donnees</span>, string <span class="argument">$id</span>, array <span class="argument">$tags</span>, int <span class="argument">$duree_de_vie_specifique</span>) : boolean</pre>
<p><em>Sauvegarde en cache les données passées en paramètre.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>mixed</td>
<td>$donnees</td>
<td><p>Données à mettre en cache (peut être différent d'une chaine si serialisation_auto vaut true).</p></td>
</tr>
<tr>
<td>string</td>
<td>$id</td>
<td><p>Identifiant du cache (s'il n'est pas définit, le dernier identifiant sera utilisé).</p></td>
</tr>
<tr>
<td>array</td>
<td>$tags</td>
<td><p>Mots-clés du cache.</p></td>
</tr>
<tr>
<td>int</td>
<td>$duree_de_vie_specifique</td>
<td><p>Si != false, indique une durée de vie spécifique pour cet enregistrement en cache (null => durée de vie infinie)</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True si aucun problème n'est survenu.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimer" name="method_supprimer" class="anchor"></a>
<article class="method">
<h3 class="public ">supprimer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimer(string <span class="argument">$id</span>) : boolean</pre>
<p><em>Supprime un enregistrement en cache.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Identificant du cache à supprimer.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True si ok</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyer" name="method_nettoyer" class="anchor"></a>
<article class="method">
<h3 class="public ">nettoyer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyer(string <span class="argument">$mode</span>, array|string <span class="argument">$tags</span>) : boolean</pre>
<p><em>Nettoyage des enregistrements en cache</em></p>
<p>Mode de nettoyage disponibles :
'tous' (défaut) => supprime tous les enregistrements ($tags n'est pas utilisé)
'expiration' => supprime tous les enregistrements dont la date d'expériration est dépassée ($tags n'est pas utilisé)
'avecLesTag' => supprime tous les enregistrements contenant tous les tags indiqués
'sansLesTag' => supprime tous les enregistrements contenant aucun des tags indiqués
'avecUnTag' => supprime tous les enregistrements contenant au moins un des tags indiqués</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$mode</td>
<td><p>mode de nettoyage</p></td>
</tr>
<tr>
<td>array|string</td>
<td>$tags</td>
<td><p>peut être un tableau de chaîne ou une simple chaine.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True si ok</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIds" name="method_getIds" class="anchor"></a>
<article class="method">
<h3 class="public ">getIds()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIds() : array</pre>
<p><em>Return an array of stored cache ids</em></p>
 
<h4>Returns</h4>
array
&mdash; <p>array of stored cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getTags" name="method_getTags" class="anchor"></a>
<article class="method">
<h3 class="public ">getTags()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getTags() : array</pre>
<p><em>Return an array of stored tags</em></p>
 
<h4>Returns</h4>
array
&mdash; <p>array of stored tags (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIdsAvecLesTags" name="method_getIdsAvecLesTags" class="anchor"></a>
<article class="method">
<h3 class="public ">getIdsAvecLesTags()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIdsAvecLesTags(array <span class="argument">$tags</span>) : array</pre>
<p><em>Return an array of stored cache ids which match given tags</em></p>
<p>In case of multiple tags, a logical AND is made between tags</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tags</td>
<td><p>array of tags</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of matching cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIdsSansLesTags" name="method_getIdsSansLesTags" class="anchor"></a>
<article class="method">
<h3 class="public ">getIdsSansLesTags()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIdsSansLesTags(array <span class="argument">$tags</span>) : array</pre>
<p><em>Return an array of stored cache ids which don&#039;t match given tags</em></p>
<p>In case of multiple tags, a logical OR is made between tags</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tags</td>
<td><p>array of tags</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of not matching cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIdsAvecUnTag" name="method_getIdsAvecUnTag" class="anchor"></a>
<article class="method">
<h3 class="public ">getIdsAvecUnTag()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIdsAvecUnTag(array <span class="argument">$tags</span>) : array</pre>
<p><em>Return an array of stored cache ids which match any given tags</em></p>
<p>In case of multiple tags, a logical OR is made between tags</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tags</td>
<td><p>array of tags</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of matching any cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getPourcentageRemplissage" name="method_getPourcentageRemplissage" class="anchor"></a>
<article class="method">
<h3 class="public ">getPourcentageRemplissage()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getPourcentageRemplissage() : int</pre>
<p><em>Return the filling percentage of the backend storage</em></p>
 
<h4>Returns</h4>
int
&mdash; <p>integer between 0 and 100</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getMetadonnees" name="method_getMetadonnees" class="anchor"></a>
<article class="method">
<h3 class="public ">getMetadonnees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getMetadonnees(string <span class="argument">$id</span>) : array</pre>
<p><em>Return an array of metadatas for the given cache id</em></p>
<p>The array will include these keys :</p>
<ul>
<li>expire : the expire timestamp</li>
<li>tags : a string array of tags</li>
<li>mtime : timestamp of last modification time</li>
</ul>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of metadatas (false if the cache id is not found)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_ajouterSupplementDureeDeVie" name="method_ajouterSupplementDureeDeVie" class="anchor"></a>
<article class="method">
<h3 class="public ">ajouterSupplementDureeDeVie()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">ajouterSupplementDureeDeVie(string <span class="argument">$id</span>, <span class="argument">$supplement_duree_de_vie</span>) : boolean</pre>
<p><em>Give (if possible) an extra lifetime to the given cache id</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>cache id</p></td>
</tr>
<tr>
<td></td>
<td>$supplement_duree_de_vie</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true if ok</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getTimestampExpiration" name="method_getTimestampExpiration" class="anchor"></a>
<article class="method">
<h3 class="public ">getTimestampExpiration()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getTimestampExpiration( <span class="argument">$duree_de_vie</span>) : int</pre>
<p><em>Calcule et retourne le timestamp d&#039;expiration</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$duree_de_vie</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
int
&mdash; <p>timestamp d'expiration (unix timestamp)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_validerIdOuTag" name="method_validerIdOuTag" class="anchor"></a>
<article class="method">
<h3 class="protected ">validerIdOuTag()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">validerIdOuTag(string <span class="argument">$chaine</span>) : void</pre>
<p><em>Valide un identifiant de cache ou un tag (securité, nom de fichiers fiables, préfixes réservés.</em></p>
<p>..)</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$chaine</td>
<td><p>Identificant de cache ou tag</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_validerTableauDeTags" name="method_validerTableauDeTags" class="anchor"></a>
<article class="method">
<h3 class="protected ">validerTableauDeTags()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">validerTableauDeTags(array <span class="argument">$tags</span>) : void</pre>
<p><em>Valide un tableau de tags (securité, nom de fichiers fiables, préfixes réservés.</em></p>
<p>..)</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tags</td>
<td><p>tableau de tags</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserOptionsParConfig" name="method_initialiserOptionsParConfig" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserOptionsParConfig()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserOptionsParConfig()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setOptions" name="method_setOptions" class="anchor"></a>
<article class="method">
<h3 class="private ">setOptions()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setOptions( <span class="argument">$options</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$options</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_prefixerId" name="method_prefixerId" class="anchor"></a>
<article class="method">
<h3 class="private ">prefixerId()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">prefixerId(string <span class="argument">$id</span>) : string</pre>
<p><em>Fabrique et retourne l&#039;identifiant du cache avec son préfixe.</em></p>
<p>Vérifie l'option 'cache_id_prefixe' et retourne le nouvel id avec préfixe ou simplement l'id lui même si elle vaut null.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Identifiant du cache.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>Identifiant du cache avec ou sans préfixe.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_executerMethodeStockage" name="method_executerMethodeStockage" class="anchor"></a>
<article class="method">
<h3 class="private ">executerMethodeStockage()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">executerMethodeStockage( <span class="argument">$methode</span>, <span class="argument">$params</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$methode</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$params</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimerPrefixe" name="method_supprimerPrefixe" class="anchor"></a>
<article class="method">
<h3 class="private ">supprimerPrefixe()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimerPrefixe( <span class="argument">$ids</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$ids</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_controlerEcriture" name="method_controlerEcriture" class="anchor"></a>
<article class="method">
<h3 class="private ">controlerEcriture()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">controlerEcriture( <span class="argument">$id</span>, <span class="argument">$donnees_avant_ecriture</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$id</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$donnees_avant_ecriture</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_deserialiserAutomatiquement" name="method_deserialiserAutomatiquement" class="anchor"></a>
<article class="method">
<h3 class="private ">deserialiserAutomatiquement()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">deserialiserAutomatiquement( <span class="argument">$donnees</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$donnees</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_serialiserAutomatiquement" name="method_serialiserAutomatiquement" class="anchor"></a>
<article class="method">
<h3 class="private ">serialiserAutomatiquement()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">serialiserAutomatiquement( <span class="argument">$donnees</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$donnees</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyerAutomatiquement" name="method_nettoyerAutomatiquement" class="anchor"></a>
<article class="method">
<h3 class="private ">nettoyerAutomatiquement()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyerAutomatiquement()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Cache.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Cache.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Script.html
New file
0,0 → 1,1374
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1514334818"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1514334818" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Script</h1>
<p><em>Script est une classe abstraite qui doit être implémenté par les classes éxecutant des scripts en ligne de commande.</em></p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Script.html#method___construct" class="">__construct()</a><br />
<a href="../classes/Script.html#method_executer" class="">executer()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<a href="../classes/Script.html#constant_MSG_LOG" class="">MSG_LOG</a><br />
<a href="../classes/Script.html#constant_MSG_ERREUR" class="">MSG_ERREUR</a><br />
<a href="../classes/Script.html#constant_MSG_AVERTISSEMENT" class="">MSG_AVERTISSEMENT</a><br />
<a href="../classes/Script.html#constant_MSG_INFO" class="">MSG_INFO</a><br />
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<a href="../classes/Script.html#method_getScriptNom" class="">getScriptNom()</a><br />
<a href="../classes/Script.html#method_getScriptChemin" class="">getScriptChemin()</a><br />
<a href="../classes/Script.html#method_getParametre" class="">getParametre()</a><br />
<a href="../classes/Script.html#method_traiterErreur" class="">traiterErreur()</a><br />
<a href="../classes/Script.html#method_traiterAvertissement" class="">traiterAvertissement()</a><br />
<a href="../classes/Script.html#method_traiterInfo" class="">traiterInfo()</a><br />
<a href="../classes/Script.html#method_formaterMsg" class="">formaterMsg()</a><br />
<a href="../classes/Script.html#method_afficherAvancement" class="">afficherAvancement()</a><br />
</section>
<section class="span4">
<a href="../classes/Script.html#property_parametres_autorises" class="">$parametres_autorises</a><br />
<a href="../classes/Script.html#property_parametres" class="">$parametres</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/Script.html#method_getMsgNiveauTxt" class="">getMsgNiveauTxt()</a><br />
<a href="../classes/Script.html#method_chargerParametresAutorises" class="">chargerParametresAutorises()</a><br />
<a href="../classes/Script.html#method_chargerParametres" class="">chargerParametres()</a><br />
<a href="../classes/Script.html#method_traiterMessage" class="">traiterMessage()</a><br />
</section>
<section class="span4">
<a href="../classes/Script.html#property_msg_niveaux_txt" class="">$msg_niveaux_txt</a><br />
<a href="../classes/Script.html#property_script_nom" class="">$script_nom</a><br />
<a href="../classes/Script.html#property_parametres_autorises_defaut" class="">$parametres_autorises_defaut</a><br />
<a href="../classes/Script.html#property_parametres_cli" class="">$parametres_cli</a><br />
<a href="../classes/Script.html#property_avancement" class="">$avancement</a><br />
<a href="../classes/Script.html#property_parametres_obligatoires" class="">$parametres_obligatoires</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<span class="label label-info">abstract</span>
<dl>
<dt>File</dt>
<dd><a href="../files/Script.php.html"><div class="path-wrapper">Script.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Script</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
<p>Delphine CAUQUIL <a href="mailto:delphine@tela-botanica.org">delphine@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL-v3</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL-v2</p>
</td>
</tr>
<tr>
<th>
since
</th>
<td>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Script.php 299 2011-01-18 14:03:46Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="constants" name="constants"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Constants</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MSG_LOG" name="constant_MSG_LOG" class="anchor"></a>
<article id="constant_MSG_LOG" class="constant">
<h3 class="">MSG_LOG</h3>
<pre class="signature">MSG_LOG</pre>
<p><em>Niveau de message de type LOG</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MSG_ERREUR" name="constant_MSG_ERREUR" class="anchor"></a>
<article id="constant_MSG_ERREUR" class="constant">
<h3 class="">MSG_ERREUR</h3>
<pre class="signature">MSG_ERREUR</pre>
<p><em>Niveau de message de type ERREUR</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MSG_AVERTISSEMENT" name="constant_MSG_AVERTISSEMENT" class="anchor"></a>
<article id="constant_MSG_AVERTISSEMENT" class="constant">
<h3 class="">MSG_AVERTISSEMENT</h3>
<pre class="signature">MSG_AVERTISSEMENT</pre>
<p><em>Niveau de message de type AVERTISSEMENT</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MSG_INFO" name="constant_MSG_INFO" class="anchor"></a>
<article id="constant_MSG_INFO" class="constant">
<h3 class="">MSG_INFO</h3>
<pre class="signature">MSG_INFO</pre>
<p><em>Niveau de message de type INFORMATION</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_autorises" name="property_parametres_autorises" class="anchor"></a>
<article class="property">
<h3 class="protected ">$parametres_autorises</h3>
<pre class="signature">$parametres_autorises : array</pre>
<p><em>Paramêtres autorisés par le script.</em></p>
<p>le tableau est de la forme suivante :</p>
<ul>
<li>clé = nom du paramêtre '-foo'</li>
<li>value = contient un nouveau tableau composé de cette façon :
<ul>
<li>booléen: true si le paramêtre est obligatoire</li>
<li>booléen ou var : true si le paramêtre nécessite un valeur à sa suite ou la valeur par défaut</li>
<li>string: description du contenu du paramêtre
Les paramêtres optionels devraient être déclaré à la fin du tableau.
Le dernier parametre du tableau peut avoir la valeur '...',
il contiendra alors l'ensemble des paramêtres suivant trouvés sur la ligne de commande.</li>
</ul>
</li>
</ul>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres" name="property_parametres" class="anchor"></a>
<article class="property">
<h3 class="protected ">$parametres</h3>
<pre class="signature">$parametres : array</pre>
<p><em>Contient le tableau des paramètres disponible après vérification :
le tableau est de la forme suivante :
- clé = nom du paramêtre &#039;-foo&#039;
- valeur = la valeur récupérée sur la ligne de commande</em></p>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_msg_niveaux_txt" name="property_msg_niveaux_txt" class="anchor"></a>
<article class="property">
<h3 class="private ">$msg_niveaux_txt</h3>
<pre class="signature">$msg_niveaux_txt</pre>
<p><em>Inititulé des différents types de message.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_script_nom" name="property_script_nom" class="anchor"></a>
<article class="property">
<h3 class="private ">$script_nom</h3>
<pre class="signature">$script_nom : string</pre>
<p><em>Le nom du script tel que passé dans la ligne de commande.</em></p>
 
<h4>Type</h4>
string
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_autorises_defaut" name="property_parametres_autorises_defaut" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres_autorises_defaut</h3>
<pre class="signature">$parametres_autorises_defaut : array</pre>
<p><em>Paramêtres par défaut disponibles pour la ligne de commande
le tableau se construit de la forme suivante :
- clé = nom du paramêtre &#039;-foo&#039;
- value = contient un nouveau tableau composé de cette façon :
- booléen: true si le paramêtre est obligatoire
- booléen ou var : true si le paramêtre nécessite un valeur à sa suite ou la valeur par défaut
- string: description du contenu du paramêtre
Les paramêtres optionels devraient être déclaré à la fin du tableau.</em></p>
<p>Le dernier parametre du tableau peut avoir la valeur '...',
il contiendra alors l'ensemble des paramêtres suivant trouvés sur la ligne de commande.</p>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_cli" name="property_parametres_cli" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres_cli</h3>
<pre class="signature">$parametres_cli : array</pre>
<p><em>Contient les valeurs des paramêtres récupérés de la ligne de commande :
le tableau se construit de la forme suivnate :
- clé = nom du paramêtre &#039;-foo&#039;
- valeur = la valeur récupérée sur la ligne de commande</em></p>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_avancement" name="property_avancement" class="anchor"></a>
<article class="property">
<h3 class="private ">$avancement</h3>
<pre class="signature">$avancement : array</pre>
<p><em>Tableau associatif permettant de stocker l&#039;avancement dans une boucle.</em></p>
<p>La clé est un md5 du message à afficher au démarrage de la boucle.</p>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_obligatoires" name="property_parametres_obligatoires" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres_obligatoires</h3>
<pre class="signature">$parametres_obligatoires</pre>
<p><em>Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="public ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct( <span class="argument">$script_nom</span>, <span class="argument">$parametres_cli</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$script_nom</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$parametres_cli</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_executer" name="method_executer" class="anchor"></a>
<article class="method">
<h3 class="public ">executer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">executer()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">abstract</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getScriptNom" name="method_getScriptNom" class="anchor"></a>
<article class="method">
<h3 class="protected ">getScriptNom()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getScriptNom()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getScriptChemin" name="method_getScriptChemin" class="anchor"></a>
<article class="method">
<h3 class="protected ">getScriptChemin()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getScriptChemin( <span class="argument">$doit_exister</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$doit_exister</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getParametre" name="method_getParametre" class="anchor"></a>
<article class="method">
<h3 class="protected ">getParametre()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getParametre( <span class="argument">$parametre</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$parametre</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_traiterErreur" name="method_traiterErreur" class="anchor"></a>
<article class="method">
<h3 class="protected ">traiterErreur()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">traiterErreur( <span class="argument">$message</span>, <span class="argument">$tab_arguments</span>) : \void.</pre>
<p><em>Affiche un message d&#039;erreur formaté.</em></p>
<p>Si le paramétre de verbosité (-v) vaut 1 ou plus, le message est écrit dans le fichier de log et afficher dans la console.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$message</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$tab_arguments</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
\void.
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_traiterAvertissement" name="method_traiterAvertissement" class="anchor"></a>
<article class="method">
<h3 class="protected ">traiterAvertissement()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">traiterAvertissement( <span class="argument">$message</span>, <span class="argument">$tab_arguments</span>) : \void.</pre>
<p><em>Affiche un message d&#039;avertissement formaté.</em></p>
<p>Si le paramétre de verbosité (-v) vaut 1, le message est écrit dans le fichier de log.
Si le paramétre de verbosité (-v) vaut 2 ou plus, le message est écrit dans le fichier de log et afficher dans la console.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$message</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$tab_arguments</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
\void.
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_traiterInfo" name="method_traiterInfo" class="anchor"></a>
<article class="method">
<h3 class="protected ">traiterInfo()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">traiterInfo( <span class="argument">$message</span>, <span class="argument">$tab_arguments</span>) : \void.</pre>
<p><em>Retourne un message d&#039;information formaté.</em></p>
<p>Si le paramétre de verbosité (-v) vaut 1 ou 2 , le message est écrit dans le fichier de log.
Si le paramétre de verbosité (-v) vaut 3 ou plus, le message est écrit dans le fichier de log et afficher dans la console.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$message</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$tab_arguments</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
\void.
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_formaterMsg" name="method_formaterMsg" class="anchor"></a>
<article class="method">
<h3 class="protected ">formaterMsg()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">formaterMsg( <span class="argument">$message</span>, <span class="argument">$tab_arguments</span>, <span class="argument">$niveau</span>) : string</pre>
<p><em>Retourne un message d&#039;information formaté.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$message</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$tab_arguments</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$niveau</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>le message d'erreur formaté.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_afficherAvancement" name="method_afficherAvancement" class="anchor"></a>
<article class="method">
<h3 class="protected ">afficherAvancement()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">afficherAvancement( <span class="argument">$message</span>, <span class="argument">$depart</span>) : void</pre>
<p><em>Utiliser cette méthode dans une boucle pour afficher un message suivi du nombre de tour de boucle effectué.</em></p>
<p>Vous devrez vous même gérer le retour à la ligne à la sortie de la boucle.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$message</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$depart</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getMsgNiveauTxt" name="method_getMsgNiveauTxt" class="anchor"></a>
<article class="method">
<h3 class="private ">getMsgNiveauTxt()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getMsgNiveauTxt( <span class="argument">$niveau</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$niveau</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_chargerParametresAutorises" name="method_chargerParametresAutorises" class="anchor"></a>
<article class="method">
<h3 class="private ">chargerParametresAutorises()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">chargerParametresAutorises()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_chargerParametres" name="method_chargerParametres" class="anchor"></a>
<article class="method">
<h3 class="private ">chargerParametres()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">chargerParametres()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_traiterMessage" name="method_traiterMessage" class="anchor"></a>
<article class="method">
<h3 class="private ">traiterMessage()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">traiterMessage( <span class="argument">$message</span>, <span class="argument">$tab_arguments</span>, <span class="argument">$niveau</span>) : \void.</pre>
<p><em>Retourne un message formaté en le stockant dans un fichier de log si nécessaire.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$message</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$tab_arguments</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$niveau</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
\void.
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Script.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Script.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Config.html
New file
0,0 → 1,1099
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1349826691"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1349826691" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Config</h1>
<p><em>Config permet de charger automatiquement les fichiers ini du Framework et de l&#039;application.</em></p>
<p>Elle offre l'accès en lecture seule aux paramètres de config.
C'est une Singleton.
Si vous avez besoin de modifier dynamiquement des paramètres de configuration, utiliser le @see Registe, il est fait pour ça.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Config.html#method_charger" class="">charger()</a><br />
<a href="../classes/Config.html#method_get" class="">get()</a><br />
<a href="../classes/Config.html#method_existe" class="">existe()</a><br />
<a href="../classes/Config.html#method_verifierPresenceParametres" class="">verifierPresenceParametres()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/Config.html#method___construct" class="">__construct()</a><br />
<a href="../classes/Config.html#method_chargerFichierContexte" class="">chargerFichierContexte()</a><br />
<a href="../classes/Config.html#method_parserFichierIni" class="">parserFichierIni()</a><br />
<a href="../classes/Config.html#method_fusionner" class="">fusionner()</a><br />
<a href="../classes/Config.html#method_getValeur" class="">getValeur()</a><br />
<a href="../classes/Config.html#method_existeValeur" class="">existeValeur()</a><br />
<a href="../classes/Config.html#method_verifierCreationInstance" class="">verifierCreationInstance()</a><br />
<a href="../classes/Config.html#method_analyserTableauIni" class="">analyserTableauIni()</a><br />
<a href="../classes/Config.html#method_evaluerCle" class="">evaluerCle()</a><br />
<a href="../classes/Config.html#method_evaluerReferences" class="">evaluerReferences()</a><br />
<a href="../classes/Config.html#method_evaluerPhp" class="">evaluerPhp()</a><br />
</section>
<section class="span4">
<a href="../classes/Config.html#property_instance" class="">$instance</a><br />
<a href="../classes/Config.html#property_parametres" class="">$parametres</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/Config.php.html"><div class="path-wrapper">Config.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Config</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL-v3</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL-v2</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Config.php 448 2013-12-19 13:37:39Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_instance" name="property_instance" class="anchor"></a>
<article class="property">
<h3 class="private ">$instance</h3>
<pre class="signature">$instance</pre>
<p><em>Instance de la classe pointant sur elle même (pour le pattern singleton).</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres" name="property_parametres" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres</h3>
<pre class="signature">$parametres</pre>
<p><em>Paramètres de configuration.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_charger" name="method_charger" class="anchor"></a>
<article class="method">
<h3 class="public ">charger()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">charger(string <span class="argument">$fichier_ini</span>) : array</pre>
<p><em>Charge un fichier ini dans le tableau des paramètres de l&#039;appli.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$fichier_ini</td>
<td><p>le nom du fichier à charger</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>le fichier ini parsé</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_get" name="method_get" class="anchor"></a>
<article class="method">
<h3 class="public ">get()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">get(string <span class="argument">$param</span>) : string</pre>
<p><em>Accesseur pour la valeur d&#039;un paramètre.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$param</td>
<td><p>le nom du paramètre</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la valeur du paramètre</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_existe" name="method_existe" class="anchor"></a>
<article class="method">
<h3 class="public ">existe()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">existe(string <span class="argument">$param</span>) : boolean</pre>
<p><em>Vérifie si la valeur d&#039;un paramètre existe.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$param</td>
<td><p>le nom du paramètre</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>vrai si le paramètre existe, false sinon</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_verifierPresenceParametres" name="method_verifierPresenceParametres" class="anchor"></a>
<article class="method">
<h3 class="public ">verifierPresenceParametres()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">verifierPresenceParametres(array <span class="argument">$parametres</span>) : boolean</pre>
<p><em>Vérifie que tous les paramêtres de config nécessaires au fonctionnement d&#039;une classe existe dans les fichiers
de configurations.</em></p>
<p>L'utilisation de cette méthode depuis la classe Config évite de faire appel à une classe supplémentaire.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$parametres</td>
<td><p>tableau des noms des paramètres de la config à verifier.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true si tous les paramétres sont présents sinon false.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="private ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_chargerFichierContexte" name="method_chargerFichierContexte" class="anchor"></a>
<article class="method">
<h3 class="private ">chargerFichierContexte()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">chargerFichierContexte(string <span class="argument">$contexte</span>)</pre>
<p><em>Charge le fichier de config correspondant au contexte</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$contexte</td>
<td><p>le contexte</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_parserFichierIni" name="method_parserFichierIni" class="anchor"></a>
<article class="method">
<h3 class="private ">parserFichierIni()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">parserFichierIni(string <span class="argument">$fichier_ini</span>) : array</pre>
<p><em>Parse le fichier ini donné en paramètre</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$fichier_ini</td>
<td><p>nom du fichier ini à parser</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>tableau contenant les paramètres du fichier ini</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_fusionner" name="method_fusionner" class="anchor"></a>
<article class="method">
<h3 class="private ">fusionner()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">fusionner(array <span class="argument">$ini</span>)</pre>
<p><em>Fusionne un tableau de paramètres avec le tableau de paramètres global</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$ini</td>
<td><p>le tableau à fusionner</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getValeur" name="method_getValeur" class="anchor"></a>
<article class="method">
<h3 class="private ">getValeur()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getValeur(string <span class="argument">$param</span>, array <span class="argument">$config</span>) : string</pre>
<p><em>Renvoie la valeur demandée grâce une chaîne de paramètres</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$param</td>
<td><p>la chaine de paramètres</p></td>
</tr>
<tr>
<td>array</td>
<td>$config</td>
<td><p>le tableau de paramètre</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la valeur de la chaine demandée</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_existeValeur" name="method_existeValeur" class="anchor"></a>
<article class="method">
<h3 class="private ">existeValeur()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">existeValeur(string <span class="argument">$param</span>, <span class="argument">$config</span>)</pre>
<p><em>Teste si param existe dans le tableau config</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$param</td>
<td><p>nom du paramètre</p></td>
</tr>
<tr>
<td></td>
<td>$config</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_verifierCreationInstance" name="method_verifierCreationInstance" class="anchor"></a>
<article class="method">
<h3 class="private ">verifierCreationInstance()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">verifierCreationInstance()</pre>
<p><em>Vérifie si l&#039;instance de classe à été crée, si non la crée</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_analyserTableauIni" name="method_analyserTableauIni" class="anchor"></a>
<article class="method">
<h3 class="private ">analyserTableauIni()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">analyserTableauIni(array <span class="argument">$config</span>) : array</pre>
<p><em>Analyse un tableau de paramètres.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$config</td>
<td><p>le tableau de paramètres</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>le tableau analysé</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_evaluerCle" name="method_evaluerCle" class="anchor"></a>
<article class="method">
<h3 class="private ">evaluerCle()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">evaluerCle(array <span class="argument">$config</span>, string <span class="argument">$cle</span>, string <span class="argument">$valeur</span>)</pre>
<p><em>Dans le cas des chaine de configuration à sous clé (ex.: cle.souscle)
évalue les valeurs correspondantes et crée les sous tableaux associés.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$config</td>
<td><p>tableau de configuration (par référence)</p></td>
</tr>
<tr>
<td>string</td>
<td>$cle</td>
<td><p>la cle dans le tableau</p></td>
</tr>
<tr>
<td>string</td>
<td>$valeur</td>
<td><p>la valeur à affecter</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_evaluerReferences" name="method_evaluerReferences" class="anchor"></a>
<article class="method">
<h3 class="private ">evaluerReferences()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">evaluerReferences(array <span class="argument">$config</span>, string <span class="argument">$cle</span>)</pre>
<p><em>Évalue les valeurs de références à une clé dans le tableau config (cas du ref:cle).</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$config</td>
<td><p>tableau de configuration</p></td>
</tr>
<tr>
<td>string</td>
<td>$cle</td>
<td><p>la clé dont il faut évaluer les références</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_evaluerPhp" name="method_evaluerPhp" class="anchor"></a>
<article class="method">
<h3 class="private ">evaluerPhp()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">evaluerPhp(array <span class="argument">$config</span>, string <span class="argument">$cle</span>)</pre>
<p><em>Évalue le code php contenu dans un clé tu tableau config.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$config</td>
<td><p>tableau de configuration (par référence)</p></td>
</tr>
<tr>
<td>string</td>
<td>$cle</td>
<td><p>le clé du tableau dont il faut évaluer la valeur</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Config.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Config.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Encodage.html
New file
0,0 → 1,476
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1435163241"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1435163241" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Encodage</h1>
<p><em>Classe fournissant des méthodes statiques concernant l&#039;encodage et le décodage des caractères de variable.</em></p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Encodage.html#method_encoderEnUtf8" class="">encoderEnUtf8()</a><br />
<a href="../classes/Encodage.html#method_detecterUtf8" class="">detecterUtf8()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<em>No private methods found</em>
</section>
<section class="span4">
<em>No private properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/utilitaires.Encodage.php.html"><div class="path-wrapper">utilitaires/Encodage.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Utilitaire</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Encodage</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL-v3</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL-v2</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Encodage.php 299 2011-01-18 14:03:46Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_encoderEnUtf8" name="method_encoderEnUtf8" class="anchor"></a>
<article class="method">
<h3 class="public ">encoderEnUtf8()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">encoderEnUtf8( <span class="argument">$variable</span>, <span class="argument">$encodage</span>) : mixed</pre>
<p><em>Méthode permettant d&#039;encoder par défaut de ISO-8859-15 vers UTF-8 une variable ou un tableau de variables.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$variable</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$encodage</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
mixed
&mdash; <p>la chaine ou le tableau encodé en UTF-8.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_detecterUtf8" name="method_detecterUtf8" class="anchor"></a>
<article class="method">
<h3 class="public ">detecterUtf8()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">detecterUtf8( <span class="argument">$chaine</span>) : bool</pre>
<p><em>Méthode permettant de détecter réellement l&#039;encodage UTF-8.</em></p>
<p>mb_detect_encoding plante si la chaine de caractère se termine par un caractère accentué.
Provient de PHPDIG.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$chaine</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
bool
&mdash; <p>true si c'est de UTF-8, sinon false.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Encodage.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/utilitaires/Encodage.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/GestionnaireException.html
New file
0,0 → 1,1251
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1383317307"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1383317307" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>GestionnaireException</h1>
<p><em>Classe de gestion des exceptions.</em></p>
<p>C'est un Singleton.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/GestionnaireException.html#method_initialiser" class="">initialiser()</a><br />
<a href="../classes/GestionnaireException.html#method_configurer" class="">configurer()</a><br />
<a href="../classes/GestionnaireException.html#method_getExceptionsNbre" class="">getExceptionsNbre()</a><br />
<a href="../classes/GestionnaireException.html#method_getContexte" class="">getContexte()</a><br />
<a href="../classes/GestionnaireException.html#method_setContexte" class="">setContexte()</a><br />
<a href="../classes/GestionnaireException.html#method_gererException" class="">gererException()</a><br />
<a href="../classes/GestionnaireException.html#method_gererErreur" class="">gererErreur()</a><br />
<a href="../classes/GestionnaireException.html#method_getExceptions" class="deprecated">getExceptions()</a><br />
<a href="../classes/GestionnaireException.html#method_getExceptionsFormatees" class="">getExceptionsFormatees()</a><br />
<a href="../classes/GestionnaireException.html#method_getExceptionsTriees" class="">getExceptionsTriees()</a><br />
<a href="../classes/GestionnaireException.html#method_formaterExceptionDebug" class="">formaterExceptionDebug()</a><br />
<a href="../classes/GestionnaireException.html#method_formaterExceptionTxt" class="">formaterExceptionTxt()</a><br />
<a href="../classes/GestionnaireException.html#method_formaterExceptionXhtml" class="">formaterExceptionXhtml()</a><br />
<a href="../classes/GestionnaireException.html#method___destruct" class="">__destruct()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<a href="../classes/GestionnaireException.html#constant_MODE_CLI" class="">MODE_CLI</a><br />
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/GestionnaireException.html#method_loggerException" class="">loggerException()</a><br />
</section>
<section class="span4">
<a href="../classes/GestionnaireException.html#property_exceptions" class="">$exceptions</a><br />
<a href="../classes/GestionnaireException.html#property_contexte" class="">$contexte</a><br />
<a href="../classes/GestionnaireException.html#property_logger" class="">$logger</a><br />
<a href="../classes/GestionnaireException.html#property_afficher" class="">$afficher</a><br />
<a href="../classes/GestionnaireException.html#property_mode" class="">$mode</a><br />
<a href="../classes/GestionnaireException.html#property_parametres_obligatoires" class="">$parametres_obligatoires</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/GestionnaireException.php.html"><div class="path-wrapper">GestionnaireException.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\GestionnaireException</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Aurélien PERONNET <a href="mailto:aurelien@tela-botanica.org">aurelien@tela-botanica.org</a></p>
<p>Jean-Pascal MILCENT <a href="mailto:jmp@tela-botanica.org">jmp@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL</p>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: GestionnaireException.php 367 2011-10-03 12:40:48Z jpm $$</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="constants" name="constants"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Constants</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MODE_CLI" name="constant_MODE_CLI" class="anchor"></a>
<article id="constant_MODE_CLI" class="constant">
<h3 class="">MODE_CLI</h3>
<pre class="signature">MODE_CLI</pre>
<p><em></em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_exceptions" name="property_exceptions" class="anchor"></a>
<article class="property">
<h3 class="private ">$exceptions</h3>
<pre class="signature">$exceptions</pre>
<p><em>Liste des exceptions enregistrées</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_contexte" name="property_contexte" class="anchor"></a>
<article class="property">
<h3 class="private ">$contexte</h3>
<pre class="signature">$contexte</pre>
<p><em>Détermine si l&#039;on affiche ou non le contexte</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_logger" name="property_logger" class="anchor"></a>
<article class="property">
<h3 class="private ">$logger</h3>
<pre class="signature">$logger</pre>
<p><em>Détermine si l&#039;on loggue ou non les erreurs</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_afficher" name="property_afficher" class="anchor"></a>
<article class="property">
<h3 class="private ">$afficher</h3>
<pre class="signature">$afficher</pre>
<p><em>Détermine si l&#039;affichage des erreurs est forcé (true) ou pas (false) à la destruction de la classe</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_mode" name="property_mode" class="anchor"></a>
<article class="property">
<h3 class="private ">$mode</h3>
<pre class="signature">$mode</pre>
<p><em>Definit si php est lancé en ligne de commande ou en mode serveur</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_obligatoires" name="property_parametres_obligatoires" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres_obligatoires</h3>
<pre class="signature">$parametres_obligatoires</pre>
<p><em>Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiser" name="method_initialiser" class="anchor"></a>
<article class="method">
<h3 class="public ">initialiser()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiser()</pre>
<p><em>Initialise le Gestionnaire d&#039;exceptions et d&#039;erreur sans tenir comptes des paramêtres de config.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_configurer" name="method_configurer" class="anchor"></a>
<article class="method">
<h3 class="public ">configurer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">configurer()</pre>
<p><em>Configure le Gestionnaire d&#039;exceptions et d&#039;erreur à partir des paramêtres de config.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getExceptionsNbre" name="method_getExceptionsNbre" class="anchor"></a>
<article class="method">
<h3 class="public ">getExceptionsNbre()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getExceptionsNbre() : int</pre>
<p><em>Renvoie le nombre d&#039;exceptions et d&#039;erreurs levées.</em></p>
 
<h4>Returns</h4>
int
&mdash; <p>le nombre d'exception actuellement levées</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper">pour obtenir les exceptions formatées.</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
since
</th>
<td>
0.3
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getContexte" name="method_getContexte" class="anchor"></a>
<article class="method">
<h3 class="public ">getContexte()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getContexte() : bool</pre>
<p><em>Renvoie le booleen définissant si l&#039;on affiche le contexte ou non</em></p>
 
<h4>Returns</h4>
bool
&mdash; <p>true si on affiche le contexte sinon false.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setContexte" name="method_setContexte" class="anchor"></a>
<article class="method">
<h3 class="public ">setContexte()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setContexte( <span class="argument">$contexte</span>)</pre>
<p><em>Definit si l&#039;on veut afficher le contexte ou non</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$contexte</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_gererException" name="method_gererException" class="anchor"></a>
<article class="method">
<h3 class="public ">gererException()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">gererException(\Exception <span class="argument">$e</span>)</pre>
<p><em>Fonction de gestion des exceptions, remplace le handler par défaut.</em></p>
<p>Si une boucle génère de multiple exception (ou erreur) identique une seule sera stockée.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>\Exception</td>
<td>$e</td>
<td><p>l'exception à traiter</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_gererErreur" name="method_gererErreur" class="anchor"></a>
<article class="method">
<h3 class="public ">gererErreur()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">gererErreur(int <span class="argument">$niveau</span>, string <span class="argument">$message</span>, string <span class="argument">$fichier</span>, int <span class="argument">$ligne</span>, string <span class="argument">$contexte</span>)</pre>
<p><em>Gère les erreurs en les convertissant en exceptions (remplace la fonction gestion d&#039;erreurs native de php)</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>int</td>
<td>$niveau</td>
<td><p>le niveau de l'erreur</p></td>
</tr>
<tr>
<td>string</td>
<td>$message</td>
<td><p>le message associé à l'erreur</p></td>
</tr>
<tr>
<td>string</td>
<td>$fichier</td>
<td><p>le nom du fichier où l'erreur s'est produite</p></td>
</tr>
<tr>
<td>int</td>
<td>$ligne</td>
<td><p>la ligne où l'erreur s'est produite</p></td>
</tr>
<tr>
<td>string</td>
<td>$contexte</td>
<td><p>le contexte associé à l'erreur</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getExceptions" name="method_getExceptions" class="anchor"></a>
<article class="method">
<h3 class="public deprecated">getExceptions()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getExceptions() : string</pre>
<p><em>Renvoie les exceptions au format (X)HTML ou bien au format texte suivant le mode d&#039;utilisation de PHP.</em></p>
 
<h4>Returns</h4>
string
&mdash; <p>les exceptions formatées en texte ou (X)HTML.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<aside class="alert alert-block alert-error">
<h4>Deprecated</h4>
</aside>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
since
</th>
<td>
0.3
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getExceptionsFormatees" name="method_getExceptionsFormatees" class="anchor"></a>
<article class="method">
<h3 class="public ">getExceptionsFormatees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getExceptionsFormatees() : string</pre>
<p><em>Renvoie les exceptions au format (X)HTML ou bien au format texte suivant le mode d&#039;utilisation de PHP.</em></p>
 
<h4>Returns</h4>
string
&mdash; <p>les exceptions formatées en texte ou (X)HTML.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
since
</th>
<td>
0.3
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getExceptionsTriees" name="method_getExceptionsTriees" class="anchor"></a>
<article class="method">
<h3 class="public ">getExceptionsTriees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getExceptionsTriees() : array</pre>
<p><em>Renvoie le tableau d&#039;objets Exception générées par le script PHP triées du niveau de sévérité le plus élevé au moins élevé.</em></p>
<p>Format du tableau :
array{sévérité_1 = array{Exception1, Exception2, Exception3,...}, sévérité_1 = array{Exception1, Exception2, ...}, ...};
ATTENTION : si vous utilisez cette méthode, c'est à vous de gérer l'affichage des Exceptions. Le gestionnaire d'exception
n'enverra plus rien au navigateur ou à la console.</p>
 
<h4>Returns</h4>
array
&mdash; <p>le tableau trié d'objet Exception.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
since
</th>
<td>
0.3
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_formaterExceptionDebug" name="method_formaterExceptionDebug" class="anchor"></a>
<article class="method">
<h3 class="public ">formaterExceptionDebug()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">formaterExceptionDebug(\Exception <span class="argument">$e</span>)</pre>
<p><em>Formate en texte une exception passée en paramètre.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>\Exception</td>
<td>$e</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
since
</th>
<td>
0.3
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_formaterExceptionTxt" name="method_formaterExceptionTxt" class="anchor"></a>
<article class="method">
<h3 class="public ">formaterExceptionTxt()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">formaterExceptionTxt(\Exception <span class="argument">$e</span>)</pre>
<p><em>Formate en texte une exception passée en paramètre.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>\Exception</td>
<td>$e</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
since
</th>
<td>
0.3
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_formaterExceptionXhtml" name="method_formaterExceptionXhtml" class="anchor"></a>
<article class="method">
<h3 class="public ">formaterExceptionXhtml()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">formaterExceptionXhtml(\Exception <span class="argument">$e</span>)</pre>
<p><em>Formate en (X)HTML une exception passée en paramètre.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>\Exception</td>
<td>$e</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
since
</th>
<td>
0.3
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___destruct" name="method___destruct" class="anchor"></a>
<article class="method">
<h3 class="public ">__destruct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__destruct()</pre>
<p><em>Lors de la destruction de la classe si des exceptions n&#039;ont pas été affichées, et si le débogage est à true, elles sont
affichées.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_loggerException" name="method_loggerException" class="anchor"></a>
<article class="method">
<h3 class="private ">loggerException()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">loggerException(\Exception <span class="argument">$e</span>)</pre>
<p><em>Logue une exception donnée sous une forme lisible si self::logger vaut true.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>\Exception</td>
<td>$e</td>
<td><p>l'exception à logger</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">GestionnaireException.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/GestionnaireException.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Cli.html
New file
0,0 → 1,589
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-63671814"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-63671814" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Cli</h1>
<p><em>CLI permet de récupérer les paramètres passés en ligne de commande pour instancier une classe héritant de la classe abstraite
Script.</em></p>
<p>Elle va déclencher l'éxecution du script via l'appel de la méthode executer().
C'est une Singleton.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Cli.html#method_executer" class="">executer()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/Cli.html#method_charger" class="">charger()</a><br />
<a href="../classes/Cli.html#method_obtenirNomClasse" class="">obtenirNomClasse()</a><br />
<a href="../classes/Cli.html#method_getParametres" class="">getParametres()</a><br />
</section>
<section class="span4">
<a href="../classes/Cli.html#property_parametres_obligatoires" class="">$parametres_obligatoires</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/Cli.php.html"><div class="path-wrapper">Cli.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Cli</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
<p>Delphine CAUQUIL <a href="mailto:delphine@tela-botanica.org">delphine@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL-v3</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL-v2</p>
</td>
</tr>
<tr>
<th>
since
</th>
<td>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Cli.php 386 2011-10-28 15:56:25Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_obligatoires" name="property_parametres_obligatoires" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres_obligatoires</h3>
<pre class="signature">$parametres_obligatoires</pre>
<p><em>Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_executer" name="method_executer" class="anchor"></a>
<article class="method">
<h3 class="public ">executer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">executer() : void</pre>
<p><em>Execute la ligne de commande en récupérant le nom du script à lancer et ses paramètres.</em></p>
<p>Instancie la classe du script à lancer et appelle la méthode executer().</p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_charger" name="method_charger" class="anchor"></a>
<article class="method">
<h3 class="private ">charger()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">charger( <span class="argument">$script_nom</span>, <span class="argument">$parametres</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$script_nom</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$parametres</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_obtenirNomClasse" name="method_obtenirNomClasse" class="anchor"></a>
<article class="method">
<h3 class="private ">obtenirNomClasse()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">obtenirNomClasse( <span class="argument">$script_nom</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$script_nom</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getParametres" name="method_getParametres" class="anchor"></a>
<article class="method">
<h3 class="private ">getParametres()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getParametres( <span class="argument">$argv</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$argv</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Cli.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Cli.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Fichier.html
New file
0,0 → 1,646
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2042763931"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-2042763931" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Fichier</h1>
<p><em>Classe fournissant des méthodes statiques de manipulation des fichiers.</em></p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Fichier.html#method_creerFichier" class="">creerFichier()</a><br />
<a href="../classes/Fichier.html#method_creerFichierGzip" class="">creerFichierGzip()</a><br />
<a href="../classes/Fichier.html#method_supprimerDossier" class="">supprimerDossier()</a><br />
<a href="../classes/Fichier.html#method_convertirTaille" class="">convertirTaille()</a><br />
<a href="../classes/Fichier.html#method_getDossierTmp" class="">getDossierTmp()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<a href="../classes/Fichier.html#method_etreAccessibleEnLectureEtEcriture" class="">etreAccessibleEnLectureEtEcriture()</a><br />
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<em>No private methods found</em>
</section>
<section class="span4">
<em>No private properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/utilitaires.Fichier.php.html"><div class="path-wrapper">utilitaires/Fichier.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Utilitaire</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Fichier</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL-v3</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL-v2</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Fichier.php 351 2011-07-21 10:22:34Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_creerFichier" name="method_creerFichier" class="anchor"></a>
<article class="method">
<h3 class="public ">creerFichier()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">creerFichier( <span class="argument">$fichier</span>, <span class="argument">$contenu</span>) : string</pre>
<p><em>Créer et stocke du contenu dans un fichier.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$fichier</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$contenu</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>true en cas de succès sinon false.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_creerFichierGzip" name="method_creerFichierGzip" class="anchor"></a>
<article class="method">
<h3 class="public ">creerFichierGzip()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">creerFichierGzip( <span class="argument">$fichier</span>, <span class="argument">$contenu</span>) : string</pre>
<p><em>Créer et stocke du contenu dans un fichier compressé en Gzip.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$fichier</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$contenu</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>true en cas de succès sinon false.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimerDossier" name="method_supprimerDossier" class="anchor"></a>
<article class="method">
<h3 class="public ">supprimerDossier()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimerDossier(string <span class="argument">$dossier</span>) : void</pre>
<p><em>Supprime récursivement un dossier et tout son contenu.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$dossier</td>
<td><p>le chemin vers le dossier à supprimer.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_convertirTaille" name="method_convertirTaille" class="anchor"></a>
<article class="method">
<h3 class="public ">convertirTaille()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">convertirTaille(integer <span class="argument">$taille</span>) : string</pre>
<p><em>Convertion d&#039;un nombre d&#039;octet en kB, MB, GB.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>integer</td>
<td>$taille</td>
<td><p>la taille en octet à convertir</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la chaine représentant la taille en octets.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
<dt>See also</dt>
<dd><a href="http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html"><span class="namespace-wrapper">http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getDossierTmp" name="method_getDossierTmp" class="anchor"></a>
<article class="method">
<h3 class="public ">getDossierTmp()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getDossierTmp() : string|false</pre>
<p><em>Détermine le dossier système temporaire et détecte si nous y avons accès en lecture et écriture.</em></p>
<p>Inspiré de Zend_File_Transfer_Adapter_Abstract &amp; Zend_Cache</p>
 
<h4>Returns</h4>
string|false
&mdash; <p>le chemine vers le dossier temporaire ou false en cas d'échec.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_etreAccessibleEnLectureEtEcriture" name="method_etreAccessibleEnLectureEtEcriture" class="anchor"></a>
<article class="method">
<h3 class="protected ">etreAccessibleEnLectureEtEcriture()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">etreAccessibleEnLectureEtEcriture(mixed <span class="argument">$ressource</span>) : boolean</pre>
<p><em>Vérifie si le fichier ou dossier est accessible en lecture et écriture.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>mixed</td>
<td>$ressource</td>
<td><p>chemin vers le dossier ou fichier à tester</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true si la ressource est accessible en lecture et écriture.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Fichier.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/utilitaires/Fichier.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/RestClient.html
New file
0,0 → 1,1141
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-12626325"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-12626325" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>RestClient</h1>
<p><em>Classe client permettant d&#039;interroger des services web REST.</em></p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/RestClient.html#method_getReponseEntetes" class="">getReponseEntetes()</a><br />
<a href="../classes/RestClient.html#method_getParametre" class="">getParametre()</a><br />
<a href="../classes/RestClient.html#method_ajouterParametre" class="">ajouterParametre()</a><br />
<a href="../classes/RestClient.html#method_supprimerParametre" class="">supprimerParametre()</a><br />
<a href="../classes/RestClient.html#method_nettoyerParametres" class="">nettoyerParametres()</a><br />
<a href="../classes/RestClient.html#method_consulter" class="">consulter()</a><br />
<a href="../classes/RestClient.html#method_ajouter" class="">ajouter()</a><br />
<a href="../classes/RestClient.html#method_modifier" class="">modifier()</a><br />
<a href="../classes/RestClient.html#method_supprimer" class="">supprimer()</a><br />
<a href="../classes/RestClient.html#method_envoyerRequete" class="">envoyerRequete()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<a href="../classes/RestClient.html#constant_HTTP_URL_REQUETE_SEPARATEUR" class="">HTTP_URL_REQUETE_SEPARATEUR</a><br />
<a href="../classes/RestClient.html#constant_HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR" class="">HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR</a><br />
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<a href="../classes/RestClient.html#property_parametres" class="">$parametres</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/RestClient.html#method_traiterUrlParametres" class="">traiterUrlParametres()</a><br />
<a href="../classes/RestClient.html#method_traiterEntete" class="">traiterEntete()</a><br />
<a href="../classes/RestClient.html#method_analyserEntete" class="">analyserEntete()</a><br />
<a href="../classes/RestClient.html#method_traiterEnteteDebogage" class="">traiterEnteteDebogage()</a><br />
<a href="../classes/RestClient.html#method_reinitialiser" class="">reinitialiser()</a><br />
</section>
<section class="span4">
<a href="../classes/RestClient.html#property_http_methodes" class="">$http_methodes</a><br />
<a href="../classes/RestClient.html#property_url" class="">$url</a><br />
<a href="../classes/RestClient.html#property_reponse_entetes" class="">$reponse_entetes</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/RestClient.php.html"><div class="path-wrapper">RestClient.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\RestClient</div>
</dd>
 
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>php 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL</p>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: RestClient.php 353 2011-08-01 16:02:32Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="constants" name="constants"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Constants</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_URL_REQUETE_SEPARATEUR" name="constant_HTTP_URL_REQUETE_SEPARATEUR" class="anchor"></a>
<article id="constant_HTTP_URL_REQUETE_SEPARATEUR" class="constant">
<h3 class="">HTTP_URL_REQUETE_SEPARATEUR</h3>
<pre class="signature">HTTP_URL_REQUETE_SEPARATEUR</pre>
<p><em></em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR" name="constant_HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR" class="anchor"></a>
<article id="constant_HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR" class="constant">
<h3 class="">HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR</h3>
<pre class="signature">HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR</pre>
<p><em></em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres" name="property_parametres" class="anchor"></a>
<article class="property">
<h3 class="protected ">$parametres</h3>
<pre class="signature">$parametres</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_http_methodes" name="property_http_methodes" class="anchor"></a>
<article class="property">
<h3 class="private ">$http_methodes</h3>
<pre class="signature">$http_methodes</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_url" name="property_url" class="anchor"></a>
<article class="property">
<h3 class="private ">$url</h3>
<pre class="signature">$url</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_reponse_entetes" name="property_reponse_entetes" class="anchor"></a>
<article class="property">
<h3 class="private ">$reponse_entetes</h3>
<pre class="signature">$reponse_entetes</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getReponseEntetes" name="method_getReponseEntetes" class="anchor"></a>
<article class="method">
<h3 class="public ">getReponseEntetes()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getReponseEntetes()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getParametre" name="method_getParametre" class="anchor"></a>
<article class="method">
<h3 class="public ">getParametre()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getParametre( <span class="argument">$cle</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$cle</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_ajouterParametre" name="method_ajouterParametre" class="anchor"></a>
<article class="method">
<h3 class="public ">ajouterParametre()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">ajouterParametre( <span class="argument">$cle</span>, <span class="argument">$valeur</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$cle</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$valeur</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimerParametre" name="method_supprimerParametre" class="anchor"></a>
<article class="method">
<h3 class="public ">supprimerParametre()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimerParametre( <span class="argument">$cle</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$cle</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyerParametres" name="method_nettoyerParametres" class="anchor"></a>
<article class="method">
<h3 class="public ">nettoyerParametres()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyerParametres()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_consulter" name="method_consulter" class="anchor"></a>
<article class="method">
<h3 class="public ">consulter()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">consulter( <span class="argument">$url</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$url</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_ajouter" name="method_ajouter" class="anchor"></a>
<article class="method">
<h3 class="public ">ajouter()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">ajouter( <span class="argument">$url</span>, array <span class="argument">$donnees</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$url</td>
<td></td>
</tr>
<tr>
<td>array</td>
<td>$donnees</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_modifier" name="method_modifier" class="anchor"></a>
<article class="method">
<h3 class="public ">modifier()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">modifier( <span class="argument">$url</span>, array <span class="argument">$donnees</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$url</td>
<td></td>
</tr>
<tr>
<td>array</td>
<td>$donnees</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimer" name="method_supprimer" class="anchor"></a>
<article class="method">
<h3 class="public ">supprimer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimer( <span class="argument">$url</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$url</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_envoyerRequete" name="method_envoyerRequete" class="anchor"></a>
<article class="method">
<h3 class="public ">envoyerRequete()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">envoyerRequete( <span class="argument">$url</span>, <span class="argument">$mode</span>, array <span class="argument">$donnees</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$url</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$mode</td>
<td></td>
</tr>
<tr>
<td>array</td>
<td>$donnees</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_traiterUrlParametres" name="method_traiterUrlParametres" class="anchor"></a>
<article class="method">
<h3 class="private ">traiterUrlParametres()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">traiterUrlParametres()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_traiterEntete" name="method_traiterEntete" class="anchor"></a>
<article class="method">
<h3 class="private ">traiterEntete()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">traiterEntete()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_analyserEntete" name="method_analyserEntete" class="anchor"></a>
<article class="method">
<h3 class="private ">analyserEntete()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">analyserEntete()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_traiterEnteteDebogage" name="method_traiterEnteteDebogage" class="anchor"></a>
<article class="method">
<h3 class="private ">traiterEnteteDebogage()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">traiterEnteteDebogage( <span class="argument">$entetes_analyses</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$entetes_analyses</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_reinitialiser" name="method_reinitialiser" class="anchor"></a>
<article class="method">
<h3 class="private ">reinitialiser()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">reinitialiser()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">RestClient.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/RestClient.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/CacheSimple.html
New file
0,0 → 1,673
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-956893251"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-956893251" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>CacheSimple</h1>
<p><em>Classe Cache permettant de mettre en cache des données de façon extremement simple.</em></p>
<p>Le cache est stocker dans des fichiers textes.
Le contrôle de la durée de vie du cache se fait avec la fonction PHP filemtime.
Si la durée de vie du cache est modifiée dans le constructeur ou le fichier de config, alors la durée de vie de l'ensemble
des fichiers de cache est modifiée en conséquence.
Les clés pour le tableau des options et les valeurs par défaut sont indiquées dans l'attribut options de la classe.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/CacheSimple.html#method___construct" class="">__construct()</a><br />
<a href="../classes/CacheSimple.html#method_charger" class="">charger()</a><br />
<a href="../classes/CacheSimple.html#method_sauver" class="">sauver()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/CacheSimple.html#method_initialiserOptionsParConfig" class="">initialiserOptionsParConfig()</a><br />
</section>
<section class="span4">
<a href="../classes/CacheSimple.html#property_mise_en_cache" class="">$mise_en_cache</a><br />
<a href="../classes/CacheSimple.html#property_stockage_chemin" class="">$stockage_chemin</a><br />
<a href="../classes/CacheSimple.html#property_duree_de_vie" class="">$duree_de_vie</a><br />
<a href="../classes/CacheSimple.html#property_options" class="">$options</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/CacheSimple.php.html"><div class="path-wrapper">CacheSimple.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\CacheSimple</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>php 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
<p>Aurélien PERONNET <a href="mailto:aurelien@tela-botanica.org">aurelien@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://framework.zend.com/license/new-bsd">http://framework.zend.com/license/new-bsd</a> Licence New BSD</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL</p>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: CacheSimple.php 435 2013-09-04 14:29:43Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_mise_en_cache" name="property_mise_en_cache" class="anchor"></a>
<article class="property">
<h3 class="private ">$mise_en_cache</h3>
<pre class="signature">$mise_en_cache</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_stockage_chemin" name="property_stockage_chemin" class="anchor"></a>
<article class="property">
<h3 class="private ">$stockage_chemin</h3>
<pre class="signature">$stockage_chemin</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_duree_de_vie" name="property_duree_de_vie" class="anchor"></a>
<article class="property">
<h3 class="private ">$duree_de_vie</h3>
<pre class="signature">$duree_de_vie</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_options" name="property_options" class="anchor"></a>
<article class="property">
<h3 class="private ">$options</h3>
<pre class="signature">$options</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="public ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct( <span class="argument">$options</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$options</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_charger" name="method_charger" class="anchor"></a>
<article class="method">
<h3 class="public ">charger()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">charger(string <span class="argument">$id</span>) : string|false</pre>
<p><em>Teste si le cache est disponible pour l&#039;id donné et (si oui) le retourne (sinon renvoie false)</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>l'identifiant du Cache.</p></td>
</tr>
</table>
<h4>Returns</h4>
string|false
&mdash; <p>les données en cache.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_sauver" name="method_sauver" class="anchor"></a>
<article class="method">
<h3 class="public ">sauver()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">sauver(string <span class="argument">$contenu</span>, string <span class="argument">$id</span>) : boolean</pre>
<p><em>Sauvegarde la chaine de données dans un fichier texte.</em></p>
<p>Note : $contenu est toujours de type "string". C'est à vous de gérer la sérialisation.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$contenu</td>
<td><p>les données à mettre en cache.</p></td>
</tr>
<tr>
<td>string</td>
<td>$id</td>
<td><p>l'identifiant du Cache.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true si aucun problème</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserOptionsParConfig" name="method_initialiserOptionsParConfig" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserOptionsParConfig()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserOptionsParConfig()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">CacheSimple.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/CacheSimple.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Pattern.html
New file
0,0 → 1,580
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1559720898"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1559720898" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Pattern</h1>
<p><em>Classe fournissant des constantes correspondant à des expressions régulières de vérification très courrantes.</em></p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<em>No public methods found</em>
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<a href="../classes/Pattern.html#constant_PRENOM" class="">PRENOM</a><br />
<a href="../classes/Pattern.html#constant_NOM" class="">NOM</a><br />
<a href="../classes/Pattern.html#constant_COURRIEL" class="">COURRIEL</a><br />
<a href="../classes/Pattern.html#constant_URL" class="">URL</a><br />
<a href="../classes/Pattern.html#constant_HEURE_MINUTE" class="">HEURE_MINUTE</a><br />
<a href="../classes/Pattern.html#constant_LATITUDE" class="">LATITUDE</a><br />
<a href="../classes/Pattern.html#constant_LONGITUDE" class="">LONGITUDE</a><br />
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<em>No private methods found</em>
</section>
<section class="span4">
<em>No private properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/utilitaires.Pattern.php.html"><div class="path-wrapper">utilitaires/Pattern.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Utilitaire</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Pattern</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL-v3</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL-v2</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Pattern.php 299 2011-01-18 14:03:46Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="constants" name="constants"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Constants</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_PRENOM" name="constant_PRENOM" class="anchor"></a>
<article id="constant_PRENOM" class="constant">
<h3 class="">PRENOM</h3>
<pre class="signature">PRENOM</pre>
<p><em></em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_NOM" name="constant_NOM" class="anchor"></a>
<article id="constant_NOM" class="constant">
<h3 class="">NOM</h3>
<pre class="signature">NOM</pre>
<p><em></em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_COURRIEL" name="constant_COURRIEL" class="anchor"></a>
<article id="constant_COURRIEL" class="constant">
<h3 class="">COURRIEL</h3>
<pre class="signature">COURRIEL</pre>
<p><em></em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_URL" name="constant_URL" class="anchor"></a>
<article id="constant_URL" class="constant">
<h3 class="">URL</h3>
<pre class="signature">URL</pre>
<p><em></em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HEURE_MINUTE" name="constant_HEURE_MINUTE" class="anchor"></a>
<article id="constant_HEURE_MINUTE" class="constant">
<h3 class="">HEURE_MINUTE</h3>
<pre class="signature">HEURE_MINUTE</pre>
<p><em></em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_LATITUDE" name="constant_LATITUDE" class="anchor"></a>
<article id="constant_LATITUDE" class="constant">
<h3 class="">LATITUDE</h3>
<pre class="signature">LATITUDE</pre>
<p><em></em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_LONGITUDE" name="constant_LONGITUDE" class="anchor"></a>
<article id="constant_LONGITUDE" class="constant">
<h3 class="">LONGITUDE</h3>
<pre class="signature">LONGITUDE</pre>
<p><em></em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Pattern.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/utilitaires/Pattern.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Tableau.html
New file
0,0 → 1,542
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-818241723"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-818241723" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Tableau</h1>
<p><em>Classe fournissant des méthodes statiques de manipulation des tableaux (Array).</em></p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Tableau.html#method_etendre" class="">etendre()</a><br />
<a href="../classes/Tableau.html#method_trierTableauMd" class="deprecated">trierTableauMd()</a><br />
<a href="../classes/Tableau.html#method_trierMD" class="">trierMD()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<em>No private methods found</em>
</section>
<section class="span4">
<em>No private properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/utilitaires.Tableau.php.html"><div class="path-wrapper">utilitaires/Tableau.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Utilitaire</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Tableau</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL-v3</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL-v2</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Tableau.php 400 2011-11-25 16:26:26Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_etendre" name="method_etendre" class="anchor"></a>
<article class="method">
<h3 class="public ">etendre()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">etendre(array <span class="argument">$tableau_a_etendre</span>, array <span class="argument">$tableau_a_copier</span>) : void</pre>
<p><em>Etend le tableau à étendre avec les données du tableau à copier. Si des clés sont identiques entre les deux tableaux
une erreur est déclenchée et la valeur du tableau à étendre est gardée. Si les deux tableaux ont des clés numériques
leurs valeurs sont gardées (à la différence de array_merge).</em></p>
<p>Les tableaux sont passés par références et le tableau à copier est progressivement détruit pour éviter la consomation
de mémoire.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tableau_a_etendre</td>
<td></td>
</tr>
<tr>
<td>array</td>
<td>$tableau_a_copier</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_trierTableauMd" name="method_trierTableauMd" class="anchor"></a>
<article class="method">
<h3 class="public deprecated">trierTableauMd()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">trierTableauMd( <span class="argument">$array</span>, <span class="argument">$cols</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$array</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$cols</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<aside class="alert alert-block alert-error">
<h4>Deprecated</h4>
Utiliser la méthode trierMD()
</aside>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_trierMD" name="method_trierMD" class="anchor"></a>
<article class="method">
<h3 class="public ">trierMD()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">trierMD(Array <span class="argument">$array</span>, Array <span class="argument">$cols</span>) : Array</pre>
<p><em>Permet de trier un tableau multi-dimenssionnel en gardant l&#039;ordre des clés.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>Array</td>
<td>$array</td>
<td><p>le tableau à trier</p></td>
</tr>
<tr>
<td>Array</td>
<td>$cols</td>
<td><p>tableau indiquant en clé la colonne à trier et en valeur l'ordre avec SORT_ASC ou SORT_DESC</p></td>
</tr>
</table>
<h4>Returns</h4>
Array
&mdash; <p>le tableau trié.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper">Post du 21-Jun-2009 12:38</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
author
</th>
<td>
<p>cagret at gmail dot com</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Tableau.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/utilitaires/Tableau.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/I18n.html
New file
0,0 → 1,1038
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1521194684"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1521194684" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>I18n</h1>
<p><em>I18n permet de traduire une application à partir de données stockées dans des fichiers ini.</em></p>
<p>Si vous souhaitez utiliser le fonctionnement par défaut vous devrez :</p>
<ul>
<li>déposer les fichiers ini dans le dossier définit par la variable de config "chemin_i18n".</li>
<li>nommer les fichiers selon la forme "locale.ini" (Ex.: fr.ini ou fr_CH.ini ).</li>
</ul>
<p>Elle offre l'accès en lecture seule aux paramètres des fichiers ini.
C'est une Singleton. Une seule classe de traduction peut être instanciée par Application.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/I18n.html#method_get" class="">get()</a><br />
<a href="../classes/I18n.html#method_charger" class="">charger()</a><br />
<a href="../classes/I18n.html#method_setLangue" class="">setLangue()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<a href="../classes/I18n.html#constant_FORMAT_INI" class="">FORMAT_INI</a><br />
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/I18n.html#method___construct" class="">__construct()</a><br />
<a href="../classes/I18n.html#method_getValeur" class="">getValeur()</a><br />
<a href="../classes/I18n.html#method_chargerFichierIni" class="">chargerFichierIni()</a><br />
<a href="../classes/I18n.html#method_analyserTableauIni" class="">analyserTableauIni()</a><br />
<a href="../classes/I18n.html#method_evaluerCle" class="">evaluerCle()</a><br />
<a href="../classes/I18n.html#method_trouverLangue" class="">trouverLangue()</a><br />
<a href="../classes/I18n.html#method_verifierCreationInstance" class="">verifierCreationInstance()</a><br />
<a href="../classes/I18n.html#method_ajouterErreur" class="">ajouterErreur()</a><br />
</section>
<section class="span4">
<a href="../classes/I18n.html#property_instance" class="">$instance</a><br />
<a href="../classes/I18n.html#property_traductions" class="">$traductions</a><br />
<a href="../classes/I18n.html#property_langue" class="">$langue</a><br />
<a href="../classes/I18n.html#property_parametres_obligatoires" class="">$parametres_obligatoires</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/I18n.php.html"><div class="path-wrapper">I18n.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\I18n</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL</p>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL</p>
</td>
</tr>
<tr>
<th>
since
</th>
<td>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: I18n.php 330 2011-02-24 18:03:07Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="constants" name="constants"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Constants</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_FORMAT_INI" name="constant_FORMAT_INI" class="anchor"></a>
<article id="constant_FORMAT_INI" class="constant">
<h3 class="">FORMAT_INI</h3>
<pre class="signature">FORMAT_INI</pre>
<p><em>Format de traduction utilisant les fichier .ini</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_instance" name="property_instance" class="anchor"></a>
<article class="property">
<h3 class="private ">$instance</h3>
<pre class="signature">$instance</pre>
<p><em>Instance de la classe pointant sur elle même (pour le pattern singleton)</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_traductions" name="property_traductions" class="anchor"></a>
<article class="property">
<h3 class="private ">$traductions</h3>
<pre class="signature">$traductions</pre>
<p><em>Fichiers de traduction disponibles.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_langue" name="property_langue" class="anchor"></a>
<article class="property">
<h3 class="private ">$langue</h3>
<pre class="signature">$langue</pre>
<p><em>Langue courrante utilisée par l&#039;application.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_obligatoires" name="property_parametres_obligatoires" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres_obligatoires</h3>
<pre class="signature">$parametres_obligatoires</pre>
<p><em>Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_get" name="method_get" class="anchor"></a>
<article class="method">
<h3 class="public ">get()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">get( <span class="argument">$identifiant</span>, <span class="argument">$langue</span>) : string</pre>
<p><em>Accesseur pour la valeur d&#039;une traduction</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$identifiant</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$langue</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la valeur du paramètre</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_charger" name="method_charger" class="anchor"></a>
<article class="method">
<h3 class="public ">charger()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">charger( <span class="argument">$langue</span>, <span class="argument">$fichier</span>, <span class="argument">$format</span>) : boolean</pre>
<p><em>Charge un fichier ini dans le tableau des paramètres de l&#039;appli</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$langue</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$fichier</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$format</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true, si le fichier a été trouvé et correctement chargé, sinon false.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setLangue" name="method_setLangue" class="anchor"></a>
<article class="method">
<h3 class="public ">setLangue()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setLangue( <span class="argument">$langue</span>) : array</pre>
<p><em>Définit la langue utiliser pour rechercher une traduction.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$langue</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>le fichier ini parsé</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="private ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getValeur" name="method_getValeur" class="anchor"></a>
<article class="method">
<h3 class="private ">getValeur()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getValeur(string <span class="argument">$param</span>, array <span class="argument">$i18n</span>) : mixed</pre>
<p><em>Renvoie la valeur demandé grâce une chaine de paramètres</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$param</td>
<td><p>la chaine identifiante</p></td>
</tr>
<tr>
<td>array</td>
<td>$i18n</td>
<td><p>le tableau de traductions</p></td>
</tr>
</table>
<h4>Returns</h4>
mixed
&mdash; <p>la valeur correspondante à la chaine identifiante si elle est trouvée, sinon false.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_chargerFichierIni" name="method_chargerFichierIni" class="anchor"></a>
<article class="method">
<h3 class="private ">chargerFichierIni()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">chargerFichierIni(string <span class="argument">$fichier_ini</span>, string <span class="argument">$langue</span>) : boolean</pre>
<p><em>Parse le fichier ini donné en paramètre</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$fichier_ini</td>
<td><p>nom du fichier ini à parser</p></td>
</tr>
<tr>
<td>string</td>
<td>$langue</td>
<td><p>la langue correspondant au fichier</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true si le chargement c'est bien passé, sinon false.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_analyserTableauIni" name="method_analyserTableauIni" class="anchor"></a>
<article class="method">
<h3 class="private ">analyserTableauIni()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">analyserTableauIni(array <span class="argument">$i18n</span>) : array</pre>
<p><em>Analyse un tableau de traductions pour évaluer les clés.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$i18n</td>
<td><p>le tableau de traductions</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>le tableau analysé et modifié si nécessaire.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_evaluerCle" name="method_evaluerCle" class="anchor"></a>
<article class="method">
<h3 class="private ">evaluerCle()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">evaluerCle(array <span class="argument">$i18n</span>, string <span class="argument">$cle</span>, string <span class="argument">$valeur</span>)</pre>
<p><em>Dans le cas des chaines de traduction à sous clé (ex.: cle.souscle), cette méthode
évalue les valeurs correspondantes et créée les sous tableaux associés.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$i18n</td>
<td><p>tableau de traductions (par référence)</p></td>
</tr>
<tr>
<td>string</td>
<td>$cle</td>
<td><p>la cle dans le tableau</p></td>
</tr>
<tr>
<td>string</td>
<td>$valeur</td>
<td><p>la valeur à affecter</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_trouverLangue" name="method_trouverLangue" class="anchor"></a>
<article class="method">
<h3 class="private ">trouverLangue()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">trouverLangue()</pre>
<p><em>Cherche l&#039;information sur la langue demandée par l&#039;application</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_verifierCreationInstance" name="method_verifierCreationInstance" class="anchor"></a>
<article class="method">
<h3 class="private ">verifierCreationInstance()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">verifierCreationInstance()</pre>
<p><em>Vérifie si l&#039;instance de classe à été crée, si non la crée</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_ajouterErreur" name="method_ajouterErreur" class="anchor"></a>
<article class="method">
<h3 class="private ">ajouterErreur()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">ajouterErreur( <span class="argument">$m</span>, <span class="argument">$e</span>)</pre>
<p><em>Ajouter une message d&#039;erreur</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$m</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$e</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">I18n.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/I18n.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Log.html
New file
0,0 → 1,972
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1711036386"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1711036386" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Log</h1>
<p><em>Classe permettant de logger des messages dans les fichier situés dans le dossier de log.</em></p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Log.html#method_initialiser" class="">initialiser()</a><br />
<a href="../classes/Log.html#method_configurer" class="">configurer()</a><br />
<a href="../classes/Log.html#method_ajouterEntree" class="">ajouterEntree()</a><br />
<a href="../classes/Log.html#method_viderLog" class="">viderLog()</a><br />
<a href="../classes/Log.html#method_verifierOuvrirFichier" class="">verifierOuvrirFichier()</a><br />
<a href="../classes/Log.html#method___destruct" class="">__destruct()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/Log.html#method_verifierTailleFichierOuArchiver" class="">verifierTailleFichierOuArchiver()</a><br />
<a href="../classes/Log.html#method_desactiverEcriture" class="">desactiverEcriture()</a><br />
</section>
<section class="span4">
<a href="../classes/Log.html#property_logger" class="">$logger</a><br />
<a href="../classes/Log.html#property_fichiersLog" class="">$fichiersLog</a><br />
<a href="../classes/Log.html#property_cheminLogs" class="">$cheminLogs</a><br />
<a href="../classes/Log.html#property_droitLogger" class="">$droitLogger</a><br />
<a href="../classes/Log.html#property_timeZone" class="">$timeZone</a><br />
<a href="../classes/Log.html#property_tailleMax" class="">$tailleMax</a><br />
<a href="../classes/Log.html#property_sd" class="">$sd</a><br />
<a href="../classes/Log.html#property_ext" class="">$ext</a><br />
<a href="../classes/Log.html#property_parametres_obligatoires" class="">$parametres_obligatoires</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/Log.php.html"><div class="path-wrapper">Log.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Log</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Aurélien PERONNET <a href="mailto:aurelien@tela-botanica.org">aurelien@tela-botanica.org</a></p>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL</p>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Log.php 274 2010-12-28 15:37:22Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_logger" name="property_logger" class="anchor"></a>
<article class="property">
<h3 class="private ">$logger</h3>
<pre class="signature">$logger</pre>
<p><em>Boolean indiquant si l&#039;on doit utiliser les logs ou pas.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_fichiersLog" name="property_fichiersLog" class="anchor"></a>
<article class="property">
<h3 class="private ">$fichiersLog</h3>
<pre class="signature">$fichiersLog</pre>
<p><em>Tableau associatif stockant les descripteurs de fichiers.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_cheminLogs" name="property_cheminLogs" class="anchor"></a>
<article class="property">
<h3 class="private ">$cheminLogs</h3>
<pre class="signature">$cheminLogs</pre>
<p><em>Chemin de base du dossier log de l&#039;application.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_droitLogger" name="property_droitLogger" class="anchor"></a>
<article class="property">
<h3 class="private ">$droitLogger</h3>
<pre class="signature">$droitLogger</pre>
<p><em>Booleen indiquant si l&#039;on peut correctement écrire dans les fichiers de logs.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_timeZone" name="property_timeZone" class="anchor"></a>
<article class="property">
<h3 class="private ">$timeZone</h3>
<pre class="signature">$timeZone</pre>
<p><em>Zone horaire (pour éviter des avertissements dans les dates).</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_tailleMax" name="property_tailleMax" class="anchor"></a>
<article class="property">
<h3 class="private ">$tailleMax</h3>
<pre class="signature">$tailleMax</pre>
<p><em>Taille maximum d&#039;un fichier de log avant que celui ne soit archivé (en octets).</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_sd" name="property_sd" class="anchor"></a>
<article class="property">
<h3 class="private ">$sd</h3>
<pre class="signature">$sd</pre>
<p><em>séparateur de dossier dans un chemin.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_ext" name="property_ext" class="anchor"></a>
<article class="property">
<h3 class="private ">$ext</h3>
<pre class="signature">$ext</pre>
<p><em>Extension des fichiers de log.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_obligatoires" name="property_parametres_obligatoires" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres_obligatoires</h3>
<pre class="signature">$parametres_obligatoires</pre>
<p><em>Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiser" name="method_initialiser" class="anchor"></a>
<article class="method">
<h3 class="public ">initialiser()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiser()</pre>
<p><em>Initialiser les logs par défaut, sans tenir comptes des paramêtres de config.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_configurer" name="method_configurer" class="anchor"></a>
<article class="method">
<h3 class="public ">configurer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">configurer()</pre>
<p><em>Configure le Log à partir des paramêtres de config.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_ajouterEntree" name="method_ajouterEntree" class="anchor"></a>
<article class="method">
<h3 class="public ">ajouterEntree()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">ajouterEntree(string <span class="argument">$nomFichier</span>, <span class="argument">$entree</span>, <span class="argument">$mode</span>)</pre>
<p><em>Ajoute une entrée au log spécifié par le paramètre $nomFichier</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$nomFichier</td>
<td><p>le nom du fichier dans lequel écrire</p></td>
</tr>
<tr>
<td></td>
<td>$entree</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$mode</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_viderLog" name="method_viderLog" class="anchor"></a>
<article class="method">
<h3 class="public ">viderLog()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">viderLog(string <span class="argument">$nomFichier</span>)</pre>
<p><em>Vide un fichier log indiqué</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$nomFichier</td>
<td><p>le nom du fichier à vider</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_verifierOuvrirFichier" name="method_verifierOuvrirFichier" class="anchor"></a>
<article class="method">
<h3 class="public ">verifierOuvrirFichier()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">verifierOuvrirFichier(string <span class="argument">$nomFichier</span>, <span class="argument">$mode</span>) : boolean</pre>
<p><em>Vérifie la présence d&#039;un fichier dans le tableau, ses droits d&#039;écriture, l&#039;ouvre si nécessaire.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$nomFichier</td>
<td><p>le nom du fichier dont on doit vérifier la présence</p></td>
</tr>
<tr>
<td></td>
<td>$mode</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true si le fichier est ouvert ou maintenant accessible, false sinon</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___destruct" name="method___destruct" class="anchor"></a>
<article class="method">
<h3 class="public ">__destruct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__destruct()</pre>
<p><em>Destructeur de classe, ferme les descripteurs ouverts.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_verifierTailleFichierOuArchiver" name="method_verifierTailleFichierOuArchiver" class="anchor"></a>
<article class="method">
<h3 class="private ">verifierTailleFichierOuArchiver()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">verifierTailleFichierOuArchiver(string <span class="argument">$nomFichier</span>)</pre>
<p><em>Vérifie la taille d&#039;un fichier donné et si celle ci est trop importante
archive le fichier de log</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$nomFichier</td>
<td><p>nom du fichier à vérifier</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_desactiverEcriture" name="method_desactiverEcriture" class="anchor"></a>
<article class="method">
<h3 class="private ">desactiverEcriture()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">desactiverEcriture(string <span class="argument">$nomFichier</span>)</pre>
<p><em>Désactive l&#039;écriture du log et envoie un message au gestionnaire d&#039;erreurs</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$nomFichier</td>
<td><p>le nom du fichier qui a causé l'erreur</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Log.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Log.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/SquelettePhp.html
New file
0,0 → 1,475
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-307909126"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-307909126" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>SquelettePhp</h1>
<p><em>Classe SquelettePhp, traitant les squelette Php utilisant la syntaxe courte php ou pas.</em></p>
<p>Ces méthodes sont statiques.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/SquelettePhp.html#method_analyser" class="">analyser()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/SquelettePhp.html#method_traiterTagsCourts" class="">traiterTagsCourts()</a><br />
</section>
<section class="span4">
<em>No private properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/SquelettePhp.php.html"><div class="path-wrapper">SquelettePhp.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\SquelettePhp</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>php5</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL</p>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: SquelettePhp.php 241 2010-12-06 15:19:07Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_analyser" name="method_analyser" class="anchor"></a>
<article class="method">
<h3 class="public ">analyser()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">analyser(String <span class="argument">$fichier</span>, Array <span class="argument">$donnees</span>) : boolean</pre>
<p><em>Fonction prenant en paramètre un chemin de fichier squelette et un tableau associatif de données,
en extrait les variables, charge le squelette et retourne le résultat des deux combinés.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>String</td>
<td>$fichier</td>
<td><p>le chemin du fichier du squelette</p></td>
</tr>
<tr>
<td>Array</td>
<td>$donnees</td>
<td><p>un tableau associatif contenant les variables a injecter dans le squelette.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>false si la vue n'existe pas, sinon la chaine résultat.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_traiterTagsCourts" name="method_traiterTagsCourts" class="anchor"></a>
<article class="method">
<h3 class="private ">traiterTagsCourts()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">traiterTagsCourts(String <span class="argument">$chemin_squelette</span>) : string</pre>
<p><em>Fonction chargeant le contenu du squelette et remplaçant les tags court php (&lt;?= .</em></p>
<p>..) par un tag long avec echo.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>String</td>
<td>$chemin_squelette</td>
<td><p>le chemin du fichier du squelette</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>le contenu du fichier du squelette php avec les tags courts remplacés.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">SquelettePhp.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/SquelettePhp.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Registre.html
New file
0,0 → 1,595
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2114325617"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-2114325617" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Registre</h1>
<p><em>Classe Registre, qui permet un accès à différentes variables et paramètres à travers les autres classes.</em></p>
<p>C'est un remplaçant à la variable magique $_GLOBALS de Php.
C'est un singleton.
Si vous voulez paramètré votre application via un fichier de configuration, utilisez plutôt la classe @see Config.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Registre.html#method_set" class="">set()</a><br />
<a href="../classes/Registre.html#method_get" class="">get()</a><br />
<a href="../classes/Registre.html#method_detruire" class="">detruire()</a><br />
<a href="../classes/Registre.html#method_existe" class="">existe()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<em>No private methods found</em>
</section>
<section class="span4">
<a href="../classes/Registre.html#property_stockage" class="">$stockage</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/Registre.php.html"><div class="path-wrapper">Registre.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Registre</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>php 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jmp@tela-botanica.org">jmp@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL</p>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Registre.php 301 2011-01-18 14:23:52Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_stockage" name="property_stockage" class="anchor"></a>
<article class="property">
<h3 class="private ">$stockage</h3>
<pre class="signature">$stockage</pre>
<p><em>Tableau associatif stockant les variables.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_set" name="method_set" class="anchor"></a>
<article class="method">
<h3 class="public ">set()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">set( <span class="argument">$intitule</span>, <span class="argument">$objet</span>)</pre>
<p><em>Ajoute un objet au tableau selon un intitulé donné.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$intitule</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$objet</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_get" name="method_get" class="anchor"></a>
<article class="method">
<h3 class="public ">get()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">get( <span class="argument">$intitule</span>) : mixed</pre>
<p><em>Renvoie le contenu associé à l&#039;intitulé donné en paramètre.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$intitule</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
mixed
&mdash; <p>l'objet associé à l'intitulé ou null s'il n'est pas présent</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_detruire" name="method_detruire" class="anchor"></a>
<article class="method">
<h3 class="public ">detruire()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">detruire( <span class="argument">$intitule</span>)</pre>
<p><em>Détruit l&#039;objet associé à l&#039;intitulé, n&#039;a pas d&#039;effet si il n&#039;y a pas d&#039;objet associé.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$intitule</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_existe" name="method_existe" class="anchor"></a>
<article class="method">
<h3 class="public ">existe()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">existe( <span class="argument">$intitule</span>) : boolean</pre>
<p><em>Teste si le registre contient une donnée pour un intitulé d&#039;entrée donné.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$intitule</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true si un objet associé à cet intitulé est présent, false sinon</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Registre.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Registre.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/CacheSqlite.html
New file
0,0 → 1,1585
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-202955332"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-202955332" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>CacheSqlite</h1>
<p><em></em></p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/CacheSqlite.html#method___construct" class="">__construct()</a><br />
<a href="../classes/CacheSqlite.html#method___destruct" class="">__destruct()</a><br />
<a href="../classes/CacheSqlite.html#method_setEmplacement" class="">setEmplacement()</a><br />
<a href="../classes/CacheSqlite.html#method_charger" class="">charger()</a><br />
<a href="../classes/CacheSqlite.html#method_tester" class="">tester()</a><br />
<a href="../classes/CacheSqlite.html#method_sauver" class="">sauver()</a><br />
<a href="../classes/CacheSqlite.html#method_supprimer" class="">supprimer()</a><br />
<a href="../classes/CacheSqlite.html#method_nettoyer" class="">nettoyer()</a><br />
<a href="../classes/CacheSqlite.html#method_getIds" class="">getIds()</a><br />
<a href="../classes/CacheSqlite.html#method_getTags" class="">getTags()</a><br />
<a href="../classes/CacheSqlite.html#method_getIdsAvecLesTags" class="">getIdsAvecLesTags()</a><br />
<a href="../classes/CacheSqlite.html#method_getIdsSansLesTags" class="">getIdsSansLesTags()</a><br />
<a href="../classes/CacheSqlite.html#method_getIdsAvecUnTag" class="">getIdsAvecUnTag()</a><br />
<a href="../classes/CacheSqlite.html#method_getPourcentageRemplissage" class="">getPourcentageRemplissage()</a><br />
<a href="../classes/CacheSqlite.html#method_getMetadonnees" class="">getMetadonnees()</a><br />
<a href="../classes/CacheSqlite.html#method_ajouterSupplementDureeDeVie" class="">ajouterSupplementDureeDeVie()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<a href="../classes/CacheSqlite.html#property_options" class="">$options</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/CacheSqlite.html#method_initialiserOptionsParConfig" class="">initialiserOptionsParConfig()</a><br />
<a href="../classes/CacheSqlite.html#method_setOptions" class="">setOptions()</a><br />
<a href="../classes/CacheSqlite.html#method_getConnexion" class="">getConnexion()</a><br />
<a href="../classes/CacheSqlite.html#method_requeter" class="">requeter()</a><br />
<a href="../classes/CacheSqlite.html#method_defragmenterAutomatiquement" class="">defragmenterAutomatiquement()</a><br />
<a href="../classes/CacheSqlite.html#method_enregisterTag" class="">enregisterTag()</a><br />
<a href="../classes/CacheSqlite.html#method_creerStructure" class="">creerStructure()</a><br />
<a href="../classes/CacheSqlite.html#method_verifierBddStructureVersion" class="">verifierBddStructureVersion()</a><br />
<a href="../classes/CacheSqlite.html#method_nettoyerSqlite" class="">nettoyerSqlite()</a><br />
<a href="../classes/CacheSqlite.html#method_verifierEtCreerStructureBdd" class="">verifierEtCreerStructureBdd()</a><br />
</section>
<section class="span4">
<a href="../classes/CacheSqlite.html#property_bdd" class="">$bdd</a><br />
<a href="../classes/CacheSqlite.html#property_structure_ok" class="">$structure_ok</a><br />
<a href="../classes/CacheSqlite.html#property_Cache" class="">$Cache</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/CacheSqlite.php.html"><div class="path-wrapper">CacheSqlite.php</div></a></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\CacheSqlite</div>
</dd>
 
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_options" name="property_options" class="anchor"></a>
<article class="property">
<h3 class="protected ">$options</h3>
<pre class="signature">$options : array</pre>
<p><em>Options disponibles :</em></p>
<p>====> (string) stockage_chemin :
Chemin vers le fichier contenant la base SQLite.</p>
<p>====> (int) defragmentation_auto :</p>
<ul>
<li>Désactive / Régler le processus de défragmentation automatique</li>
<li>Le processus de défragmentation automatiques réduit la taille du fichier contenant la base de données
quand un ajout ou une suppression de cache est réalisée :
0 => pas de défragmentation automatique
1 => défragmentation automatique systématique
x (integer) > 1 => défragmentation automatique toutes les 1 fois (au hasard) sur x ajout ou suppression de cache</li>
</ul>
 
<h4>Type</h4>
array
&mdash; options disponibles </article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_bdd" name="property_bdd" class="anchor"></a>
<article class="property">
<h3 class="private ">$bdd</h3>
<pre class="signature">$bdd : mixed</pre>
<p><em>DB ressource</em></p>
 
<h4>Type</h4>
mixed
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_structure_ok" name="property_structure_ok" class="anchor"></a>
<article class="property">
<h3 class="private ">$structure_ok</h3>
<pre class="signature">$structure_ok : boolean</pre>
<p><em>Boolean to store if the structure has benn checked or not</em></p>
 
<h4>Type</h4>
boolean
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_Cache" name="property_Cache" class="anchor"></a>
<article class="property">
<h3 class="private ">$Cache</h3>
<pre class="signature">$Cache</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="public ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct(array <span class="argument">$options</span>, \Cache <span class="argument">$cache</span>) : void</pre>
<p><em>Constructor</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$options</td>
<td><p>Associative array of options</p></td>
</tr>
<tr>
<td><a href="../classes/Cache.html">\Cache</a></td>
<td>$cache</td>
<td></td>
</tr>
</table>
<h4>Throws</h4>
<dl>
<dt>\Zend_cache_Exception</dt>
<dd></dd>
</dl>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___destruct" name="method___destruct" class="anchor"></a>
<article class="method">
<h3 class="public ">__destruct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__destruct() : void</pre>
<p><em>Destructor</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setEmplacement" name="method_setEmplacement" class="anchor"></a>
<article class="method">
<h3 class="public ">setEmplacement()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setEmplacement( <span class="argument">$emplacement</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$emplacement</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_charger" name="method_charger" class="anchor"></a>
<article class="method">
<h3 class="public ">charger()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">charger(string <span class="argument">$id</span>, <span class="argument">$ne_pas_tester_validiter_du_cache</span>) : string|false</pre>
<p><em>Test if a cache is available for the given id and (if yes) return it (false else)</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
<tr>
<td></td>
<td>$ne_pas_tester_validiter_du_cache</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string|false
&mdash; <p>Cached datas</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_tester" name="method_tester" class="anchor"></a>
<article class="method">
<h3 class="public ">tester()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">tester(string <span class="argument">$id</span>) : mixed|false</pre>
<p><em>Test if a cache is available or not (for the given id)</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
mixed|false
&mdash; <p>(a cache is not available) or "last modified" timestamp (int) of the available cache record</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_sauver" name="method_sauver" class="anchor"></a>
<article class="method">
<h3 class="public ">sauver()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">sauver( <span class="argument">$donnees</span>, string <span class="argument">$id</span>, array <span class="argument">$tags</span>, <span class="argument">$duree_vie_specifique</span>) : boolean</pre>
<p><em>Save some string datas into a cache record</em></p>
<p>Note : $data is always "string" (serialization is done by the
core not by the backend)</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$donnees</td>
<td></td>
</tr>
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
<tr>
<td>array</td>
<td>$tags</td>
<td><p>Array of strings, the cache record will be tagged by each string entry</p></td>
</tr>
<tr>
<td></td>
<td>$duree_vie_specifique</td>
<td></td>
</tr>
</table>
<h4>Throws</h4>
<dl>
<dt>\Zend_Cache_Exception</dt>
<dd></dd>
</dl>
<h4>Returns</h4>
boolean
&mdash; <p>True if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimer" name="method_supprimer" class="anchor"></a>
<article class="method">
<h3 class="public ">supprimer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimer(string <span class="argument">$id</span>) : boolean</pre>
<p><em>Remove a cache record</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyer" name="method_nettoyer" class="anchor"></a>
<article class="method">
<h3 class="public ">nettoyer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyer(string <span class="argument">$mode</span>, array <span class="argument">$tags</span>) : boolean</pre>
<p><em>Clean some cache records</em></p>
<p>Available modes are :
Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used)
Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used)
Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
<p>Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags}</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
<p>Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => remove cache entries matching any given tags</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$mode</td>
<td><p>Clean mode</p></td>
</tr>
<tr>
<td>array</td>
<td>$tags</td>
<td><p>Array of tags</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIds" name="method_getIds" class="anchor"></a>
<article class="method">
<h3 class="public ">getIds()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIds() : array</pre>
<p><em>Return an array of stored cache ids</em></p>
 
<h4>Returns</h4>
array
&mdash; <p>array of stored cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getTags" name="method_getTags" class="anchor"></a>
<article class="method">
<h3 class="public ">getTags()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getTags() : array</pre>
<p><em>Return an array of stored tags</em></p>
 
<h4>Returns</h4>
array
&mdash; <p>array of stored tags (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIdsAvecLesTags" name="method_getIdsAvecLesTags" class="anchor"></a>
<article class="method">
<h3 class="public ">getIdsAvecLesTags()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIdsAvecLesTags(array <span class="argument">$tags</span>) : array</pre>
<p><em>Return an array of stored cache ids which match given tags</em></p>
<p>In case of multiple tags, a logical AND is made between tags</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tags</td>
<td><p>array of tags</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of matching cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIdsSansLesTags" name="method_getIdsSansLesTags" class="anchor"></a>
<article class="method">
<h3 class="public ">getIdsSansLesTags()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIdsSansLesTags(array <span class="argument">$tags</span>) : array</pre>
<p><em>Return an array of stored cache ids which don&#039;t match given tags</em></p>
<p>In case of multiple tags, a logical OR is made between tags</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tags</td>
<td><p>array of tags</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of not matching cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIdsAvecUnTag" name="method_getIdsAvecUnTag" class="anchor"></a>
<article class="method">
<h3 class="public ">getIdsAvecUnTag()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIdsAvecUnTag(array <span class="argument">$tags</span>) : array</pre>
<p><em>Return an array of stored cache ids which match any given tags</em></p>
<p>In case of multiple tags, a logical AND is made between tags</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tags</td>
<td><p>array of tags</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of any matching cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getPourcentageRemplissage" name="method_getPourcentageRemplissage" class="anchor"></a>
<article class="method">
<h3 class="public ">getPourcentageRemplissage()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getPourcentageRemplissage() : int</pre>
<p><em>Return the filling percentage of the backend storage</em></p>
 
<h4>Throws</h4>
<dl>
<dt>\Zend_Cache_Exception</dt>
<dd></dd>
</dl>
<h4>Returns</h4>
int
&mdash; <p>integer between 0 and 100</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getMetadonnees" name="method_getMetadonnees" class="anchor"></a>
<article class="method">
<h3 class="public ">getMetadonnees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getMetadonnees(string <span class="argument">$id</span>) : array</pre>
<p><em>Return an array of metadatas for the given cache id</em></p>
<p>The array must include these keys :</p>
<ul>
<li>expire : the expire timestamp</li>
<li>tags : a string array of tags</li>
<li>mtime : timestamp of last modification time</li>
</ul>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of metadatas (false if the cache id is not found)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_ajouterSupplementDureeDeVie" name="method_ajouterSupplementDureeDeVie" class="anchor"></a>
<article class="method">
<h3 class="public ">ajouterSupplementDureeDeVie()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">ajouterSupplementDureeDeVie(string <span class="argument">$id</span>, <span class="argument">$supplement_duree_de_vie</span>) : boolean</pre>
<p><em>Give (if possible) an extra lifetime to the given cache id</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>cache id</p></td>
</tr>
<tr>
<td></td>
<td>$supplement_duree_de_vie</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true if ok</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserOptionsParConfig" name="method_initialiserOptionsParConfig" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserOptionsParConfig()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserOptionsParConfig()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setOptions" name="method_setOptions" class="anchor"></a>
<article class="method">
<h3 class="private ">setOptions()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setOptions( <span class="argument">$options</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$options</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getConnexion" name="method_getConnexion" class="anchor"></a>
<article class="method">
<h3 class="private ">getConnexion()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getConnexion() : resource</pre>
<p><em>Return the connection resource</em></p>
<p>If we are not connected, the connection is made</p>
 
<h4>Throws</h4>
<dl>
<dt>\Zend_Cache_Exception</dt>
<dd></dd>
</dl>
<h4>Returns</h4>
resource
&mdash; <p>Connection resource</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_requeter" name="method_requeter" class="anchor"></a>
<article class="method">
<h3 class="private ">requeter()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">requeter(string <span class="argument">$requete</span>) : mixed|false</pre>
<p><em>Execute une requête SQL sans afficher de messages d&#039;erreur.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$requete</td>
<td><p>requête SQL</p></td>
</tr>
</table>
<h4>Returns</h4>
mixed|false
&mdash; <p>resultats de la requête</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_defragmenterAutomatiquement" name="method_defragmenterAutomatiquement" class="anchor"></a>
<article class="method">
<h3 class="private ">defragmenterAutomatiquement()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">defragmenterAutomatiquement() : void</pre>
<p><em>Deal with the automatic vacuum process</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_enregisterTag" name="method_enregisterTag" class="anchor"></a>
<article class="method">
<h3 class="private ">enregisterTag()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">enregisterTag(string <span class="argument">$id</span>, string <span class="argument">$tag</span>) : boolean</pre>
<p><em>Register a cache id with the given tag</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
<tr>
<td>string</td>
<td>$tag</td>
<td><p>Tag</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_creerStructure" name="method_creerStructure" class="anchor"></a>
<article class="method">
<h3 class="private ">creerStructure()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">creerStructure() : false</pre>
<p><em>Build the database structure</em></p>
 
<h4>Returns</h4>
false
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_verifierBddStructureVersion" name="method_verifierBddStructureVersion" class="anchor"></a>
<article class="method">
<h3 class="private ">verifierBddStructureVersion()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">verifierBddStructureVersion() : boolean</pre>
<p><em>Check if the database structure is ok (with the good version)</em></p>
 
<h4>Returns</h4>
boolean
&mdash; <p>True if ok</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyerSqlite" name="method_nettoyerSqlite" class="anchor"></a>
<article class="method">
<h3 class="private ">nettoyerSqlite()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyerSqlite(string <span class="argument">$mode</span>, array <span class="argument">$tags</span>) : boolean</pre>
<p><em>Clean some cache records</em></p>
<p>Available modes are :
Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used)
Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used)
Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
<p>Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags}</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
<p>Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => remove cache entries matching any given tags</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$mode</td>
<td><p>Clean mode</p></td>
</tr>
<tr>
<td>array</td>
<td>$tags</td>
<td><p>Array of tags</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_verifierEtCreerStructureBdd" name="method_verifierEtCreerStructureBdd" class="anchor"></a>
<article class="method">
<h3 class="private ">verifierEtCreerStructureBdd()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">verifierEtCreerStructureBdd() : boolean</pre>
<p><em>Check if the database structure is ok (with the good version), if no : build it</em></p>
 
<h4>Throws</h4>
<dl>
<dt>\Zend_Cache_Exception</dt>
<dd></dd>
</dl>
<h4>Returns</h4>
boolean
&mdash; <p>True if ok</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">CacheSqlite.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/CacheSqlite.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Chronometre.html
New file
0,0 → 1,683
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1160205348"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1160205348" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Chronometre</h1>
<p><em>Chronometre permet de stocker et d&#039;afficher les temps d&#039;éxécution de script.</em></p>
<p>Cette classe permet de réaliser un ensemble de mesure de temps prises à différents endroits d'un script.
Ces mesures peuvent ensuite être affichées au sein d'un tableau XHTML.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Chronometre.html#method_chrono" class="">chrono()</a><br />
<a href="../classes/Chronometre.html#method_afficherChrono" class="">afficherChrono()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/Chronometre.html#method_getTemps" class="">getTemps()</a><br />
<a href="../classes/Chronometre.html#method_setTemps" class="">setTemps()</a><br />
<a href="../classes/Chronometre.html#method_getMicroTime" class="">getMicroTime()</a><br />
</section>
<section class="span4">
<a href="../classes/Chronometre.html#property_pointArretNumero" class="">$pointArretNumero</a><br />
<a href="../classes/Chronometre.html#property_temps" class="">$temps</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/Chronometre.php.html"><div class="path-wrapper">Chronometre.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Chronometre</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL-v3</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL-v2</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Chronometre.php 327 2011-02-08 17:54:34Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_pointArretNumero" name="property_pointArretNumero" class="anchor"></a>
<article class="property">
<h3 class="private ">$pointArretNumero</h3>
<pre class="signature">$pointArretNumero</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_temps" name="property_temps" class="anchor"></a>
<article class="property">
<h3 class="private ">$temps</h3>
<pre class="signature">$temps</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_chrono" name="method_chrono" class="anchor"></a>
<article class="method">
<h3 class="public ">chrono()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">chrono( <span class="argument">$cle</span>) : null</pre>
<p><em>Effectue un chronometrage.</em></p>
<p>Vous pouvez indiquer le nom du point de chronométrage.
Si vous n'indiquez rien, un nombre sera généré en débutant à 1.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$cle</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
null
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_afficherChrono" name="method_afficherChrono" class="anchor"></a>
<article class="method">
<h3 class="public ">afficherChrono()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">afficherChrono( <span class="argument">$cle</span>) : string</pre>
<p><em>Permet d&#039;afficher les temps d&#039;éxécution de différentes parties d&#039;un script.</em></p>
<p>Cette fonction permet d'afficher un ensemble de mesure de temps prises à différents endroits d'un script.
Ces mesures sont affichées au sein d'un tableau XHTML dont on peut controler l'indentation des balises.
Pour un site en production, il suffit d'ajouter un style #chrono {display:none;} dans la css.
De cette façon, le tableau ne s'affichera pas. Le webmaster lui pourra rajouter sa propre feuille de style
affichant le tableau.
Le développeur initial de cette fonction est Loic d'Anterroches.
Elle a été modifiée par Jean-Pascal Milcent.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$cle</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la chaine XHTML de mesure des temps.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
author
</th>
<td>
<p>Loic d'Anterroches</p>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getTemps" name="method_getTemps" class="anchor"></a>
<article class="method">
<h3 class="private ">getTemps()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getTemps(string <span class="argument">$cle</span>) : int</pre>
<p><em>Accesseurs :</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$cle</td>
<td><p>la cle associée à un chronomètre particulier</p></td>
</tr>
</table>
<h4>Returns</h4>
int
&mdash; <p>le temps écoulé</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setTemps" name="method_setTemps" class="anchor"></a>
<article class="method">
<h3 class="private ">setTemps()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setTemps( <span class="argument">$cle</span>, \array() <span class="argument">$moment</span>) : null</pre>
<p><em>Setteur pour la variable temps</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$cle</td>
<td></td>
</tr>
<tr>
<td>\array()</td>
<td>$moment</td>
<td><p>ajoute des points de chronométrage au tableau _temps</p></td>
</tr>
</table>
<h4>Returns</h4>
null
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getMicroTime" name="method_getMicroTime" class="anchor"></a>
<article class="method">
<h3 class="private ">getMicroTime()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getMicroTime( <span class="argument">$utps</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$utps</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Chronometre.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Chronometre.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Debug.html
New file
0,0 → 1,956
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-776868168"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-776868168" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Debug</h1>
<p><em>Classe fournissant des fonctions de débogage équivalante à var_dump et print_r.</em></p>
<p>L'affichage et l'utilisation de ces fonctions sont améliorés via cette classe.
Cette classe est inspirée de la classe Zend_Debug.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Debug.html#method_getMode" class="">getMode()</a><br />
<a href="../classes/Debug.html#method_dump" class="">dump()</a><br />
<a href="../classes/Debug.html#method_printr" class="">printr()</a><br />
<a href="../classes/Debug.html#method_tailleMemoireVar" class="">tailleMemoireVar()</a><br />
<a href="../classes/Debug.html#method_tailleMemoireScript" class="">tailleMemoireScript()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<a href="../classes/Debug.html#constant_MODE_ECHO" class="">MODE_ECHO</a><br />
<a href="../classes/Debug.html#constant_MODE_NOTICE" class="">MODE_NOTICE</a><br />
<a href="../classes/Debug.html#constant_MODE_ENTETE_HTTP" class="">MODE_ENTETE_HTTP</a><br />
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<a href="../classes/Debug.html#property_mode" class="">$mode</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/Debug.html#method_traiterDebogage" class="">traiterDebogage()</a><br />
<a href="../classes/Debug.html#method_formaterMotCle" class="">formaterMotCle()</a><br />
<a href="../classes/Debug.html#method_traiterSortieSuivantMode" class="">traiterSortieSuivantMode()</a><br />
</section>
<section class="span4">
<a href="../classes/Debug.html#property_parametres_obligatoires" class="">$parametres_obligatoires</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/Debug.php.html"><div class="path-wrapper">Debug.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Debug</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL-v3</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL-v2</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Debug.php 366 2011-09-30 08:20:45Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="constants" name="constants"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Constants</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MODE_ECHO" name="constant_MODE_ECHO" class="anchor"></a>
<article id="constant_MODE_ECHO" class="constant">
<h3 class="">MODE_ECHO</h3>
<pre class="signature">MODE_ECHO</pre>
<p><em>Paramètrer le fichier de config avec &quot;php:Debug::MODE_ECHO&quot; : les messages sont affichés en utilisant echo au moment
où ils sont déclenchés dans le code.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MODE_NOTICE" name="constant_MODE_NOTICE" class="anchor"></a>
<article id="constant_MODE_NOTICE" class="constant">
<h3 class="">MODE_NOTICE</h3>
<pre class="signature">MODE_NOTICE</pre>
<p><em>Paramètrer le fichier de config avec &quot;php:Debug::MODE_NOTICE&quot; : les message sont stockés par le gestionnaire
d&#039;exception sous forme d&#039;erreur de type E_USER_NOTICE et sont renvoyés sur la sortie standard à la fin de l&#039;execution
du programme (via echo).</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MODE_ENTETE_HTTP" name="constant_MODE_ENTETE_HTTP" class="anchor"></a>
<article id="constant_MODE_ENTETE_HTTP" class="constant">
<h3 class="">MODE_ENTETE_HTTP</h3>
<pre class="signature">MODE_ENTETE_HTTP</pre>
<p><em>Paramètrer le fichier de config avec &quot;php:Debug::MODE_ENTETE_HTTP&quot; : les message sont stockés par le gestionnaire
d&#039;exception sous forme d&#039;erreur de type E_USER_NOTICE et sont renvoyés dans un entête HTTP (X_REST_DEBOGAGE_MESSAGES)
à la fin de l&#039;execution du programme.</em></p>
<p>Surtout utile pour le Serveur REST.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_mode" name="property_mode" class="anchor"></a>
<article class="property">
<h3 class="protected ">$mode</h3>
<pre class="signature">$mode</pre>
<p><em>Mode de php (cli ou sapi)</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_obligatoires" name="property_parametres_obligatoires" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres_obligatoires</h3>
<pre class="signature">$parametres_obligatoires</pre>
<p><em>Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getMode" name="method_getMode" class="anchor"></a>
<article class="method">
<h3 class="public ">getMode()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getMode() : string</pre>
<p><em>Accesseur pour le mode</em></p>
 
<h4>Returns</h4>
string
&mdash; <p>le mode de php</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_dump" name="method_dump" class="anchor"></a>
<article class="method">
<h3 class="public ">dump()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">dump(mixed <span class="argument">$variable</span>, string <span class="argument">$mot_cle</span>, boolean <span class="argument">$echo</span>) : string</pre>
<p><em>Equivalent de var_dump</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>mixed</td>
<td>$variable</td>
<td><p>la variable à dumper</p></td>
</tr>
<tr>
<td>string</td>
<td>$mot_cle</td>
<td><p>le mot cle à associer à la variable</p></td>
</tr>
<tr>
<td>boolean</td>
<td>$echo</td>
<td><p>si true on affiche le résultat, si false on ne renvoie que la chaine sans l'afficher</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la chaine à afficher representant le dump ou null si echo</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_printr" name="method_printr" class="anchor"></a>
<article class="method">
<h3 class="public ">printr()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">printr(mixed <span class="argument">$variable</span>, string <span class="argument">$mot_cle</span>, boolean <span class="argument">$echo</span>) : string</pre>
<p><em>Equivalent de print_r.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>mixed</td>
<td>$variable</td>
<td><p>la variable à afficher</p></td>
</tr>
<tr>
<td>string</td>
<td>$mot_cle</td>
<td><p>le mot cle à associer</p></td>
</tr>
<tr>
<td>boolean</td>
<td>$echo</td>
<td><p>faire un echo ou non</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la chaine contenant la variable printée ou null si echo</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_tailleMemoireVar" name="method_tailleMemoireVar" class="anchor"></a>
<article class="method">
<h3 class="public ">tailleMemoireVar()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">tailleMemoireVar(mixed <span class="argument">$var</span>, string <span class="argument">$mot_cle</span>, boolean <span class="argument">$echo</span>) : string</pre>
<p><em>Affichage d&#039;informations sur l&#039;espace mémoire occupé par une variable</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>mixed</td>
<td>$var</td>
<td><p>la variable dont on veut connaître l'empreinte mémoire.</p></td>
</tr>
<tr>
<td>string</td>
<td>$mot_cle</td>
<td><p>le mot cle à associer</p></td>
</tr>
<tr>
<td>boolean</td>
<td>$echo</td>
<td><p>faire un echo ou non</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la chaine d'information sur l'espace mémoire occupé ou bien null si echo</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
<dt>See also</dt>
<dd><a href="http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html"><span class="namespace-wrapper">http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
since
</th>
<td>
0.3
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_tailleMemoireScript" name="method_tailleMemoireScript" class="anchor"></a>
<article class="method">
<h3 class="public ">tailleMemoireScript()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">tailleMemoireScript(string <span class="argument">$mot_cle</span>, boolean <span class="argument">$echo</span>) : string</pre>
<p><em>Affichage d&#039;informations sur l&#039;espace mémoire occupé par le script PHP</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$mot_cle</td>
<td><p>le mot cle à associer</p></td>
</tr>
<tr>
<td>boolean</td>
<td>$echo</td>
<td><p>faire un echo ou non</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la chaine d'information sur l'espace mémoire occupé ou bien null si echo</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
<dt>See also</dt>
<dd><a href="http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html"><span class="namespace-wrapper">http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
since
</th>
<td>
0.3
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_traiterDebogage" name="method_traiterDebogage" class="anchor"></a>
<article class="method">
<h3 class="private ">traiterDebogage()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">traiterDebogage(string <span class="argument">$mot_cle</span>, string <span class="argument">$sortie</span>, boolean <span class="argument">$echo</span>) : string</pre>
<p><em>Traite une chaine de débogage et les mots clés associés</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$mot_cle</td>
<td><p>le mot à associer à la chaine</p></td>
</tr>
<tr>
<td>string</td>
<td>$sortie</td>
<td><p>le chaine de debogage</p></td>
</tr>
<tr>
<td>boolean</td>
<td>$echo</td>
<td><p>faire un echo du resultat ou non</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la chaine de debogage formatée ou bien null si echo</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_formaterMotCle" name="method_formaterMotCle" class="anchor"></a>
<article class="method">
<h3 class="private ">formaterMotCle()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">formaterMotCle(string <span class="argument">$mot_cle</span>) : string</pre>
<p><em>formate un mot clé donné</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$mot_cle</td>
<td><p>le mot clé à formaté</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>le mot clé formaté ou bien un chaine vide le mot clé est null ou vide</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_traiterSortieSuivantMode" name="method_traiterSortieSuivantMode" class="anchor"></a>
<article class="method">
<h3 class="private ">traiterSortieSuivantMode()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">traiterSortieSuivantMode(string <span class="argument">$mot_cle</span>, string <span class="argument">$sortie</span>) : string</pre>
<p><em>traite la sortie de la chaine de débogage suivant le mode de php</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$mot_cle</td>
<td><p>le mot clé associé à la chaine</p></td>
</tr>
<tr>
<td>string</td>
<td>$sortie</td>
<td><p>la chaine de débogage</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la sortie formatée pour le mode en cours</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Debug.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Debug.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Chaine.html
New file
0,0 → 1,501
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1886898021"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1886898021" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Chaine</h1>
<p><em>Classe fournissant des méthodes statiques de manipulation des chaînes de caractères (String).</em></p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Chaine.html#method_supprimerAccents" class="">supprimerAccents()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<em>No private methods found</em>
</section>
<section class="span4">
<a href="../classes/Chaine.html#property_caracteres_accentues" class="">$caracteres_accentues</a><br />
<a href="../classes/Chaine.html#property_caracteres_normaux" class="">$caracteres_normaux</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/utilitaires.Chaine.php.html"><div class="path-wrapper">utilitaires/Chaine.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Utilitaire</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Chaine</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL-v3</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL-v2</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Chaine.php 343 2011-06-09 14:59:36Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_caracteres_accentues" name="property_caracteres_accentues" class="anchor"></a>
<article class="property">
<h3 class="private ">$caracteres_accentues</h3>
<pre class="signature">$caracteres_accentues</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_caracteres_normaux" name="property_caracteres_normaux" class="anchor"></a>
<article class="property">
<h3 class="private ">$caracteres_normaux</h3>
<pre class="signature">$caracteres_normaux</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimerAccents" name="method_supprimerAccents" class="anchor"></a>
<article class="method">
<h3 class="public ">supprimerAccents()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimerAccents(String <span class="argument">$chaine</span>, String <span class="argument">$encodage</span>) : \la</pre>
<p><em>Supprime ou remplace les accents d&#039;une chaine en PHP.</em></p>
<p>La solution retenu, provenant du site
{@link <a href="http://www.lecoindunet.com/zone_php/scripts_utiles/remplacer-les-caracteres-accentues-dune-chaine-en-php-72">http://www.lecoindunet.com/zone_php/scripts_utiles/remplacer-les-caracteres-accentues-dune-chaine-en-php-72</a> lecoindunet.com},
consiste en deux tableaux (caractères avec et sans accents) car cela permetra éventuellement
de fournir des méthodes pour récupérer ces tableaux pour d'autres traitements.
Une autre solution aurait été d'utiliser les entités HTML comme proposé par le site
{@link <a href="http://www.weirdog.com/blog/php/supprimer-les-accents-des-caracteres-accentues.html">http://www.weirdog.com/blog/php/supprimer-les-accents-des-caracteres-accentues.html</a> weirdog.com}.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>String</td>
<td>$chaine</td>
<td><p>la chaine de caractères dans laquelle supprimer les accents.</p></td>
</tr>
<tr>
<td>String</td>
<td>$encodage</td>
<td><p>le code d'encodage de la chaine si ce n'est pas de l'UTF-8.</p></td>
</tr>
</table>
<h4>Returns</h4>
\la
&mdash; <p>chaine de caractères sans accent.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Chaine.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/utilitaires/Chaine.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/RestServeur.html
New file
0,0 → 1,2490
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-453238565"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-453238565" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>RestServeur</h1>
<p><em>Classe principale gérant les services web de type (@link(REST, http://fr.wikipedia.org/wiki/Rest).</em></p>
<p>Elle contient :</p>
<ul>
<li>les constantes indiquant les différentes (@link(méthode HTTP, <a href="http://fr.wikipedia.org/wiki/Http">http://fr.wikipedia.org/wiki/Http</a>) prises en compte.</li>
<li>les @link(codes HTTP des réponses, <a href="http://fr.wikipedia.org/wiki/Liste_des_codes_HTTP">http://fr.wikipedia.org/wiki/Liste_des_codes_HTTP</a>)</li>
</ul>
<p>Ce serveur REST accepte 4 types de méthodes HTTP : GET, PUT, POST, DELETE.
GET et POST ne pose généralement pas de problème pour les clients HTTP mais ce n'est pas forcément le cas pour PUT et DELETE.
Vous pouvez donc pour réaliser :</p>
<ul>
<li>DELETE : utiliser la méthode POST avec action=DELETE dans le corps de la requête.</li>
<li>PUT : utiliser la méthode POST avec une url ne contenant aucune indication de ressource.
Une autre solution consiste à utiliser n'importe quelle méthode et à ajouter l'entête "X_HTTP_METHOD_OVERRIDE" avec pour
valeur le nom de la méthode que vous souhaitez utiliser. Exemple d'entête : "X_HTTP_METHOD_OVERRIDE: PUT".
Exemple : <code>curl -v -v -H "X_HTTP_METHOD_OVERRIDE: DELETE" "<a href="http://www.mondomaine.org/services/apiVersion/[mon-service]/"&lt;/code">http://www.mondomaine.org/services/apiVersion/[mon-service]/"&lt;/code</a>>
Cela fonctionne avec Apache.</li>
</ul>
<p>Les classes des services web doivent avoir un nom au format ChatMot "MonService" et être appelée dans l'url par le même nom
en minuscule où les mots sont séparés par des tirets "mon-service".</p>
<p>Paramètres liés dans config.ini :</p>
<ul>
<li>serveur.baseURL : morceau de l'url pour appeler le serveur relative au domaine. Exemple : pour <a href="http://www.tela-botanica.org/mon_serveur/">http://www.tela-botanica.org/mon_serveur/</a>
mettre : "/mon_serveur/"</li>
<li>serveur.baseAlternativeURL : sur le même principe que ci-dessus permet d'affecter une deuxième url (pour gérer des raccourci via htaccess)</li>
</ul>
<p>Encodage en entrée : utf8
Encodage en sortie : utf8</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/RestServeur.html#method___construct" class="">__construct()</a><br />
<a href="../classes/RestServeur.html#method_chargerClasse" class="">chargerClasse()</a><br />
<a href="../classes/RestServeur.html#method_executer" class="">executer()</a><br />
<a href="../classes/RestServeur.html#method_envoyerEnteteStatutHttp" class="">envoyerEnteteStatutHttp()</a><br />
<a href="../classes/RestServeur.html#method_gererErreurs" class="">gererErreurs()</a><br />
<a href="../classes/RestServeur.html#method_ajouterMessage" class="">ajouterMessage()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<a href="../classes/RestServeur.html#constant_METHODE_GET" class="">METHODE_GET</a><br />
<a href="../classes/RestServeur.html#constant_METHODE_POST" class="">METHODE_POST</a><br />
<a href="../classes/RestServeur.html#constant_METHODE_DELETE" class="">METHODE_DELETE</a><br />
<a href="../classes/RestServeur.html#constant_METHODE_PUT" class="">METHODE_PUT</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_OK" class="">HTTP_CODE_OK</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_CREATION_OK" class="">HTTP_CODE_CREATION_OK</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_ACCEPTE_OK" class="">HTTP_CODE_ACCEPTE_OK</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_SUPPRESSION_OK" class="">HTTP_CODE_SUPPRESSION_OK</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_MAUVAISE_REQUETE" class="">HTTP_CODE_MAUVAISE_REQUETE</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_ACCES_NON_AUTORISE" class="">HTTP_CODE_ACCES_NON_AUTORISE</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_ACCES_INTERDIT" class="">HTTP_CODE_ACCES_INTERDIT</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_RESSOURCE_INTROUVABLE" class="">HTTP_CODE_RESSOURCE_INTROUVABLE</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_METHODE_NON_AUTORISE" class="">HTTP_CODE_METHODE_NON_AUTORISE</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_CONFLIT" class="">HTTP_CODE_CONFLIT</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_CONTENU_REQUIS" class="">HTTP_CODE_CONTENU_REQUIS</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_ECHEC_CONDITION" class="">HTTP_CODE_ECHEC_CONDITION</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_CONTENU_NON_SUPPORTE" class="">HTTP_CODE_CONTENU_NON_SUPPORTE</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_ERREUR" class="">HTTP_CODE_ERREUR</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_CODE_SERVICE_INDISPONIBLE" class="">HTTP_CODE_SERVICE_INDISPONIBLE</a><br />
<a href="../classes/RestServeur.html#constant_HTTP_NON_IMPLEMENTE" class="">HTTP_NON_IMPLEMENTE</a><br />
<a href="../classes/RestServeur.html#constant_MOTIF_API_VERSION" class="">MOTIF_API_VERSION</a><br />
<a href="../classes/RestServeur.html#constant_MOTIF_SERVICE_NOM" class="">MOTIF_SERVICE_NOM</a><br />
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/RestServeur.html#method_initialiserMethode" class="">initialiserMethode()</a><br />
<a href="../classes/RestServeur.html#method_initialiserRequeteDonnees" class="">initialiserRequeteDonnees()</a><br />
<a href="../classes/RestServeur.html#method_decouperUrlChemin" class="">decouperUrlChemin()</a><br />
<a href="../classes/RestServeur.html#method_initialiserApiVersion" class="">initialiserApiVersion()</a><br />
<a href="../classes/RestServeur.html#method_verifierApiVersion" class="">verifierApiVersion()</a><br />
<a href="../classes/RestServeur.html#method_initialiserServiceNom" class="">initialiserServiceNom()</a><br />
<a href="../classes/RestServeur.html#method_verifierServiceNom" class="">verifierServiceNom()</a><br />
<a href="../classes/RestServeur.html#method_traiterNomService" class="">traiterNomService()</a><br />
<a href="../classes/RestServeur.html#method_initialiserRessource" class="">initialiserRessource()</a><br />
<a href="../classes/RestServeur.html#method_initialiserParametres" class="">initialiserParametres()</a><br />
<a href="../classes/RestServeur.html#method_recupererParametresGet" class="">recupererParametresGet()</a><br />
<a href="../classes/RestServeur.html#method_nettoyerParametres" class="">nettoyerParametres()</a><br />
<a href="../classes/RestServeur.html#method_recupererParametresBruts" class="">recupererParametresBruts()</a><br />
<a href="../classes/RestServeur.html#method_get" class="">get()</a><br />
<a href="../classes/RestServeur.html#method_post" class="">post()</a><br />
<a href="../classes/RestServeur.html#method_put" class="">put()</a><br />
<a href="../classes/RestServeur.html#method_delete" class="">delete()</a><br />
<a href="../classes/RestServeur.html#method_parserDonneesRequete" class="">parserDonneesRequete()</a><br />
<a href="../classes/RestServeur.html#method_cloreAccesServeur" class="">cloreAccesServeur()</a><br />
<a href="../classes/RestServeur.html#method_envoyerMessages" class="">envoyerMessages()</a><br />
</section>
<section class="span4">
<a href="../classes/RestServeur.html#property_debogageActivation" class="">$debogageActivation</a><br />
<a href="../classes/RestServeur.html#property_debogageMode" class="">$debogageMode</a><br />
<a href="../classes/RestServeur.html#property_methode" class="">$methode</a><br />
<a href="../classes/RestServeur.html#property_requeteDonnees" class="">$requeteDonnees</a><br />
<a href="../classes/RestServeur.html#property_requeteDonneesParsees" class="">$requeteDonneesParsees</a><br />
<a href="../classes/RestServeur.html#property_apiVersion" class="">$apiVersion</a><br />
<a href="../classes/RestServeur.html#property_service" class="">$service</a><br />
<a href="../classes/RestServeur.html#property_ressources" class="">$ressources</a><br />
<a href="../classes/RestServeur.html#property_parametres" class="">$parametres</a><br />
<a href="../classes/RestServeur.html#property_parametresBruts" class="">$parametresBruts</a><br />
<a href="../classes/RestServeur.html#property_config" class="">$config</a><br />
<a href="../classes/RestServeur.html#property_messages" class="">$messages</a><br />
<a href="../classes/RestServeur.html#property_http10" class="">$http10</a><br />
<a href="../classes/RestServeur.html#property_parametres_obligatoires" class="">$parametres_obligatoires</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/RestServeur.php.html"><div class="path-wrapper">RestServeur.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\RestServeur</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>Php 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p>GPL v3 <a href="http://www.gnu.org/licenses/gpl.txt">http://www.gnu.org/licenses/gpl.txt</a></p>
<p>CECILL v2 <a href="http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt</a></p>
</td>
</tr>
<tr>
<th>
since
</th>
<td>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: RestServeur.php 457 2014-02-06 17:54:21Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="constants" name="constants"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Constants</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_METHODE_GET" name="constant_METHODE_GET" class="anchor"></a>
<article id="constant_METHODE_GET" class="constant">
<h3 class="">METHODE_GET</h3>
<pre class="signature">METHODE_GET</pre>
<p><em>Nom de la méthode appelée dans un service pour éxécuter une requête de type GET.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_METHODE_POST" name="constant_METHODE_POST" class="anchor"></a>
<article id="constant_METHODE_POST" class="constant">
<h3 class="">METHODE_POST</h3>
<pre class="signature">METHODE_POST</pre>
<p><em>Nom de la méthode appelée dans un service pour éxécuter une requête de type POST.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_METHODE_DELETE" name="constant_METHODE_DELETE" class="anchor"></a>
<article id="constant_METHODE_DELETE" class="constant">
<h3 class="">METHODE_DELETE</h3>
<pre class="signature">METHODE_DELETE</pre>
<p><em>Nom de la méthode appelée dans un service pour éxécuter une requête de type DELETE.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_METHODE_PUT" name="constant_METHODE_PUT" class="anchor"></a>
<article id="constant_METHODE_PUT" class="constant">
<h3 class="">METHODE_PUT</h3>
<pre class="signature">METHODE_PUT</pre>
<p><em>Nom de la méthode appelée dans un service pour éxécuter une requête de type PUT.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_OK" name="constant_HTTP_CODE_OK" class="anchor"></a>
<article id="constant_HTTP_CODE_OK" class="constant">
<h3 class="">HTTP_CODE_OK</h3>
<pre class="signature">HTTP_CODE_OK</pre>
<p><em>Code HTTP 200 : OK
Indiquant le succès de l&#039;accès à un service web par la méthode GET.</em></p>
<p>L'utiliser lors d'une requète de type GET (consulter) pour indiquer le succès de l'opération.
Sera renvoyée par défaut par PHP.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_CREATION_OK" name="constant_HTTP_CODE_CREATION_OK" class="anchor"></a>
<article id="constant_HTTP_CODE_CREATION_OK" class="constant">
<h3 class="">HTTP_CODE_CREATION_OK</h3>
<pre class="signature">HTTP_CODE_CREATION_OK</pre>
<p><em>Code HTTP 201 : Created
Indiquant que l&#039;accès à un service web est un succès et que la ressource a été créée ou modifié.</em></p>
<p>L'utiliser lors d'une requète de type PUT (ajouter) ou POST (modifier) pour indiquer le succès de l'opération.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_ACCEPTE_OK" name="constant_HTTP_CODE_ACCEPTE_OK" class="anchor"></a>
<article id="constant_HTTP_CODE_ACCEPTE_OK" class="constant">
<h3 class="">HTTP_CODE_ACCEPTE_OK</h3>
<pre class="signature">HTTP_CODE_ACCEPTE_OK</pre>
<p><em>Code HTTP 202 : Accepted
Indiquant que la requête a été acceptée mais que son traitement n&#039;est pas encore terminé.</em></p>
<p>L'utiliser lors d'une requète de type PUT (ajouter) ou POST (modifier) pour indiquer que les données
seront traitées ultérieurement.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_SUPPRESSION_OK" name="constant_HTTP_CODE_SUPPRESSION_OK" class="anchor"></a>
<article id="constant_HTTP_CODE_SUPPRESSION_OK" class="constant">
<h3 class="">HTTP_CODE_SUPPRESSION_OK</h3>
<pre class="signature">HTTP_CODE_SUPPRESSION_OK</pre>
<p><em>Code HTTP 204 : No Content
Indique que l&#039;accès à un service web est un succès et qu&#039;il n&#039;y a pas de contenu à renvoyer.</em></p>
<p>L'utiliser lors d'une requète de type DELETE (supprimer) pour indiquer le succès de l'opération si aucun
contenu (status) ne doit être renvoyé, sinon utiliser 200 OK.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_MAUVAISE_REQUETE" name="constant_HTTP_CODE_MAUVAISE_REQUETE" class="anchor"></a>
<article id="constant_HTTP_CODE_MAUVAISE_REQUETE" class="constant">
<h3 class="">HTTP_CODE_MAUVAISE_REQUETE</h3>
<pre class="signature">HTTP_CODE_MAUVAISE_REQUETE</pre>
<p><em>Code HTTP 400 : Bad Request
Indique que les paramètres envoyés au service contiennent des erreurs.</em></p>
<p>L'utiliser pour indiquer l'échec de l'accès au service. La réponse pourra contenir un message expliquant la source
de l'erreur.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_ACCES_NON_AUTORISE" name="constant_HTTP_CODE_ACCES_NON_AUTORISE" class="anchor"></a>
<article id="constant_HTTP_CODE_ACCES_NON_AUTORISE" class="constant">
<h3 class="">HTTP_CODE_ACCES_NON_AUTORISE</h3>
<pre class="signature">HTTP_CODE_ACCES_NON_AUTORISE</pre>
<p><em>Code HTTP 401 : Unauthorized
Indiquant que l&#039;accès à un service web est refusé car l&#039;authentification (obligatoire) a échoué pour
accéder à la ressource.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_ACCES_INTERDIT" name="constant_HTTP_CODE_ACCES_INTERDIT" class="anchor"></a>
<article id="constant_HTTP_CODE_ACCES_INTERDIT" class="constant">
<h3 class="">HTTP_CODE_ACCES_INTERDIT</h3>
<pre class="signature">HTTP_CODE_ACCES_INTERDIT</pre>
<p><em>Code HTTP 403 : Forbidden
Indiquant que le service a compris la requête mais refuse de la réaliser.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_RESSOURCE_INTROUVABLE" name="constant_HTTP_CODE_RESSOURCE_INTROUVABLE" class="anchor"></a>
<article id="constant_HTTP_CODE_RESSOURCE_INTROUVABLE" class="constant">
<h3 class="">HTTP_CODE_RESSOURCE_INTROUVABLE</h3>
<pre class="signature">HTTP_CODE_RESSOURCE_INTROUVABLE</pre>
<p><em>Code HTTP 404 : Not Found
Indiquant que la ressource indiquée par l&#039;url est introuvable.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_METHODE_NON_AUTORISE" name="constant_HTTP_CODE_METHODE_NON_AUTORISE" class="anchor"></a>
<article id="constant_HTTP_CODE_METHODE_NON_AUTORISE" class="constant">
<h3 class="">HTTP_CODE_METHODE_NON_AUTORISE</h3>
<pre class="signature">HTTP_CODE_METHODE_NON_AUTORISE</pre>
<p><em>Code HTTP 405 : Method Not Allowed
Indique soit :
- que le service web ne possède pas d&#039;accès la ressource correspondant à la méthode HTTP employée.</em></p>
<ul>
<li>que la méthode HTTP enployée n'est pas en accord avec la ressource indiquée par l'url.</li>
</ul>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_CONFLIT" name="constant_HTTP_CODE_CONFLIT" class="anchor"></a>
<article id="constant_HTTP_CODE_CONFLIT" class="constant">
<h3 class="">HTTP_CODE_CONFLIT</h3>
<pre class="signature">HTTP_CODE_CONFLIT</pre>
<p><em>Code HTTP 409 : Conflict
Indique qu&#039;un conflit est survenu vis à vis de la ressource.</em></p>
<p>Par exemple, essayer de créer deux fois la même ressource ou bien tenter de modifier une ressource qui a été modifiée par
ailleurs.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_CONTENU_REQUIS" name="constant_HTTP_CODE_CONTENU_REQUIS" class="anchor"></a>
<article id="constant_HTTP_CODE_CONTENU_REQUIS" class="constant">
<h3 class="">HTTP_CODE_CONTENU_REQUIS</h3>
<pre class="signature">HTTP_CODE_CONTENU_REQUIS</pre>
<p><em>Code HTTP 411 : Length Required
Indique que des paramètres passés dans le contenu de la requête sont nécessaires au service.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_ECHEC_CONDITION" name="constant_HTTP_CODE_ECHEC_CONDITION" class="anchor"></a>
<article id="constant_HTTP_CODE_ECHEC_CONDITION" class="constant">
<h3 class="">HTTP_CODE_ECHEC_CONDITION</h3>
<pre class="signature">HTTP_CODE_ECHEC_CONDITION</pre>
<p><em>Code HTTP 412 : Precondition Failed
Indique que des entêtes envoyés au serveur sont erronnés.</em></p>
<p>À utiliser quand un service web reçoit de mauvais entêtes, paramètres et/ou ressources.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_CONTENU_NON_SUPPORTE" name="constant_HTTP_CODE_CONTENU_NON_SUPPORTE" class="anchor"></a>
<article id="constant_HTTP_CODE_CONTENU_NON_SUPPORTE" class="constant">
<h3 class="">HTTP_CODE_CONTENU_NON_SUPPORTE</h3>
<pre class="signature">HTTP_CODE_CONTENU_NON_SUPPORTE</pre>
<p><em>Code HTTP 415 : Unsupported Media Type
Indique que le type de média envoyé au serveur n&#039;est pas accepté par la ressource.</em></p>
<p>À utiliser quand un service web reçoit un mauvais type de contenu.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_ERREUR" name="constant_HTTP_CODE_ERREUR" class="anchor"></a>
<article id="constant_HTTP_CODE_ERREUR" class="constant">
<h3 class="">HTTP_CODE_ERREUR</h3>
<pre class="signature">HTTP_CODE_ERREUR</pre>
<p><em>Code HTTP 500 : Internal Server Error.</em></p>
<p>L'utiliser quand le serveur ou un service soulève une erreur ou une exception.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_CODE_SERVICE_INDISPONIBLE" name="constant_HTTP_CODE_SERVICE_INDISPONIBLE" class="anchor"></a>
<article id="constant_HTTP_CODE_SERVICE_INDISPONIBLE" class="constant">
<h3 class="">HTTP_CODE_SERVICE_INDISPONIBLE</h3>
<pre class="signature">HTTP_CODE_SERVICE_INDISPONIBLE</pre>
<p><em>Code HTTP 503 : Service Unavailable
L&#039;utiliser quand le web service est momentanément indisponible.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_HTTP_NON_IMPLEMENTE" name="constant_HTTP_NON_IMPLEMENTE" class="anchor"></a>
<article id="constant_HTTP_NON_IMPLEMENTE" class="constant">
<h3 class="">HTTP_NON_IMPLEMENTE</h3>
<pre class="signature">HTTP_NON_IMPLEMENTE</pre>
<p><em>Code HTTP 501 : Not Implemented
Indique que le web service ne supporte pas la fonctionnalité demandée.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MOTIF_API_VERSION" name="constant_MOTIF_API_VERSION" class="anchor"></a>
<article id="constant_MOTIF_API_VERSION" class="constant">
<h3 class="">MOTIF_API_VERSION</h3>
<pre class="signature">MOTIF_API_VERSION</pre>
<p><em>Motif de l&#039;epression régulière vérfiant la version de l&#039;API.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MOTIF_SERVICE_NOM" name="constant_MOTIF_SERVICE_NOM" class="anchor"></a>
<article id="constant_MOTIF_SERVICE_NOM" class="constant">
<h3 class="">MOTIF_SERVICE_NOM</h3>
<pre class="signature">MOTIF_SERVICE_NOM</pre>
<p><em>Motif de l&#039;epression régulière vérfiant le nom du service.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_debogageActivation" name="property_debogageActivation" class="anchor"></a>
<article class="property">
<h3 class="private ">$debogageActivation</h3>
<pre class="signature">$debogageActivation : boolean</pre>
<p><em>Mettre à true pour activer l&#039;affichage des messages d&#039;erreurs et de débogage.</em></p>
 
<h4>Type</h4>
boolean
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_debogageMode" name="property_debogageMode" class="anchor"></a>
<article class="property">
<h3 class="private ">$debogageMode</h3>
<pre class="signature">$debogageMode : string</pre>
<p><em>Indiquer le mode de débogage à utiliser (@see Debug).</em></p>
 
<h4>Type</h4>
string
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_methode" name="property_methode" class="anchor"></a>
<article class="property">
<h3 class="private ">$methode</h3>
<pre class="signature">$methode : string</pre>
<p><em>La méthode de la requête HTTP utilisée.</em></p>
 
<h4>Type</h4>
string
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_requeteDonnees" name="property_requeteDonnees" class="anchor"></a>
<article class="property">
<h3 class="private ">$requeteDonnees</h3>
<pre class="signature">$requeteDonnees : array</pre>
<p><em>Le contenu brut du corps de la requête HTTP (s&#039;il y en a).</em></p>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_requeteDonneesParsees" name="property_requeteDonneesParsees" class="anchor"></a>
<article class="property">
<h3 class="private ">$requeteDonneesParsees</h3>
<pre class="signature">$requeteDonneesParsees : array</pre>
<p><em>Le contenu sous forme de tableau de paires clés-valeurs du corps de la requête HTTP (s&#039;il y en a).</em></p>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_apiVersion" name="property_apiVersion" class="anchor"></a>
<article class="property">
<h3 class="private ">$apiVersion</h3>
<pre class="signature">$apiVersion : mixed</pre>
<p><em>Version de l&#039;API demandée.</em></p>
<p>Ex. <a href="http://www.mondomaine.org/services/[apiVersion]/mon-service/">http://www.mondomaine.org/services/[apiVersion]/mon-service/</a></p>
 
<h4>Type</h4>
mixed
&mdash; Généralement deux nombres séparés par un point. Ex. : 1.0 </article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_service" name="property_service" class="anchor"></a>
<article class="property">
<h3 class="private ">$service</h3>
<pre class="signature">$service : string</pre>
<p><em>Nom du service demandé.</em></p>
<p>Ex. <a href="http://www.mondomaine.org/services/apiVersion/[mon-service">http://www.mondomaine.org/services/apiVersion/[mon-service</a>]/</p>
 
<h4>Type</h4>
string
&mdash; par défaut vaut null. </article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_ressources" name="property_ressources" class="anchor"></a>
<article class="property">
<h3 class="private ">$ressources</h3>
<pre class="signature">$ressources : array</pre>
<p><em>Morceaux de l&#039;url servant à préciser la ressource concerné pour le service demandé.</em></p>
<p>Ex. <a href="http://www.mondomaine.org/services/apiVersion/mon-service/[maRessource/maSousResource">http://www.mondomaine.org/services/apiVersion/mon-service/[maRessource/maSousResource</a>...]</p>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres" name="property_parametres" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres</h3>
<pre class="signature">$parametres : array</pre>
<p><em>Partie de l&#039;url situé après le &#039;?&#039; servant à paramétrer le service demandé.</em></p>
<p>Les données proviennent de $<em>GET où les caractères suivant ont été transformé en '</em>' undescrore dans les clés :</p>
<ul>
<li>chr(32) ( ) (space)</li>
<li>chr(46) (.) (dot)</li>
<li>chr(91) ([) (open square bracket)</li>
<li>chr(128) - chr(159) (various)
En outre nous appliquons la méthode nettoyerGet() qui effectue d'autres remplacement dans les valeurs.
Ex. <a href="http://www.mondomaine.org/services/apiVersion/mon-service?monParametre1=maValeur1&amp;monParametre2=maValeur2">http://www.mondomaine.org/services/apiVersion/mon-service?monParametre1=maValeur1&amp;monParametre2=maValeur2</a></li>
</ul>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametresBruts" name="property_parametresBruts" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametresBruts</h3>
<pre class="signature">$parametresBruts : array</pre>
<p><em>Partie de l&#039;url situé après le &#039;?&#039; servant à paramétrer le service demandé.</em></p>
<p>Les données proviennent de $_SERVER['QUERY_STRING'] et n'ont subies aucune transformation au niveau des clés.
Cependant nous appliquons la méthode nettoyerGet() qui effectue d'autres remplacement dans les valeurs.
Ex. <a href="http://www.mondomaine.org/services/apiVersion/mon-service?monParametre1=maValeur1&amp;monParametre2=maValeur2">http://www.mondomaine.org/services/apiVersion/mon-service?monParametre1=maValeur1&amp;monParametre2=maValeur2</a></p>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_config" name="property_config" class="anchor"></a>
<article class="property">
<h3 class="private ">$config</h3>
<pre class="signature">$config : array</pre>
<p><em>Tableau contenant les paramètres de configuration du serveur.</em></p>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_messages" name="property_messages" class="anchor"></a>
<article class="property">
<h3 class="private ">$messages</h3>
<pre class="signature">$messages : array</pre>
<p><em>Tableau contenant les messages d&#039;erreur et/ou d&#039;avertissement du Serveur.</em></p>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_http10" name="property_http10" class="anchor"></a>
<article class="property">
<h3 class="private ">$http10</h3>
<pre class="signature">$http10</pre>
<p><em>Codes HTTP.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_obligatoires" name="property_parametres_obligatoires" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres_obligatoires</h3>
<pre class="signature">$parametres_obligatoires</pre>
<p><em>Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="public ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct()</pre>
<p><em>Analyse les données envoyées au serveur, enregistre la méthode HTTP utilisée pour appeler le serveur et parse
l&#039;url appelée pour trouver le service demandé.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_chargerClasse" name="method_chargerClasse" class="anchor"></a>
<article class="method">
<h3 class="public ">chargerClasse()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">chargerClasse( <span class="argument">$classe</span>) : void</pre>
<p><em>La méthode __autoload() charge dynamiquement les classes trouvées dans le code.</em></p>
<p>Cette fonction est appelée par php5 quand il trouve une instanciation de classe dans le code.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$classe</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_executer" name="method_executer" class="anchor"></a>
<article class="method">
<h3 class="public ">executer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">executer()</pre>
<p><em>Execute la requête.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_envoyerEnteteStatutHttp" name="method_envoyerEnteteStatutHttp" class="anchor"></a>
<article class="method">
<h3 class="public ">envoyerEnteteStatutHttp()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">envoyerEnteteStatutHttp(int <span class="argument">$code</span>)</pre>
<p><em>Envoyer un entête HTTP (version 1.0) de statut.</em></p>
<p>Il remplacera systématiquement tout entête HTTP de statut précédement envoyé.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>int</td>
<td>$code</td>
<td><p>entier indiquant le code du statut de l'entête HTTP à envoyer.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_gererErreurs" name="method_gererErreurs" class="anchor"></a>
<article class="method">
<h3 class="public ">gererErreurs()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">gererErreurs()</pre>
<p><em>Si des exceptions ou des erreurs sont soulevées par le serveur ou les services, elles sont gérées par cette méthode.</em></p>
<p>Si nous avec des erreurs d'un type différent d'E_USER_NOTICE (réservé au débogage), elle sont renvoyées sur la sortie
standard (via echo).
Si seulement des erreurs de type E_USER_NOTICE, sont présentes, elle sont envoyées en fonction du contenu du paramètre de
config "debogage_mode" :</p>
<ul>
<li>Debug::MODE_ECHO : les messages sont affichés en utilisant echo au moment où ils sont déclenchés dans le code.</li>
<li>Debug::MODE_NOTICE : les message sont stockés par le gestionnaire d'exception sous forme d'erreur de type
E_USER_NOTICE et sont renvoyés sur la sortie standard à la fin de l'execution du programme (via echo).</li>
<li>Debug::MODE_ENTETE_HTTP : les message sont stockés par le gestionnaire d'exception sous forme d'erreur de type
E_USER_NOTICE et sont renvoyés dans un entête HTTP (X_REST_DEBOGAGE_MESSAGES) à la fin de l'execution du programme.</li>
<li>Autre valeur : les messages sont formatés puis retournés par la fonction de débogage (à vous de les afficher).</li>
</ul>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_ajouterMessage" name="method_ajouterMessage" class="anchor"></a>
<article class="method">
<h3 class="public ">ajouterMessage()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">ajouterMessage(string <span class="argument">$message</span>)</pre>
<p><em>Permet d&#039;ajouter un message d&#039;erreur ou d&#039;avertissement qui sera envoyé au client.</em></p>
<p>Le message doit être au format texte et en UTF-8.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$message</td>
<td><p>le message à envoyer.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserMethode" name="method_initialiserMethode" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserMethode()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserMethode()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserRequeteDonnees" name="method_initialiserRequeteDonnees" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserRequeteDonnees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserRequeteDonnees()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_decouperUrlChemin" name="method_decouperUrlChemin" class="anchor"></a>
<article class="method">
<h3 class="private ">decouperUrlChemin()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">decouperUrlChemin()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserApiVersion" name="method_initialiserApiVersion" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserApiVersion()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserApiVersion( <span class="argument">$apiVersion</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$apiVersion</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_verifierApiVersion" name="method_verifierApiVersion" class="anchor"></a>
<article class="method">
<h3 class="private ">verifierApiVersion()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">verifierApiVersion( <span class="argument">$apiVersion</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$apiVersion</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserServiceNom" name="method_initialiserServiceNom" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserServiceNom()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserServiceNom( <span class="argument">$serviceNom</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$serviceNom</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_verifierServiceNom" name="method_verifierServiceNom" class="anchor"></a>
<article class="method">
<h3 class="private ">verifierServiceNom()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">verifierServiceNom( <span class="argument">$serviceNom</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$serviceNom</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_traiterNomService" name="method_traiterNomService" class="anchor"></a>
<article class="method">
<h3 class="private ">traiterNomService()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">traiterNomService( <span class="argument">$serviceNom</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$serviceNom</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserRessource" name="method_initialiserRessource" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserRessource()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserRessource( <span class="argument">$urlParts</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$urlParts</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserParametres" name="method_initialiserParametres" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserParametres()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserParametres()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_recupererParametresGet" name="method_recupererParametresGet" class="anchor"></a>
<article class="method">
<h3 class="private ">recupererParametresGet()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">recupererParametresGet()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyerParametres" name="method_nettoyerParametres" class="anchor"></a>
<article class="method">
<h3 class="private ">nettoyerParametres()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyerParametres(array <span class="argument">$parametres</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$parametres</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_recupererParametresBruts" name="method_recupererParametresBruts" class="anchor"></a>
<article class="method">
<h3 class="private ">recupererParametresBruts()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">recupererParametresBruts()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_get" name="method_get" class="anchor"></a>
<article class="method">
<h3 class="private ">get()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">get()</pre>
<p><em>Execute a GET request. A GET request fetches a list of resource when no resource name is given, a list of element
when a resource name is given, or a resource element when a resource and resource unique identifier are given. It does not change the
database contents.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_post" name="method_post" class="anchor"></a>
<article class="method">
<h3 class="private ">post()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">post()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_put" name="method_put" class="anchor"></a>
<article class="method">
<h3 class="private ">put()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">put()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_delete" name="method_delete" class="anchor"></a>
<article class="method">
<h3 class="private ">delete()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">delete()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_parserDonneesRequete" name="method_parserDonneesRequete" class="anchor"></a>
<article class="method">
<h3 class="private ">parserDonneesRequete()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">parserDonneesRequete() : array</pre>
<p><em>Parse les données contenu dans le corps de la requête HTTP (= POST) en :
- décodant les clés et valeurs.</em></p>
<ul>
<li>supprimant les espaces en début et fin des clés et des valeurs.</li>
</ul>
 
<h4>Returns</h4>
array
&mdash; <p>Tableau de paires clé et valeur.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_cloreAccesServeur" name="method_cloreAccesServeur" class="anchor"></a>
<article class="method">
<h3 class="private ">cloreAccesServeur()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">cloreAccesServeur( <span class="argument">$retour</span>)</pre>
<p><em>Termine l&#039;accès au serveur après envoir envoyer les messages.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$retour</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_envoyerMessages" name="method_envoyerMessages" class="anchor"></a>
<article class="method">
<h3 class="private ">envoyerMessages()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">envoyerMessages()</pre>
<p><em>Envoie au client les éventuels messages d&#039;erreur et d&#039;avertissement du Serveur.</em></p>
<p>Le format d'envoie est text/plain encodé en UTF-8.</p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">RestServeur.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/RestServeur.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Bdd.html
New file
0,0 → 1,1624
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2085932587"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-2085932587" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Bdd</h1>
<p><em>Classe Bdd, d&#039;accés au base de données.</em></p>
<p>Elle fait office d'abstraction légère de base de données en utilisant diverses possibilités d'accès aux
bases de données (PDO, mysql, mysqli, SQLite3).
Les valeurs pour le paramètre 'bdd_abstraction' du fichier config.ini sont : pdo, mysql, mysqli, sqlite3
Vous pouvez aussi utiliser : "php:Bdd::ABSTRACTION_PDO","php:Bdd::ABSTRACTION_MYSQL", "php:Bdd::ABSTRACTION_MYSQLI",
"php:Bdd::ABSTRACTION_SQLITE3".
Elle peut être étendue, pour ajouter le support d'autres bases de données où prendre en compte des méthodes spécifique à
un type d'abstraction.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Bdd.html#method___construct" class="">__construct()</a><br />
<a href="../classes/Bdd.html#method_ping" class="">ping()</a><br />
<a href="../classes/Bdd.html#method_requeter" class="">requeter()</a><br />
<a href="../classes/Bdd.html#method_recuperer" class="">recuperer()</a><br />
<a href="../classes/Bdd.html#method_recupererTous" class="">recupererTous()</a><br />
<a href="../classes/Bdd.html#method_proteger" class="">proteger()</a><br />
<a href="../classes/Bdd.html#method_protegerTableau" class="deprecated">protegerTableau()</a><br />
<a href="../classes/Bdd.html#method_recupererIdDernierAjout" class="">recupererIdDernierAjout()</a><br />
<a href="../classes/Bdd.html#method___destruct" class="">__destruct()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<a href="../classes/Bdd.html#constant_ERREUR_REQUETE_TPL" class="">ERREUR_REQUETE_TPL</a><br />
<a href="../classes/Bdd.html#constant_ERREUR_CONNEXION_TPL" class="">ERREUR_CONNEXION_TPL</a><br />
<a href="../classes/Bdd.html#constant_ERREUR_SELECTION_BDD_TPL" class="">ERREUR_SELECTION_BDD_TPL</a><br />
<a href="../classes/Bdd.html#constant_ABSTRACTION_PDO" class="">ABSTRACTION_PDO</a><br />
<a href="../classes/Bdd.html#constant_ABSTRACTION_MYSQL" class="">ABSTRACTION_MYSQL</a><br />
<a href="../classes/Bdd.html#constant_ABSTRACTION_MYSQLI" class="">ABSTRACTION_MYSQLI</a><br />
<a href="../classes/Bdd.html#constant_ABSTRACTION_SQLITE3" class="">ABSTRACTION_SQLITE3</a><br />
<a href="../classes/Bdd.html#constant_MODE_ASSOC" class="">MODE_ASSOC</a><br />
<a href="../classes/Bdd.html#constant_MODE_OBJET" class="">MODE_OBJET</a><br />
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<a href="../classes/Bdd.html#method_initialiserProtocole" class="">initialiserProtocole()</a><br />
<a href="../classes/Bdd.html#method_connecter" class="">connecter()</a><br />
<a href="../classes/Bdd.html#method_requete" class="deprecated">requete()</a><br />
<a href="../classes/Bdd.html#method_requeteUn" class="deprecated">requeteUn()</a><br />
<a href="../classes/Bdd.html#method_requeteTous" class="deprecated">requeteTous()</a><br />
</section>
<section class="span4">
<a href="../classes/Bdd.html#property_ASSOC" class="">$ASSOC</a><br />
<a href="../classes/Bdd.html#property_OBJECT" class="">$OBJECT</a><br />
<a href="../classes/Bdd.html#property_abstraction" class="">$abstraction</a><br />
<a href="../classes/Bdd.html#property_dsn" class="">$dsn</a><br />
<a href="../classes/Bdd.html#property_type" class="">$type</a><br />
<a href="../classes/Bdd.html#property_hote" class="">$hote</a><br />
<a href="../classes/Bdd.html#property_bdd_nom" class="">$bdd_nom</a><br />
<a href="../classes/Bdd.html#property_utilisateur" class="">$utilisateur</a><br />
<a href="../classes/Bdd.html#property_pass" class="">$pass</a><br />
<a href="../classes/Bdd.html#property_encodage" class="">$encodage</a><br />
<a href="../classes/Bdd.html#property_connexion" class="">$connexion</a><br />
<a href="../classes/Bdd.html#property_parametres_obligatoires" class="">$parametres_obligatoires</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/Bdd.html#method_protegerChaine" class="">protegerChaine()</a><br />
</section>
<section class="span4">
<em>No private properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/Bdd.php.html"><div class="path-wrapper">Bdd.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Bdd</div>
</dd>
 
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>php 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Aurélien PERONNET <a href="mailto:aurelien@tela-botanica.org">aurelien@tela-botanica.org</a></p>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL</p>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="constants" name="constants"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Constants</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_ERREUR_REQUETE_TPL" name="constant_ERREUR_REQUETE_TPL" class="anchor"></a>
<article id="constant_ERREUR_REQUETE_TPL" class="constant">
<h3 class="">ERREUR_REQUETE_TPL</h3>
<pre class="signature">ERREUR_REQUETE_TPL</pre>
<p><em>Constante stockant le squelette du message en cas d&#039;erreur de requête sql.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_ERREUR_CONNEXION_TPL" name="constant_ERREUR_CONNEXION_TPL" class="anchor"></a>
<article id="constant_ERREUR_CONNEXION_TPL" class="constant">
<h3 class="">ERREUR_CONNEXION_TPL</h3>
<pre class="signature">ERREUR_CONNEXION_TPL</pre>
<p><em>Constante stockant le squelette du message en cas d&#039;erreur de connexion à la base de données.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_ERREUR_SELECTION_BDD_TPL" name="constant_ERREUR_SELECTION_BDD_TPL" class="anchor"></a>
<article id="constant_ERREUR_SELECTION_BDD_TPL" class="constant">
<h3 class="">ERREUR_SELECTION_BDD_TPL</h3>
<pre class="signature">ERREUR_SELECTION_BDD_TPL</pre>
<p><em>Constante stockant le squelette du message en cas d&#039;erreur de sélection de la base de données.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_ABSTRACTION_PDO" name="constant_ABSTRACTION_PDO" class="anchor"></a>
<article id="constant_ABSTRACTION_PDO" class="constant">
<h3 class="">ABSTRACTION_PDO</h3>
<pre class="signature">ABSTRACTION_PDO</pre>
<p><em>Constante stockant le code pour l&#039;abstraction de PDO.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_ABSTRACTION_MYSQL" name="constant_ABSTRACTION_MYSQL" class="anchor"></a>
<article id="constant_ABSTRACTION_MYSQL" class="constant">
<h3 class="">ABSTRACTION_MYSQL</h3>
<pre class="signature">ABSTRACTION_MYSQL</pre>
<p><em>Constante stockant le code pour l&#039;abstraction de mysql.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_ABSTRACTION_MYSQLI" name="constant_ABSTRACTION_MYSQLI" class="anchor"></a>
<article id="constant_ABSTRACTION_MYSQLI" class="constant">
<h3 class="">ABSTRACTION_MYSQLI</h3>
<pre class="signature">ABSTRACTION_MYSQLI</pre>
<p><em>Constante stockant le code pour l&#039;abstraction de mysqli.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_ABSTRACTION_SQLITE3" name="constant_ABSTRACTION_SQLITE3" class="anchor"></a>
<article id="constant_ABSTRACTION_SQLITE3" class="constant">
<h3 class="">ABSTRACTION_SQLITE3</h3>
<pre class="signature">ABSTRACTION_SQLITE3</pre>
<p><em>Constante stockant le code pour l&#039;abstraction de SQLite3.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MODE_ASSOC" name="constant_MODE_ASSOC" class="anchor"></a>
<article id="constant_MODE_ASSOC" class="constant">
<h3 class="">MODE_ASSOC</h3>
<pre class="signature">MODE_ASSOC</pre>
<p><em>Constante stockant le code pour le mode tableau associatif des résultats des requêtes.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_MODE_OBJET" name="constant_MODE_OBJET" class="anchor"></a>
<article id="constant_MODE_OBJET" class="constant">
<h3 class="">MODE_OBJET</h3>
<pre class="signature">MODE_OBJET</pre>
<p><em>Constante stockant le code pour le mode objet des résultats des requêtes.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_ASSOC" name="property_ASSOC" class="anchor"></a>
<article class="property">
<h3 class="protected ">$ASSOC</h3>
<pre class="signature">$ASSOC</pre>
<p><em>Mode de fetch associatif</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_OBJECT" name="property_OBJECT" class="anchor"></a>
<article class="property">
<h3 class="protected ">$OBJECT</h3>
<pre class="signature">$OBJECT</pre>
<p><em>Mode de fetch objet</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_abstraction" name="property_abstraction" class="anchor"></a>
<article class="property">
<h3 class="protected ">$abstraction</h3>
<pre class="signature">$abstraction</pre>
<p><em>abstraction de base de données utilisée</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_dsn" name="property_dsn" class="anchor"></a>
<article class="property">
<h3 class="protected ">$dsn</h3>
<pre class="signature">$dsn</pre>
<p><em>DSN pour accéder à la base de données</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_type" name="property_type" class="anchor"></a>
<article class="property">
<h3 class="protected ">$type</h3>
<pre class="signature">$type</pre>
<p><em>Type de base de données (mysql, mysqli, etc .</em></p>
<p>..)</p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_hote" name="property_hote" class="anchor"></a>
<article class="property">
<h3 class="protected ">$hote</h3>
<pre class="signature">$hote</pre>
<p><em>Hote herbergeant la base de données</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_bdd_nom" name="property_bdd_nom" class="anchor"></a>
<article class="property">
<h3 class="protected ">$bdd_nom</h3>
<pre class="signature">$bdd_nom</pre>
<p><em>Nom de la base de données à laquelle le modèle doit se connecter</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_utilisateur" name="property_utilisateur" class="anchor"></a>
<article class="property">
<h3 class="protected ">$utilisateur</h3>
<pre class="signature">$utilisateur</pre>
<p><em>Nom d&#039;utilisateur</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_pass" name="property_pass" class="anchor"></a>
<article class="property">
<h3 class="protected ">$pass</h3>
<pre class="signature">$pass</pre>
<p><em>Mot de passe</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_encodage" name="property_encodage" class="anchor"></a>
<article class="property">
<h3 class="protected ">$encodage</h3>
<pre class="signature">$encodage</pre>
<p><em>Encodage de la base de données</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_connexion" name="property_connexion" class="anchor"></a>
<article class="property">
<h3 class="protected ">$connexion</h3>
<pre class="signature">$connexion</pre>
<p><em>Connexion à la base de données</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_obligatoires" name="property_parametres_obligatoires" class="anchor"></a>
<article class="property">
<h3 class="protected ">$parametres_obligatoires</h3>
<pre class="signature">$parametres_obligatoires</pre>
<p><em>Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="public ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct()</pre>
<p><em>Constructeur par défaut, appelé à l&#039;initialisation.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_ping" name="method_ping" class="anchor"></a>
<article class="method">
<h3 class="public ">ping()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">ping() : boolean</pre>
<p><em>Permet de tester, puis de reconnecter une connection au cas ou celle aurait été
perdue (utile dans le cas d&#039;une connection ouverte depuis trop longtemps)</em></p>
 
<h4>Returns</h4>
boolean
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_requeter" name="method_requeter" class="anchor"></a>
<article class="method">
<h3 class="public ">requeter()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">requeter( <span class="argument">$requete</span>) : mixed</pre>
<p><em>Execute une requête et retourne le résultat tel que renvoyé par l&#039;abstraction courante.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$requete</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
mixed
&mdash; <p>un objet contenant le résultat de la requête</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_recuperer" name="method_recuperer" class="anchor"></a>
<article class="method">
<h3 class="public ">recuperer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">recuperer( <span class="argument">$requete</span>, <span class="argument">$mode</span>) : mixed</pre>
<p><em>Execute une requête et retourne le premier résultat sous forme de tableau (par défaut) ou d&#039;objet.</em></p>
<p>Les noms des champs de la base de données correspondent aux noms des clés du tableau ou aux noms des attributs de l'objet.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$requete</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$mode</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
mixed
&mdash; <p>un objet ou un tableau contenant le résultat de la requête</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_recupererTous" name="method_recupererTous" class="anchor"></a>
<article class="method">
<h3 class="public ">recupererTous()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">recupererTous( <span class="argument">$requete</span>, <span class="argument">$mode</span>) : array</pre>
<p><em>Execute une requête et retourne un tableau de résultats. Un résultat peut être présentés sous forme
de tableau (par défaut) ou d&#039;objet.</em></p>
<p>Les noms des champs de la base de données correspondent aux noms des clés du tableau résultat ou
aux noms des attributs de l'objet résultat.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$requete</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$mode</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>un tableau contenant les résultats sous forme d'objets ou de tableau (par défaut).</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_proteger" name="method_proteger" class="anchor"></a>
<article class="method">
<h3 class="public ">proteger()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">proteger( <span class="argument">$donnees</span>) : mixed</pre>
<p><em>Protège une chaine de caractères ou le contenu d&#039;un tablea avant l&#039;insertion dans la base de données
(ajout de quotes ou guillemets).</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$donnees</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
mixed
&mdash; <p>la chaine ou le tableau à protégé</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_protegerTableau" name="method_protegerTableau" class="anchor"></a>
<article class="method">
<h3 class="public deprecated">protegerTableau()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">protegerTableau(array <span class="argument">$tableau</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tableau</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<aside class="alert alert-block alert-error">
<h4>Deprecated</h4>
changement de nom. Deviendra &quot;private&quot; dans la version 0.5. Utiliser à la place : @see proteger
</aside>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_recupererIdDernierAjout" name="method_recupererIdDernierAjout" class="anchor"></a>
<article class="method">
<h3 class="public ">recupererIdDernierAjout()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">recupererIdDernierAjout( <span class="argument">$parametres</span>) : mixed</pre>
<p><em>Retourne l&#039;identifiant de la dernière ligne insérée, ou la dernière valeur d&#039;une séquence d&#039;objets, dépendamment, dans
le cas de PDO, du driver utilisé. Les méthodes utilisées pour retourner l&#039;identifiant peuvent avoir des comportements
différent. Consulter la documentation PHP correspondant à l&#039;abstraction choisie avant de l&#039;utiliser :</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$parametres</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
mixed
&mdash; <p>le dernier identifiant de clé primaire ajouté dans la base de données (string ou int).</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href="(http://fr.php.net/manual/fr/pdo.lastinsertid.php,"><span class="namespace-wrapper">PDO::lastInsertId([ string $name = NULL ]))</span></a></dd>
<dd><a href="(http://php.net/manual/en/mysqli.insert-id.php,"><span class="namespace-wrapper">mysqli-&gt;insert_id())</span></a></dd>
<dd><a href="(http://fr.php.net/manual/fr/function.mysql-insert-id.php,"><span class="namespace-wrapper">mysql_insert_id())</span></a></dd>
<dd><a href="(http://fr.php.net/manual/fr/sqlite3.lastinsertrowid.php,"><span class="namespace-wrapper">SQLite3::lastInsertRowID())</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___destruct" name="method___destruct" class="anchor"></a>
<article class="method">
<h3 class="public ">__destruct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__destruct()</pre>
<p><em>Destructeur de classe, se contente de fermer explicitement la connexion à la base de donnée.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserProtocole" name="method_initialiserProtocole" class="anchor"></a>
<article class="method">
<h3 class="protected ">initialiserProtocole()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserProtocole()</pre>
<p><em>Initialise les constantes de classe à leur bonne valeur et déclenche une erreur si le protocole n&#039;est pas bien défini.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_connecter" name="method_connecter" class="anchor"></a>
<article class="method">
<h3 class="protected ">connecter()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">connecter()</pre>
<p><em>Connection à la base de données en utilisant les informations fournies par
le fichier de configuration.</em></p>
<p>Cette méthode est private et final car elle n'a pas vocation a être appelée par l'utilisateur.
TODO : il est peut être nécessaire pour MYSQL, MYSQLi et SQLITE3 afin d'éviter les boucles infinis
d'erreur quand la bdd n'est pas configuré d'utiliser : $this->connexion->query (comme pour PDO)</p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_requete" name="method_requete" class="anchor"></a>
<article class="method">
<h3 class="protected deprecated">requete()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">requete( <span class="argument">$requete</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$requete</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">final</span>
<aside class="alert alert-block alert-error">
<h4>Deprecated</h4>
changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see requeter
</aside>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_requeteUn" name="method_requeteUn" class="anchor"></a>
<article class="method">
<h3 class="protected deprecated">requeteUn()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">requeteUn( <span class="argument">$requete</span>, <span class="argument">$mode</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$requete</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$mode</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">final</span>
<aside class="alert alert-block alert-error">
<h4>Deprecated</h4>
changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see recuperer
</aside>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_requeteTous" name="method_requeteTous" class="anchor"></a>
<article class="method">
<h3 class="protected deprecated">requeteTous()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">requeteTous( <span class="argument">$requete</span>, <span class="argument">$mode</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$requete</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$mode</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">final</span>
<aside class="alert alert-block alert-error">
<h4>Deprecated</h4>
changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see recupererTous
</aside>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_protegerChaine" name="method_protegerChaine" class="anchor"></a>
<article class="method">
<h3 class="private ">protegerChaine()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">protegerChaine( <span class="argument">$chaine</span>) : string</pre>
<p><em>Protège une chaine de caractères avant l&#039;insertion dans la base de données (ajout de quotes ou guillemets).</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$chaine</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>la chaine protégée</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Bdd.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Bdd.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Controleur.html
New file
0,0 → 1,788
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-712961556"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-712961556" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Controleur</h1>
<p><em>Classe Controleur, coeur d&#039;une application, c&#039;est normalement la seule classe d&#039;une application
qui devrait être appelée de l&#039;extérieur.</em></p>
<p>Elle est abstraite donc doit obligatoirement être étendue.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Controleur.html#method___construct" class="">__construct()</a><br />
<a href="../classes/Controleur.html#method_chargerModele" class="">chargerModele()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<a href="../classes/Controleur.html#method_getModele" class="">getModele()</a><br />
<a href="../classes/Controleur.html#method_getVue" class="">getVue()</a><br />
<a href="../classes/Controleur.html#method_preTraiterDonnees" class="">preTraiterDonnees()</a><br />
</section>
<section class="span4">
<a href="../classes/Controleur.html#property_parametres_obligatoires" class="">$parametres_obligatoires</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<em>No private methods found</em>
</section>
<section class="span4">
<a href="../classes/Controleur.html#property_encodage" class="">$encodage</a><br />
<a href="../classes/Controleur.html#property_base_chemin_modele" class="">$base_chemin_modele</a><br />
<a href="../classes/Controleur.html#property_base_chemin_squelette" class="">$base_chemin_squelette</a><br />
<a href="../classes/Controleur.html#property_base_chemin_controleur" class="">$base_chemin_controleur</a><br />
<a href="../classes/Controleur.html#property_base_url_applicaton" class="">$base_url_applicaton</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<span class="label label-info">abstract</span>
<dl>
<dt>File</dt>
<dd><a href="../files/Controleur.php.html"><div class="path-wrapper">Controleur.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Controleur</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>php 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Aurélien PERONNET <a href="mailto:aurelien@tela-botanica.org">aurelien@tela-botanica.org</a></p>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL</p>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Controleur.php 332 2011-03-22 16:54:23Z delphine $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_obligatoires" name="property_parametres_obligatoires" class="anchor"></a>
<article class="property">
<h3 class="protected ">$parametres_obligatoires</h3>
<pre class="signature">$parametres_obligatoires</pre>
<p><em>Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_encodage" name="property_encodage" class="anchor"></a>
<article class="property">
<h3 class="private ">$encodage</h3>
<pre class="signature">$encodage</pre>
<p><em>Variable statique indiquant que les tableaux _GET et _POST ont déjà été encodé au format de l&#039;appli.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_base_chemin_modele" name="property_base_chemin_modele" class="anchor"></a>
<article class="property">
<h3 class="private ">$base_chemin_modele</h3>
<pre class="signature">$base_chemin_modele</pre>
<p><em>Chemin de base vers les classes métiers de la partie Modèle de l&#039;application.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_base_chemin_squelette" name="property_base_chemin_squelette" class="anchor"></a>
<article class="property">
<h3 class="private ">$base_chemin_squelette</h3>
<pre class="signature">$base_chemin_squelette</pre>
<p><em>Chemin de base vers les fichiers squelette de la partie Vue de l&#039;application.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_base_chemin_controleur" name="property_base_chemin_controleur" class="anchor"></a>
<article class="property">
<h3 class="private ">$base_chemin_controleur</h3>
<pre class="signature">$base_chemin_controleur</pre>
<p><em>Chemin de base vers les classes controleurs de la partie Controleur de l&#039;application.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_base_url_applicaton" name="property_base_url_applicaton" class="anchor"></a>
<article class="property">
<h3 class="private ">$base_url_applicaton</h3>
<pre class="signature">$base_url_applicaton</pre>
<p><em>Objet URL contant l&#039;url de la base de l&#039;application.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="public ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct()</pre>
<p><em>Constructeur par défaut</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_chargerModele" name="method_chargerModele" class="anchor"></a>
<article class="method">
<h3 class="public ">chargerModele()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">chargerModele(string <span class="argument">$nom_modele</span>) : boolean</pre>
<p><em>Charge un modele donné et le rend disponible sous la forme $this-&gt;nom_modele</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$nom_modele</td>
<td><p>le nom du modèle à  charger</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>false si le chargement a échoué, sinon true.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">final</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getModele" name="method_getModele" class="anchor"></a>
<article class="method">
<h3 class="protected ">getModele()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getModele(string <span class="argument">$nom_modele</span>, String <span class="argument">$ext</span>) : mixed</pre>
<p><em>Retourne un modele donné</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$nom_modele</td>
<td><p>le nom du fichier modèle à charger sans son extension</p></td>
</tr>
<tr>
<td>String</td>
<td>$ext</td>
<td><p>l'extension du fichier du modèel (par défaut : ".php"</p></td>
</tr>
</table>
<h4>Returns</h4>
mixed
&mdash; <p>false si le chargement a échoué, sinon l'objet du modèle demandé.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">final</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getVue" name="method_getVue" class="anchor"></a>
<article class="method">
<h3 class="protected ">getVue()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getVue(String <span class="argument">$nom_squelette</span>, Array <span class="argument">$donnees</span>, String <span class="argument">$ext</span>) : boolean</pre>
<p><em>Fonction prenant en paramètre le nom d&#039;un squelette et un tableau associatif de données,
en extrait les variables, charge le squelette et retourne le résultat des deux combinés.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>String</td>
<td>$nom_squelette</td>
<td><p>le nom du squelette sans son extension</p></td>
</tr>
<tr>
<td>Array</td>
<td>$donnees</td>
<td><p>un tableau associatif contenant les variables a injecter dans la vue</p></td>
</tr>
<tr>
<td>String</td>
<td>$ext</td>
<td><p>l'extension du fichier du squelette (par défaut : ".tpl.html"</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>false si la vue n'existe pas, sinon la chaine résultat.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">final</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_preTraiterDonnees" name="method_preTraiterDonnees" class="anchor"></a>
<article class="method">
<h3 class="protected ">preTraiterDonnees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">preTraiterDonnees(Array <span class="argument">$donnees</span>) : Array</pre>
<p><em>Fonction prenant en paramètre un tableau de données et effectuant un traitement dessus.</em></p>
<p>Cette fonction est à surcharger dans les classes filles pour automatiser un traitement
avant chaque chargement de vue.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>Array</td>
<td>$donnees</td>
<td><p>Le tableau de données à traiter</p></td>
</tr>
</table>
<h4>Returns</h4>
Array
&mdash; <p>$donnees Le tableau de données traité</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Controleur.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Controleur.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/CacheFichier.html
New file
0,0 → 1,2148
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1720629249"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1720629249" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>CacheFichier</h1>
<p><em></em></p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/CacheFichier.html#method___construct" class="">__construct()</a><br />
<a href="../classes/CacheFichier.html#method_setEmplacement" class="">setEmplacement()</a><br />
<a href="../classes/CacheFichier.html#method_charger" class="">charger()</a><br />
<a href="../classes/CacheFichier.html#method_tester" class="">tester()</a><br />
<a href="../classes/CacheFichier.html#method_sauver" class="">sauver()</a><br />
<a href="../classes/CacheFichier.html#method_supprimer" class="">supprimer()</a><br />
<a href="../classes/CacheFichier.html#method_nettoyer" class="">nettoyer()</a><br />
<a href="../classes/CacheFichier.html#method_getIds" class="">getIds()</a><br />
<a href="../classes/CacheFichier.html#method_getTags" class="">getTags()</a><br />
<a href="../classes/CacheFichier.html#method_getIdsAvecLesTags" class="">getIdsAvecLesTags()</a><br />
<a href="../classes/CacheFichier.html#method_getIdsSansLesTags" class="">getIdsSansLesTags()</a><br />
<a href="../classes/CacheFichier.html#method_getIdsAvecUnTag" class="">getIdsAvecUnTag()</a><br />
<a href="../classes/CacheFichier.html#method_getPourcentageRemplissage" class="">getPourcentageRemplissage()</a><br />
<a href="../classes/CacheFichier.html#method_getMetadonnees" class="">getMetadonnees()</a><br />
<a href="../classes/CacheFichier.html#method_ajouterSupplementDureeDeVie" class="">ajouterSupplementDureeDeVie()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<a href="../classes/CacheFichier.html#method_getMetadonneesFichier" class="">getMetadonneesFichier()</a><br />
<a href="../classes/CacheFichier.html#method_setMetadonnees" class="">setMetadonnees()</a><br />
<a href="../classes/CacheFichier.html#method_supprimerMetadonnees" class="">supprimerMetadonnees()</a><br />
<a href="../classes/CacheFichier.html#method_nettoyerMetadonnees" class="">nettoyerMetadonnees()</a><br />
<a href="../classes/CacheFichier.html#method_chargerMetadonnees" class="">chargerMetadonnees()</a><br />
<a href="../classes/CacheFichier.html#method_sauverMetadonnees" class="">sauverMetadonnees()</a><br />
<a href="../classes/CacheFichier.html#method_getNomFichierMeta" class="">getNomFichierMeta()</a><br />
<a href="../classes/CacheFichier.html#method_etreFichierMeta" class="">etreFichierMeta()</a><br />
<a href="../classes/CacheFichier.html#method_supprimerFichier" class="">supprimerFichier()</a><br />
<a href="../classes/CacheFichier.html#method_nettoyerFichiers" class="">nettoyerFichiers()</a><br />
<a href="../classes/CacheFichier.html#method_analyserCache" class="">analyserCache()</a><br />
<a href="../classes/CacheFichier.html#method_genererCleSecu" class="">genererCleSecu()</a><br />
<a href="../classes/CacheFichier.html#method_transformaterIdEnNomFichier" class="">transformaterIdEnNomFichier()</a><br />
<a href="../classes/CacheFichier.html#method_getFichierNom" class="">getFichierNom()</a><br />
<a href="../classes/CacheFichier.html#method_getChemin" class="">getChemin()</a><br />
<a href="../classes/CacheFichier.html#method_lancerMkdirEtChmodRecursif" class="">lancerMkdirEtChmodRecursif()</a><br />
<a href="../classes/CacheFichier.html#method_testerExistenceCache" class="">testerExistenceCache()</a><br />
<a href="../classes/CacheFichier.html#method_getContenuFichier" class="">getContenuFichier()</a><br />
<a href="../classes/CacheFichier.html#method_setContenuFichier" class="">setContenuFichier()</a><br />
<a href="../classes/CacheFichier.html#method_transformerNomFichierEnId" class="">transformerNomFichierEnId()</a><br />
</section>
<section class="span4">
<a href="../classes/CacheFichier.html#property_options" class="">$options</a><br />
<a href="../classes/CacheFichier.html#property_metadonnees" class="">$metadonnees</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/CacheFichier.html#method_initialiserOptionsParConfig" class="">initialiserOptionsParConfig()</a><br />
<a href="../classes/CacheFichier.html#method_setOptions" class="">setOptions()</a><br />
</section>
<section class="span4">
<a href="../classes/CacheFichier.html#property_Cache" class="">$Cache</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/CacheFichier.php.html"><div class="path-wrapper">CacheFichier.php</div></a></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\CacheFichier</div>
</dd>
 
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_options" name="property_options" class="anchor"></a>
<article class="property">
<h3 class="protected ">$options</h3>
<pre class="signature">$options : array</pre>
<p><em>Options disponibles</em></p>
<p>====> (string) stockage_chemin :
Chemin vers le dossier devant contenir l'arborescence du cache.</p>
<p>=====> (boolean) fichier_verrou :</p>
<ul>
<li>Active / Désactive le verrouillage des fichiers</li>
<li>Peut éviter la corruption du cache dans de mauvaises circonstances, mais cela ne fonctionne pas sur des serveur
multithread et sur les systèmes de fichiers NFS par exemple.</li>
</ul>
<p>=====> (boolean) controle_lecture :</p>
<ul>
<li>Activer / désactiver le contrôle de lecture</li>
<li>S'il est activé, une clé de contrôle est ajoutée dans le fichier de cache et cette clé est comparée avec celle calculée
après la lecture.</li>
</ul>
<p>=====> (string) controle_lecture_type :
Type de contrôle de lecture (seulement si le contrôle de lecture est activé).
Les valeurs disponibles sont:</p>
<ul>
<li>«md5» pour un contrôle md5 (le meilleur mais le plus lent)</li>
<li>«crc32» pour un contrôle de hachage crc32 (un peu moins sécurisé, mais plus rapide, un meilleur choix)</li>
<li>«adler32» pour un contrôle de hachage adler32 (excellent choix aussi, plus rapide que crc32)</li>
<li>«strlen» pour un test de longueur uniquement (le plus rapide)</li>
</ul>
<p>=====> (int) dossier_niveau :</p>
<ul>
<li>Permet de réglez le nombre de niveau de sous-dossier que contiendra l'arborescence des dossiers du cache.
0 signifie "pas de sous-dossier pour le cache",
1 signifie "un niveau de sous-dossier",
2 signifie "deux niveaux" ...
Cette option peut accélérer le cache seulement lorsque vous avez plusieurs centaines de fichiers de cache.
Seuls des tests spécifiques peuvent vous aider à choisir la meilleure valeur possible pour vous.
1 ou 2 peut être est un bon début.</li>
</ul>
<p>=====> (int) dossier_umask :</p>
<ul>
<li>Umask pour les sous-dossiers de l'arborescence du cache.</li>
</ul>
<p>=====> (string) fichier_prefixe :</p>
<ul>
<li>préfixe pour les fichiers du cache</li>
<li>ATTENTION : faite vraiment attention avec cette option, car une valeur trop générique dans le dossier cache du système
(comme /tmp) peut provoquer des catastrophes lors du nettoyage du cache.</li>
</ul>
<p>=====> (int) fichier_umask :</p>
<ul>
<li>Umask pour les fichiers de cache</li>
</ul>
<p>=====> (int) metadonnees_max_taille :</p>
<ul>
<li>taille maximum pour le tableau de métadonnées du cache (ne changer pas cette valeur sauf si vous savez ce que vous faite)</li>
</ul>
 
<h4>Type</h4>
array
&mdash; options disponibles </article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_metadonnees" name="property_metadonnees" class="anchor"></a>
<article class="property">
<h3 class="protected ">$metadonnees</h3>
<pre class="signature">$metadonnees : array</pre>
<p><em>Array of metadatas (each item is an associative array)</em></p>
 
<h4>Type</h4>
array
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_Cache" name="property_Cache" class="anchor"></a>
<article class="property">
<h3 class="private ">$Cache</h3>
<pre class="signature">$Cache</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="public ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct(array <span class="argument">$options</span>, \Cache <span class="argument">$cache</span>) : void</pre>
<p><em>Constructor</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$options</td>
<td><p>associative array of options</p></td>
</tr>
<tr>
<td><a href="../classes/Cache.html">\Cache</a></td>
<td>$cache</td>
<td></td>
</tr>
</table>
<h4>Throws</h4>
<dl>
<dt>\Zend_Cache_Exception</dt>
<dd></dd>
</dl>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setEmplacement" name="method_setEmplacement" class="anchor"></a>
<article class="method">
<h3 class="public ">setEmplacement()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setEmplacement( <span class="argument">$emplacement</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$emplacement</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_charger" name="method_charger" class="anchor"></a>
<article class="method">
<h3 class="public ">charger()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">charger(string <span class="argument">$id</span>, <span class="argument">$ne_pas_tester_validiter_du_cache</span>) : string|false</pre>
<p><em>Test if a cache is available for the given id and (if yes) return it (false else)</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>cache id</p></td>
</tr>
<tr>
<td></td>
<td>$ne_pas_tester_validiter_du_cache</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string|false
&mdash; <p>cached datas</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_tester" name="method_tester" class="anchor"></a>
<article class="method">
<h3 class="public ">tester()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">tester(string <span class="argument">$id</span>) : mixed</pre>
<p><em>Teste si un enregistrement en cache est disponible ou pas (pour l&#039;id passé en paramètre).</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>identifiant de cache.</p></td>
</tr>
</table>
<h4>Returns</h4>
mixed
&mdash; <p>false (le cache n'est pas disponible) ou timestamp (int) "de dernière modification" de l'enregistrement en cache</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_sauver" name="method_sauver" class="anchor"></a>
<article class="method">
<h3 class="public ">sauver()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">sauver( <span class="argument">$donnees</span>, string <span class="argument">$id</span>, array <span class="argument">$tags</span>, <span class="argument">$duree_vie_specifique</span>) : boolean</pre>
<p><em>Save some string datas into a cache record</em></p>
<p>Note : $data is always "string" (serialization is done by the
core not by the backend)</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$donnees</td>
<td></td>
</tr>
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
<tr>
<td>array</td>
<td>$tags</td>
<td><p>Array of strings, the cache record will be tagged by each string entry</p></td>
</tr>
<tr>
<td></td>
<td>$duree_vie_specifique</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimer" name="method_supprimer" class="anchor"></a>
<article class="method">
<h3 class="public ">supprimer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimer(string <span class="argument">$id</span>) : boolean</pre>
<p><em>Remove a cache record</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyer" name="method_nettoyer" class="anchor"></a>
<article class="method">
<h3 class="public ">nettoyer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyer(string <span class="argument">$mode</span>, <span class="argument">$tags</span>) : boolean</pre>
<p><em>Clean some cache records</em></p>
<p>Available modes are :
'all' (default) => remove all cache entries ($tags is not used)
'old' => remove too old cache entries ($tags is not used)
'matchingTag' => remove cache entries matching all given tags</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
<p>'notMatchingTag' => remove cache entries not matching one of the given tags</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
<p>'matchingAnyTag' => remove cache entries matching any given tags</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$mode</td>
<td><p>clean mode</p></td>
</tr>
<tr>
<td></td>
<td>$tags</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIds" name="method_getIds" class="anchor"></a>
<article class="method">
<h3 class="public ">getIds()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIds() : array</pre>
<p><em>Return an array of stored cache ids</em></p>
 
<h4>Returns</h4>
array
&mdash; <p>array of stored cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getTags" name="method_getTags" class="anchor"></a>
<article class="method">
<h3 class="public ">getTags()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getTags() : array</pre>
<p><em>Return an array of stored tags</em></p>
 
<h4>Returns</h4>
array
&mdash; <p>array of stored tags (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIdsAvecLesTags" name="method_getIdsAvecLesTags" class="anchor"></a>
<article class="method">
<h3 class="public ">getIdsAvecLesTags()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIdsAvecLesTags(array <span class="argument">$tags</span>) : array</pre>
<p><em>Return an array of stored cache ids which match given tags</em></p>
<p>In case of multiple tags, a logical AND is made between tags</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tags</td>
<td><p>array of tags</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of matching cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIdsSansLesTags" name="method_getIdsSansLesTags" class="anchor"></a>
<article class="method">
<h3 class="public ">getIdsSansLesTags()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIdsSansLesTags(array <span class="argument">$tags</span>) : array</pre>
<p><em>Return an array of stored cache ids which don&#039;t match given tags</em></p>
<p>In case of multiple tags, a logical OR is made between tags</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tags</td>
<td><p>array of tags</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of not matching cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getIdsAvecUnTag" name="method_getIdsAvecUnTag" class="anchor"></a>
<article class="method">
<h3 class="public ">getIdsAvecUnTag()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getIdsAvecUnTag(array <span class="argument">$tags</span>) : array</pre>
<p><em>Return an array of stored cache ids which match any given tags</em></p>
<p>In case of multiple tags, a logical AND is made between tags</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$tags</td>
<td><p>array of tags</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of any matching cache ids (string)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getPourcentageRemplissage" name="method_getPourcentageRemplissage" class="anchor"></a>
<article class="method">
<h3 class="public ">getPourcentageRemplissage()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getPourcentageRemplissage() : int</pre>
<p><em>Return the filling percentage of the backend storage</em></p>
 
<h4>Throws</h4>
<dl>
<dt>\Zend_Cache_Exception</dt>
<dd></dd>
</dl>
<h4>Returns</h4>
int
&mdash; <p>integer between 0 and 100</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getMetadonnees" name="method_getMetadonnees" class="anchor"></a>
<article class="method">
<h3 class="public ">getMetadonnees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getMetadonnees(string <span class="argument">$id</span>) : array</pre>
<p><em>Return an array of metadatas for the given cache id</em></p>
<p>The array must include these keys :</p>
<ul>
<li>expire : the expire timestamp</li>
<li>tags : a string array of tags</li>
<li>mtime : timestamp of last modification time</li>
</ul>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>array of metadatas (false if the cache id is not found)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_ajouterSupplementDureeDeVie" name="method_ajouterSupplementDureeDeVie" class="anchor"></a>
<article class="method">
<h3 class="public ">ajouterSupplementDureeDeVie()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">ajouterSupplementDureeDeVie(string <span class="argument">$id</span>, <span class="argument">$supplement_duree_de_vie</span>) : boolean</pre>
<p><em>Give (if possible) an extra lifetime to the given cache id</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>cache id</p></td>
</tr>
<tr>
<td></td>
<td>$supplement_duree_de_vie</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true if ok</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getMetadonneesFichier" name="method_getMetadonneesFichier" class="anchor"></a>
<article class="method">
<h3 class="protected ">getMetadonneesFichier()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getMetadonneesFichier(string <span class="argument">$id</span>) : array|false</pre>
<p><em>Get a metadatas record</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
array|false
&mdash; <p>Associative array of metadatas</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setMetadonnees" name="method_setMetadonnees" class="anchor"></a>
<article class="method">
<h3 class="protected ">setMetadonnees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setMetadonnees(string <span class="argument">$id</span>, <span class="argument">$metadonnees</span>, <span class="argument">$sauvegarde</span>) : boolean</pre>
<p><em>Set a metadatas record</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
<tr>
<td></td>
<td>$metadonnees</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$sauvegarde</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimerMetadonnees" name="method_supprimerMetadonnees" class="anchor"></a>
<article class="method">
<h3 class="protected ">supprimerMetadonnees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimerMetadonnees(string <span class="argument">$id</span>) : boolean</pre>
<p><em>Drop a metadata record</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyerMetadonnees" name="method_nettoyerMetadonnees" class="anchor"></a>
<article class="method">
<h3 class="protected ">nettoyerMetadonnees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyerMetadonnees() : void</pre>
<p><em>Clear the metadatas array</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_chargerMetadonnees" name="method_chargerMetadonnees" class="anchor"></a>
<article class="method">
<h3 class="protected ">chargerMetadonnees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">chargerMetadonnees(string <span class="argument">$id</span>) : array|false</pre>
<p><em>Load metadatas from disk</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
array|false
&mdash; <p>Metadatas associative array</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_sauverMetadonnees" name="method_sauverMetadonnees" class="anchor"></a>
<article class="method">
<h3 class="protected ">sauverMetadonnees()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">sauverMetadonnees(string <span class="argument">$id</span>, <span class="argument">$metadonnees</span>) : boolean</pre>
<p><em>Save metadatas to disk</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
<tr>
<td></td>
<td>$metadonnees</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getNomFichierMeta" name="method_getNomFichierMeta" class="anchor"></a>
<article class="method">
<h3 class="protected ">getNomFichierMeta()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getNomFichierMeta(string <span class="argument">$id</span>) : string</pre>
<p><em>Make and return a file name (with path) for metadatas</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>Metadatas file name (with path)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_etreFichierMeta" name="method_etreFichierMeta" class="anchor"></a>
<article class="method">
<h3 class="protected ">etreFichierMeta()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">etreFichierMeta( <span class="argument">$fichier_nom</span>) : boolean</pre>
<p><em>Check if the given filename is a metadatas one</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$fichier_nom</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True if it's a metadatas one</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimerFichier" name="method_supprimerFichier" class="anchor"></a>
<article class="method">
<h3 class="protected ">supprimerFichier()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimerFichier( <span class="argument">$fichier</span>) : boolean</pre>
<p><em>Remove a file</em></p>
<p>If we can't remove the file (because of locks or any problem), we will touch
the file to invalidate it</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$fichier</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>True if ok</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_nettoyerFichiers" name="method_nettoyerFichiers" class="anchor"></a>
<article class="method">
<h3 class="protected ">nettoyerFichiers()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">nettoyerFichiers( <span class="argument">$dossier</span>, string <span class="argument">$mode</span>, array <span class="argument">$tags</span>) : boolean</pre>
<p><em>Clean some cache records (protected method used for recursive stuff)</em></p>
<p>Available modes are :
Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used)
Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used)
Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
<p>Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags}</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
<p>Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => remove cache entries matching any given tags</p>
<pre><code> ($tags can be an array of strings or a single string)</code></pre>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$dossier</td>
<td></td>
</tr>
<tr>
<td>string</td>
<td>$mode</td>
<td><p>Clean mode</p></td>
</tr>
<tr>
<td>array</td>
<td>$tags</td>
<td><p>Array of tags</p></td>
</tr>
</table>
<h4>Throws</h4>
<dl>
<dt>\Zend_Cache_Exception</dt>
<dd></dd>
</dl>
<h4>Returns</h4>
boolean
&mdash; <p>True if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_analyserCache" name="method_analyserCache" class="anchor"></a>
<article class="method">
<h3 class="protected ">analyserCache()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">analyserCache( <span class="argument">$dossier</span>, <span class="argument">$mode</span>, <span class="argument">$tags</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$dossier</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$mode</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$tags</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_genererCleSecu" name="method_genererCleSecu" class="anchor"></a>
<article class="method">
<h3 class="protected ">genererCleSecu()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">genererCleSecu( <span class="argument">$donnees</span>, <span class="argument">$type_de_controle</span>) : string</pre>
<p><em>Make a control key with the string containing datas</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$donnees</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$type_de_controle</td>
<td></td>
</tr>
</table>
<h4>Throws</h4>
<dl>
<dt>\Zend_Cache_Exception</dt>
<dd></dd>
</dl>
<h4>Returns</h4>
string
&mdash; <p>Control key</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_transformaterIdEnNomFichier" name="method_transformaterIdEnNomFichier" class="anchor"></a>
<article class="method">
<h3 class="protected ">transformaterIdEnNomFichier()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">transformaterIdEnNomFichier(string <span class="argument">$id</span>) : string</pre>
<p><em>Transform a cache id into a file name and return it</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>File name</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getFichierNom" name="method_getFichierNom" class="anchor"></a>
<article class="method">
<h3 class="protected ">getFichierNom()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getFichierNom(string <span class="argument">$id</span>) : string</pre>
<p><em>Make and return a file name (with path)</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>File name (with path)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getChemin" name="method_getChemin" class="anchor"></a>
<article class="method">
<h3 class="protected ">getChemin()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getChemin(string <span class="argument">$id</span>, boolean <span class="argument">$decoupage</span>) : string</pre>
<p><em>Return the complete directory path of a filename (including hashedDirectoryStructure)</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
<tr>
<td>boolean</td>
<td>$decoupage</td>
<td><p>if true, returns array of directory parts instead of single string</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>Complete directory path</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_lancerMkdirEtChmodRecursif" name="method_lancerMkdirEtChmodRecursif" class="anchor"></a>
<article class="method">
<h3 class="protected ">lancerMkdirEtChmodRecursif()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">lancerMkdirEtChmodRecursif(string <span class="argument">$id</span>) : boolean</pre>
<p><em>Make the directory strucuture for the given id</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>cache id</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_testerExistenceCache" name="method_testerExistenceCache" class="anchor"></a>
<article class="method">
<h3 class="protected ">testerExistenceCache()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">testerExistenceCache(string <span class="argument">$id</span>, <span class="argument">$ne_pas_tester_validiter_du_cache</span>) : boolean|mixed</pre>
<p><em>Test if the given cache id is available (and still valid as a cache record)</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id</td>
<td><p>Cache id</p></td>
</tr>
<tr>
<td></td>
<td>$ne_pas_tester_validiter_du_cache</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean|mixed
&mdash; <p>false (a cache is not available) or "last modified" timestamp (int) of the available cache record</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getContenuFichier" name="method_getContenuFichier" class="anchor"></a>
<article class="method">
<h3 class="protected ">getContenuFichier()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getContenuFichier( <span class="argument">$fichier</span>) : string</pre>
<p><em>Return the file content of the given file</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$fichier</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>File content (or false if problem)</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setContenuFichier" name="method_setContenuFichier" class="anchor"></a>
<article class="method">
<h3 class="protected ">setContenuFichier()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setContenuFichier( <span class="argument">$fichier</span>, <span class="argument">$chaine</span>) : boolean</pre>
<p><em>Put the given string into the given file</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$fichier</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$chaine</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>true if no problem</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_transformerNomFichierEnId" name="method_transformerNomFichierEnId" class="anchor"></a>
<article class="method">
<h3 class="protected ">transformerNomFichierEnId()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">transformerNomFichierEnId( <span class="argument">$nom_de_fichier</span>) : string</pre>
<p><em>Transform a file name into cache id and return it</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$nom_de_fichier</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>Cache id</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserOptionsParConfig" name="method_initialiserOptionsParConfig" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserOptionsParConfig()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserOptionsParConfig()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setOptions" name="method_setOptions" class="anchor"></a>
<article class="method">
<h3 class="private ">setOptions()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setOptions( <span class="argument">$options</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$options</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">CacheFichier.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/CacheFichier.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Framework.html
New file
0,0 → 1,1090
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-258167610"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-258167610" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Framework</h1>
<p><em>Classe de base du Framework :
- fournissant des infos sur l&#039;application,
- paramétrant l&#039;environnement de l&#039;appli et du framework,
- réalisant des traitements sur les variables globales ($_GET, $_POST, $_COOKIE.</em></p>
<p>..)</p>
<p>Cette classe contient la fonction de chargement automatique de classes.
Ce fichier doit toujours rester à la racine du framework car il initialise le chemin
de l'application en se basant sur son propre emplacement.</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Framework.html#method_setCheminAppli" class="">setCheminAppli()</a><br />
<a href="../classes/Framework.html#method_getCheminAppli" class="">getCheminAppli()</a><br />
<a href="../classes/Framework.html#method_setInfoAppli" class="">setInfoAppli()</a><br />
<a href="../classes/Framework.html#method_getInfoAppli" class="">getInfoAppli()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<a href="../classes/Framework.html#method_verifierEtReencoderTableauRequete" class="">verifierEtReencoderTableauRequete()</a><br />
<a href="../classes/Framework.html#method_encoderTableau" class="">encoderTableau()</a><br />
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/Framework.html#method_initialiserEnvironnement" class="">initialiserEnvironnement()</a><br />
<a href="../classes/Framework.html#method_initialiserFramework" class="">initialiserFramework()</a><br />
<a href="../classes/Framework.html#method_definirConstantesGlobales" class="">definirConstantesGlobales()</a><br />
<a href="../classes/Framework.html#method_definirCheminAppli" class="">definirCheminAppli()</a><br />
<a href="../classes/Framework.html#method_enregistrerMethodesAutoload" class="">enregistrerMethodesAutoload()</a><br />
<a href="../classes/Framework.html#method_autoloadFw" class="">autoloadFw()</a><br />
<a href="../classes/Framework.html#method_autoloadAppliDefaut" class="">autoloadAppliDefaut()</a><br />
<a href="../classes/Framework.html#method_initialiserUrl" class="">initialiserUrl()</a><br />
<a href="../classes/Framework.html#method_verifierEtTraiterSlashTableauRequete" class="">verifierEtTraiterSlashTableauRequete()</a><br />
</section>
<section class="span4">
<a href="../classes/Framework.html#property_encodage" class="">$encodage</a><br />
<a href="../classes/Framework.html#property_info" class="">$info</a><br />
<a href="../classes/Framework.html#property_chemin" class="">$chemin</a><br />
<a href="../classes/Framework.html#property_parametres_obligatoires" class="">$parametres_obligatoires</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/Framework.php.html"><div class="path-wrapper">Framework.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Framework</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>PHP 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL-v3</p>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL-v2</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: Framework.php 391 2011-11-09 16:55:53Z jpm $</p>
</td>
</tr>
<tr>
<th>
since
</th>
<td>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_encodage" name="property_encodage" class="anchor"></a>
<article class="property">
<h3 class="private ">$encodage</h3>
<pre class="signature">$encodage</pre>
<p><em>Variable statique indiquant que les tableaux _GET et _POST ont déjà été encodé au format de l&#039;appli.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_info" name="property_info" class="anchor"></a>
<article class="property">
<h3 class="private ">$info</h3>
<pre class="signature">$info</pre>
<p><em>Tableau d&#039;informations sur l&#039;application</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_chemin" name="property_chemin" class="anchor"></a>
<article class="property">
<h3 class="private ">$chemin</h3>
<pre class="signature">$chemin</pre>
<p><em>Chemin de base de l&#039;application</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_obligatoires" name="property_parametres_obligatoires" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres_obligatoires</h3>
<pre class="signature">$parametres_obligatoires</pre>
<p><em>Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setCheminAppli" name="method_setCheminAppli" class="anchor"></a>
<article class="method">
<h3 class="public ">setCheminAppli()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setCheminAppli(string <span class="argument">$chemin_fichier_principal</span>)</pre>
<p><em>Permet d&#039;indiquer le chemin de base de l&#039;Application.</em></p>
<p>Cette méthode doit obligatoirement être utilisée par l'application pour que le Framework fonctionne correctement.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$chemin_fichier_principal</td>
<td><p>chemin de base</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getCheminAppli" name="method_getCheminAppli" class="anchor"></a>
<article class="method">
<h3 class="public ">getCheminAppli()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getCheminAppli() : string</pre>
<p><em>accesseur pour le chemin</em></p>
 
<h4>Returns</h4>
string
&mdash; <p>le chemin</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setInfoAppli" name="method_setInfoAppli" class="anchor"></a>
<article class="method">
<h3 class="public ">setInfoAppli()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setInfoAppli(array <span class="argument">$info</span>) : void</pre>
<p><em>Le tableau des informations sur l&#039;application possède les clés suivantes :
- nom : nom de l&#039;application
- abr : abréviation de l&#039;application
- encodage : encodage de l&#039;application (ISO-8859-15, UTF-8.</em></p>
<p>..)</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$info</td>
<td><p>tableau fournissant des informations sur l'application</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getInfoAppli" name="method_getInfoAppli" class="anchor"></a>
<article class="method">
<h3 class="public ">getInfoAppli()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getInfoAppli(string <span class="argument">$cle</span>)</pre>
<p><em>Accesseur pour le tableau d&#039;infos sur l&#039;application.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$cle</td>
<td><p>la clé à laquelle on veut accéder</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_verifierEtReencoderTableauRequete" name="method_verifierEtReencoderTableauRequete" class="anchor"></a>
<article class="method">
<h3 class="protected ">verifierEtReencoderTableauRequete()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">verifierEtReencoderTableauRequete()</pre>
<p><em>Procédure vérifiant l&#039;encodage des tableaux $_GET et $_POST et les transcodant dans l&#039;encodage de l&#039;application</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_encoderTableau" name="method_encoderTableau" class="anchor"></a>
<article class="method">
<h3 class="protected ">encoderTableau()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">encoderTableau(mixed <span class="argument">$tableau</span>, mixed <span class="argument">$encodage_sortie</span>, mixed <span class="argument">$encodage_entree</span>) : Array</pre>
<p><em>Fonction récursive transcodant toutes les valeurs d&#039;un tableau de leur encodage d&#039;entrée vers un encodage de sortie donné</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>mixed</td>
<td>$tableau</td>
<td><p>Array Un tableau de données à encoder</p></td>
</tr>
<tr>
<td>mixed</td>
<td>$encodage_sortie</td>
<td><p>String l'encodage vers lequel on doit transcoder</p></td>
</tr>
<tr>
<td>mixed</td>
<td>$encodage_entree</td>
<td><p>String l'encodage original des chaines du tableau (optionnel)</p></td>
</tr>
</table>
<h4>Returns</h4>
Array
&mdash; <p>Le tableau encodé dans l'encodage de sortie</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<span class="label label-info">final</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserEnvironnement" name="method_initialiserEnvironnement" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserEnvironnement()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserEnvironnement()</pre>
<p><em>Initialise l&#039;environnement nécessaire au Framework : constantes globales, méthodeles autoload, séparateur d&#039;arguments
d&#039;url.</em></p>
<p>Cette méthode est appelée automatiquement suite à la définition du chemin de l'application via Application::setChemin().</p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserFramework" name="method_initialiserFramework" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserFramework()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserFramework()</pre>
<p><em>Initialise différentes classes du Framework nécessaires pour le fonctionnement de l&#039;application.</em></p>
<p>Ces classes sont ensuites controlées via les fichiers de config.ini.
Elle est appelée automatiquement suite à la définition du chemin de l'application via Application::setChemin().</p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_definirConstantesGlobales" name="method_definirConstantesGlobales" class="anchor"></a>
<article class="method">
<h3 class="private ">definirConstantesGlobales()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">definirConstantesGlobales()</pre>
<p><em>Redéfinit des constantes globales utiles pour le Framework et les applis.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_definirCheminAppli" name="method_definirCheminAppli" class="anchor"></a>
<article class="method">
<h3 class="private ">definirCheminAppli()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">definirCheminAppli( <span class="argument">$chemin</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$chemin</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_enregistrerMethodesAutoload" name="method_enregistrerMethodesAutoload" class="anchor"></a>
<article class="method">
<h3 class="private ">enregistrerMethodesAutoload()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">enregistrerMethodesAutoload()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_autoloadFw" name="method_autoloadFw" class="anchor"></a>
<article class="method">
<h3 class="private ">autoloadFw()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">autoloadFw( <span class="argument">$nom_classe_fw</span>)</pre>
<p><em>Autoload pour le Framework.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$nom_classe_fw</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_autoloadAppliDefaut" name="method_autoloadAppliDefaut" class="anchor"></a>
<article class="method">
<h3 class="private ">autoloadAppliDefaut()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">autoloadAppliDefaut( <span class="argument">$nom_classe</span>)</pre>
<p><em>Autoload par défaut pour l&#039;application</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$nom_classe</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiserUrl" name="method_initialiserUrl" class="anchor"></a>
<article class="method">
<h3 class="private ">initialiserUrl()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiserUrl()</pre>
<p><em>Initialise le format des urls.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_verifierEtTraiterSlashTableauRequete" name="method_verifierEtTraiterSlashTableauRequete" class="anchor"></a>
<article class="method">
<h3 class="private ">verifierEtTraiterSlashTableauRequete()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">verifierEtTraiterSlashTableauRequete()</pre>
<p><em>Procédure vérifiant l&#039;activation des magic quotes et remplacant les slash dans les tableaux de requete</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Framework.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Framework.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/RestService.html
New file
0,0 → 1,902
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-825091324"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-825091324" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>RestService</h1>
<p><em>Classe principale gérant les services.</em></p>
<p>Paramètres liés dans config.ini :</p>
<ul>
<li>serveur.baseURL</li>
</ul>
<p>Encodage en entrée : utf8
Encodage en sortie : utf8</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/RestService.html#method___construct" class="">__construct()</a><br />
<a href="../classes/RestService.html#method_initialiser" class="">initialiser()</a><br />
<a href="../classes/RestService.html#method_utiliserParametresBruts" class="">utiliserParametresBruts()</a><br />
<a href="../classes/RestService.html#method_consulter" class="">consulter()</a><br />
<a href="../classes/RestService.html#method_modifier" class="">modifier()</a><br />
<a href="../classes/RestService.html#method_ajouter" class="">ajouter()</a><br />
<a href="../classes/RestService.html#method_supprimer" class="">supprimer()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<em>No constants found</em>
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<a href="../classes/RestService.html#method_getBdd" class="">getBdd()</a><br />
<a href="../classes/RestService.html#method_getRestClient" class="">getRestClient()</a><br />
<a href="../classes/RestService.html#method_ajouterMessage" class="">ajouterMessage()</a><br />
</section>
<section class="span4">
<a href="../classes/RestService.html#property_bdd" class="deprecated">$bdd</a><br />
<a href="../classes/RestService.html#property_utilisationParametresBruts" class="">$utilisationParametresBruts</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<em>No private methods found</em>
</section>
<section class="span4">
<a href="../classes/RestService.html#property_RestClient" class="">$RestClient</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<span class="label label-info">abstract</span>
<dl>
<dt>File</dt>
<dd><a href="../files/RestService.php.html"><div class="path-wrapper">RestService.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\RestService</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>Php 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p>GPL v3 <a href="http://www.gnu.org/licenses/gpl.txt">http://www.gnu.org/licenses/gpl.txt</a></p>
<p>CECILL v2 <a href="http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt</a></p>
</td>
</tr>
<tr>
<th>
since
</th>
<td>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>$Id: RestService.php 382 2011-10-14 10:36:41Z jpm $</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_bdd" name="property_bdd" class="anchor"></a>
<article class="property">
<h3 class="protected deprecated">$bdd</h3>
<pre class="signature">$bdd</pre>
<p><em>Objet de connection à la base de données.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<aside class="alert alert-block alert-error">
<h4>Deprecated</h4>
Utiliser la methode getBdd().
</aside>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_utilisationParametresBruts" name="property_utilisationParametresBruts" class="anchor"></a>
<article class="property">
<h3 class="protected ">$utilisationParametresBruts</h3>
<pre class="signature">$utilisationParametresBruts</pre>
<p><em>Indique si oui (true) ou non (false), on veut utiliser les paramètres brutes.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_RestClient" name="property_RestClient" class="anchor"></a>
<article class="property">
<h3 class="private ">$RestClient</h3>
<pre class="signature">$RestClient</pre>
<p><em>Objet Rest Client.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="public ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct( <span class="argument">$config</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$config</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_initialiser" name="method_initialiser" class="anchor"></a>
<article class="method">
<h3 class="public ">initialiser()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">initialiser()</pre>
<p><em></em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_utiliserParametresBruts" name="method_utiliserParametresBruts" class="anchor"></a>
<article class="method">
<h3 class="public ">utiliserParametresBruts()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">utiliserParametresBruts()</pre>
<p><em>Méthode permettant de savoir si le service veut utiliser des paramètres bruts (issu de la QueryString)
ou pas (issu de $_GET).</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_consulter" name="method_consulter" class="anchor"></a>
<article class="method">
<h3 class="public ">consulter()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">consulter( <span class="argument">$ressources</span>, <span class="argument">$parametres</span>) : string</pre>
<p><em>Méthode appelée lors d&#039;une requête HTTP de type GET.</em></p>
<p>Si la consultation est un succès, le code statut HTTP retourné sera 200. Dans tous les autres cas,
la méthode devra retourner le code statut HTTP adéquate.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$ressources</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$parametres</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>une chaine indiquant le succès de l'opération et les données demandées.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_modifier" name="method_modifier" class="anchor"></a>
<article class="method">
<h3 class="public ">modifier()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">modifier( <span class="argument">$ressources</span>, <span class="argument">$requeteDonnees</span>) : mixed</pre>
<p><em>Méthode appelée lors d&#039;une requête HTTP de type POST.</em></p>
<p>La ressource à modifier est indiquée via l'url. Les données devant servir à la mise à jours sont passées dans le corps
de la requête.
Si la modification est un succès, la méthode devra retourner "true" et le code statut HTTP retourné sera 201.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$ressources</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$requeteDonnees</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
mixed
&mdash; <p>une chaine indiquant le succès de l'opération ou rien.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_ajouter" name="method_ajouter" class="anchor"></a>
<article class="method">
<h3 class="public ">ajouter()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">ajouter( <span class="argument">$ressources</span>, <span class="argument">$requeteDonnees</span>) : string</pre>
<p><em>Méthode appelée lors d&#039;une requête HTTP de type PUT.</em></p>
<p>L'identifiant de la ressource à ajouter est indiqué via l'url si on le connait par avance. Sinon, il doit être créé par
le service. Dans ce dernier cas, le nouvel identifiant devrait être renvoyé dans le corps de la réponse.
Si l'ajout est un succès, la méthode devra retourner "true" ou l'identifiant.
Le code statut HTTP retourné sera 201 en cas de succès.
Dans le cas contraire, la méthode devra retourner false.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$ressources</td>
<td></td>
</tr>
<tr>
<td></td>
<td>$requeteDonnees</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>l'identifiant créé.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimer" name="method_supprimer" class="anchor"></a>
<article class="method">
<h3 class="public ">supprimer()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimer( <span class="argument">$ressources</span>) : mixed</pre>
<p><em>Méthode appelée lors d&#039;une requête HTTP de type DELETE (ou POST avec action=DELETE dans le corps de la requete).</em></p>
<p>Si la suppression est un succès, la méthode devra retourner "true" et le code statut HTTP retourné par
RestServeur sera 204.
Si la ressource à supprimer est introuvable, la méthode devra retourner "false" et le code statut HTTP
retourné par RestServeur sera 404.
Dans les autres cas de figure ou si vous souhaitez gérer vos propres codes de retour erreur, retourner
la valeur null ou rien.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$ressources</td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
mixed
&mdash; <p>une chaine indiquant le succès de l'opération ou rien.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getBdd" name="method_getBdd" class="anchor"></a>
<article class="method">
<h3 class="protected ">getBdd()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getBdd()</pre>
<p><em>Méthode de connection à la base de données sur demande.</em></p>
<p>Tous les services web n'ont pas besoin de s'y connecter.</p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getRestClient" name="method_getRestClient" class="anchor"></a>
<article class="method">
<h3 class="protected ">getRestClient()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getRestClient()</pre>
<p><em>Méthode permettant de faire appel à un client REST en fonction des besoins du service.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_ajouterMessage" name="method_ajouterMessage" class="anchor"></a>
<article class="method">
<h3 class="protected ">ajouterMessage()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">ajouterMessage(string <span class="argument">$message</span>)</pre>
<p><em>Permet d&#039;ajouter un message d&#039;erreur ou d&#039;avertissement qui sera envoyé au client.</em></p>
<p>Le message doit être au format texte et en UTF-8.</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$message</td>
<td><p>le message à envoyer.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">RestService.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/RestService.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/classes/Url.html
New file
0,0 → 1,1326
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>TBFramework - v0.3</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
 
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
 
var code = document.createElement('code');
code.className = 'language-' + language;
 
pre.textContent = '';
 
code.textContent = 'Loading…';
 
pre.appendChild(code);
 
var xhr = new XMLHttpRequest();
 
xhr.open('GET', src, true);
 
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
 
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
 
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
 
xhr.send(null);
});
}
 
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
 
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
 
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">TBFramework - v0.3</a>
 
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">268</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">11</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
 
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1788291058"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1788291058" class="accordion-body collapse in">
<div class="accordion-inner">
 
<ul>
<li class="class"><a href="../classes/Url.html">Url</a></li>
<li class="class"><a href="../classes/Debug.html">Debug</a></li>
<li class="class"><a href="../classes/Chronometre.html">Chronometre</a></li>
<li class="class"><a href="../classes/RestServeur.html">RestServeur</a></li>
<li class="class"><a href="../classes/SquelettePhp.html">SquelettePhp</a></li>
<li class="class"><a href="../classes/Controleur.html">Controleur</a></li>
<li class="class"><a href="../classes/Cache.html">Cache</a></li>
<li class="class"><a href="../classes/RestClient.html">RestClient</a></li>
<li class="class"><a href="../classes/GestionnaireException.html">GestionnaireException</a></li>
<li class="class"><a href="../classes/Script.html">Script</a></li>
<li class="class"><a href="../classes/Registre.html">Registre</a></li>
<li class="class"><a href="../classes/RestService.html">RestService</a></li>
<li class="class"><a href="../classes/Cli.html">Cli</a></li>
<li class="class"><a href="../classes/Encodage.html">Encodage</a></li>
<li class="class"><a href="../classes/Tableau.html">Tableau</a></li>
<li class="class"><a href="../classes/Pattern.html">Pattern</a></li>
<li class="class"><a href="../classes/Chaine.html">Chaine</a></li>
<li class="class"><a href="../classes/Fichier.html">Fichier</a></li>
<li class="class"><a href="../classes/I18n.html">I18n</a></li>
<li class="class"><a href="../classes/Config.html">Config</a></li>
<li class="class"><a href="../classes/CacheSqlite.html">CacheSqlite</a></li>
<li class="class"><a href="../classes/Bdd.html">Bdd</a></li>
<li class="class"><a href="../classes/Log.html">Log</a></li>
<li class="class"><a href="../classes/CacheFichier.html">CacheFichier</a></li>
<li class="class"><a href="../classes/Framework.html">Framework</a></li>
<li class="class"><a href="../classes/CacheSimple.html">CacheSimple</a></li>
</ul>
</div>
</div>
</div>
</div>
 
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content class">
<nav>
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
 
<h1><small>\</small>Url</h1>
<p><em>Classe Url, gérant le découpage des paramètres, leurs modification etc.</em></p>
<p>..
Traduction et conversion d'une classe (NET_Url2) issue de Pear</p>
 
<section id="summary">
<h2>Summary</h2>
<section class="row-fluid heading">
<section class="span4">
<a href="#methods">Methods</a>
</section>
<section class="span4">
<a href="#properties">Properties</a>
</section>
<section class="span4">
<a href="#constants">Constants</a>
</section>
</section>
<section class="row-fluid public">
<section class="span4">
<a href="../classes/Url.html#method___construct" class="">__construct()</a><br />
<a href="../classes/Url.html#method_getOption" class="">getOption()</a><br />
<a href="../classes/Url.html#method_setOption" class="">setOption()</a><br />
<a href="../classes/Url.html#method_setRequete" class="">setRequete()</a><br />
<a href="../classes/Url.html#method_fusionnerRequete" class="">fusionnerRequete()</a><br />
<a href="../classes/Url.html#method_normaliser" class="">normaliser()</a><br />
<a href="../classes/Url.html#method_getCanonique" class="">getCanonique()</a><br />
<a href="../classes/Url.html#method_getDemande" class="">getDemande()</a><br />
<a href="../classes/Url.html#method_getURL" class="">getURL()</a><br />
</section>
<section class="span4">
<em>No public properties found</em>
</section>
<section class="span4">
<a href="../classes/Url.html#constant_OPTION_UTILISER_CROCHETS" class="">OPTION_UTILISER_CROCHETS</a><br />
<a href="../classes/Url.html#constant_OPTION_ENCODER_CLES" class="">OPTION_ENCODER_CLES</a><br />
<a href="../classes/Url.html#constant_OPTION_ENCODER_VALEURS" class="">OPTION_ENCODER_VALEURS</a><br />
<a href="../classes/Url.html#constant_OPTION_SEPARATEUR_ENTREE" class="">OPTION_SEPARATEUR_ENTREE</a><br />
<a href="../classes/Url.html#constant_OPTION_SEPARATEUR_SORTIE" class="">OPTION_SEPARATEUR_SORTIE</a><br />
</section>
</section>
<section class="row-fluid protected">
<section class="span4">
<em>No protected methods found</em>
</section>
<section class="span4">
<em>No protected properties found</em>
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
<section class="row-fluid private">
<section class="span4">
<a href="../classes/Url.html#method_getAutorite" class="">getAutorite()</a><br />
<a href="../classes/Url.html#method_setAutorite" class="">setAutorite()</a><br />
<a href="../classes/Url.html#method_etreAbsolue" class="">etreAbsolue()</a><br />
<a href="../classes/Url.html#method_supprimerSegmentsAPoints" class="">supprimerSegmentsAPoints()</a><br />
</section>
<section class="span4">
<a href="../classes/Url.html#property_options" class="">$options</a><br />
<a href="../classes/Url.html#property_schema" class="">$schema</a><br />
<a href="../classes/Url.html#property_infoUtilisateur" class="">$infoUtilisateur</a><br />
<a href="../classes/Url.html#property_hote" class="">$hote</a><br />
<a href="../classes/Url.html#property_port" class="">$port</a><br />
<a href="../classes/Url.html#property_chemin" class="">$chemin</a><br />
<a href="../classes/Url.html#property_requete" class="">$requete</a><br />
<a href="../classes/Url.html#property_fragment" class="">$fragment</a><br />
<a href="../classes/Url.html#property_parametres_obligatoires" class="">$parametres_obligatoires</a><br />
</section>
<section class="span4">
<em>N/A</em>
</section>
</section>
</section>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>File</dt>
<dd><a href="../files/Url.php.html"><div class="path-wrapper">Url.php</div></a></dd>
<dt>Package</dt>
<dd><div class="namespace-wrapper">\Framework</div></dd>
<dt>Class hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\Url</div>
</dd>
 
<dt>See also</dt>
<dd><a href="/doc/framework/"><div class="namespace-wrapper">/doc/framework/</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
category
</th>
<td>
<p>Php 5.2</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Christian SCHMIDT <a href="mailto:schmidt@php.net">schmidt@php.net</a> (Auteur classe originale)</p>
<p>Aurélien PERONNET <a href="mailto:aurelien@tela-botanica.org">aurelien@tela-botanica.org</a></p>
<p>Jean-Pascal MILCENT <a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a></p>
</td>
</tr>
<tr>
<th>
copyright
</th>
<td>
<p>Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</p>
</td>
</tr>
<tr>
<th>
license
</th>
<td>
<p><a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt</a> Licence CECILL</p>
<p><a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> Licence GNU-GPL</p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="constants" name="constants"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Constants</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_OPTION_UTILISER_CROCHETS" name="constant_OPTION_UTILISER_CROCHETS" class="anchor"></a>
<article id="constant_OPTION_UTILISER_CROCHETS" class="constant">
<h3 class="">OPTION_UTILISER_CROCHETS</h3>
<pre class="signature">OPTION_UTILISER_CROCHETS</pre>
<p><em>Répresenter les tableaux dans les requêtes en utilisant la notation php []. Par défaut à true.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_OPTION_ENCODER_CLES" name="constant_OPTION_ENCODER_CLES" class="anchor"></a>
<article id="constant_OPTION_ENCODER_CLES" class="constant">
<h3 class="">OPTION_ENCODER_CLES</h3>
<pre class="signature">OPTION_ENCODER_CLES</pre>
<p><em>URL-encoder les clés des variables dans les requêtes. Par défaut à true.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_OPTION_ENCODER_VALEURS" name="constant_OPTION_ENCODER_VALEURS" class="anchor"></a>
<article id="constant_OPTION_ENCODER_VALEURS" class="constant">
<h3 class="">OPTION_ENCODER_VALEURS</h3>
<pre class="signature">OPTION_ENCODER_VALEURS</pre>
<p><em>URL-encoder les valeurs des variables dans les requêtes. Par défaut à false.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_OPTION_SEPARATEUR_ENTREE" name="constant_OPTION_SEPARATEUR_ENTREE" class="anchor"></a>
<article id="constant_OPTION_SEPARATEUR_ENTREE" class="constant">
<h3 class="">OPTION_SEPARATEUR_ENTREE</h3>
<pre class="signature">OPTION_SEPARATEUR_ENTREE</pre>
<p><em>Séparateurs de variables lors du parsing de la requête. Chaque caractère
est considéré comme un séparateur. Par défaut, spécifié par le paramêtre
arg_separator.input dans php.ini (par défaut &quot;&amp;&quot;).</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="constant_OPTION_SEPARATEUR_SORTIE" name="constant_OPTION_SEPARATEUR_SORTIE" class="anchor"></a>
<article id="constant_OPTION_SEPARATEUR_SORTIE" class="constant">
<h3 class="">OPTION_SEPARATEUR_SORTIE</h3>
<pre class="signature">OPTION_SEPARATEUR_SORTIE</pre>
<p><em>Séparateur de variables lors de la génération de la requête. Par défaut, spécifié
par le paramètre arg_separator.output dans php.ini (par défaut &quot;&amp;&quot;).</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="properties" name="properties"></a>
<div class="row-fluid">
<div class="span8 content class">
<h2>Properties</h2>
</div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_options" name="property_options" class="anchor"></a>
<article class="property">
<h3 class="private ">$options</h3>
<pre class="signature">$options</pre>
<p><em>Options par défaut correspondant au comportement de php
vis à vis de $_GET</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_schema" name="property_schema" class="anchor"></a>
<article class="property">
<h3 class="private ">$schema</h3>
<pre class="signature">$schema : string|bool</pre>
<p><em></em></p>
 
<h4>Type</h4>
string|bool
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_infoUtilisateur" name="property_infoUtilisateur" class="anchor"></a>
<article class="property">
<h3 class="private ">$infoUtilisateur</h3>
<pre class="signature">$infoUtilisateur : string|bool</pre>
<p><em></em></p>
 
<h4>Type</h4>
string|bool
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_hote" name="property_hote" class="anchor"></a>
<article class="property">
<h3 class="private ">$hote</h3>
<pre class="signature">$hote : string|bool</pre>
<p><em></em></p>
 
<h4>Type</h4>
string|bool
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_port" name="property_port" class="anchor"></a>
<article class="property">
<h3 class="private ">$port</h3>
<pre class="signature">$port : int|bool</pre>
<p><em></em></p>
 
<h4>Type</h4>
int|bool
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_chemin" name="property_chemin" class="anchor"></a>
<article class="property">
<h3 class="private ">$chemin</h3>
<pre class="signature">$chemin : string</pre>
<p><em></em></p>
 
<h4>Type</h4>
string
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_requete" name="property_requete" class="anchor"></a>
<article class="property">
<h3 class="private ">$requete</h3>
<pre class="signature">$requete : string|bool</pre>
<p><em></em></p>
 
<h4>Type</h4>
string|bool
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_fragment" name="property_fragment" class="anchor"></a>
<article class="property">
<h3 class="private ">$fragment</h3>
<pre class="signature">$fragment : string|bool</pre>
<p><em></em></p>
 
<h4>Type</h4>
string|bool
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="property_parametres_obligatoires" name="property_parametres_obligatoires" class="anchor"></a>
<article class="property">
<h3 class="private ">$parametres_obligatoires</h3>
<pre class="signature">$parametres_obligatoires</pre>
<p><em>Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<a id="methods" name="methods"></a>
<div class="row-fluid">
<div class="span8 content class"><h2>Methods</h2></div>
<aside class="span4 detailsbar"></aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method___construct" name="method___construct" class="anchor"></a>
<article class="method">
<h3 class="public ">__construct()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">__construct(string <span class="argument">$url</span>, array <span class="argument">$options</span>)</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$url</td>
<td><p>une URL relative ou absolue</p></td>
</tr>
<tr>
<td>array</td>
<td>$options</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getOption" name="method_getOption" class="anchor"></a>
<article class="method">
<h3 class="public ">getOption()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getOption(string <span class="argument">$nomOption</span>) : mixed</pre>
<p><em>Renvoie la valeur de l&#039;option specifiée.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$nomOption</td>
<td><p>Nom de l'option demandée</p></td>
</tr>
</table>
<h4>Returns</h4>
mixed
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setOption" name="method_setOption" class="anchor"></a>
<article class="method">
<h3 class="public ">setOption()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setOption(string <span class="argument">$nomOption</span>, mixed <span class="argument">$valeur</span>) : void</pre>
<p><em>Met à jour la valeur de l&#039;option spécifiée.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$nomOption</td>
<td><p>une des constantes commençant par self::OPTION_</p></td>
</tr>
<tr>
<td>mixed</td>
<td>$valeur</td>
<td><p>valeur de l'option</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>See also</dt>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
<dd><a href=""><span class="namespace-wrapper"></span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setRequete" name="method_setRequete" class="anchor"></a>
<article class="method">
<h3 class="public ">setRequete()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setRequete(array <span class="argument">$parametres</span>) : void</pre>
<p><em>(Re-)Création de la partie requête de l&#039;URL à partir des données du tableau (passé en paramètre).</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$parametres</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_fusionnerRequete" name="method_fusionnerRequete" class="anchor"></a>
<article class="method">
<h3 class="public ">fusionnerRequete()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">fusionnerRequete(array <span class="argument">$parametres</span>) : void</pre>
<p><em>(Re-)Création de la partie requête de l&#039;URL à partir de la fusion du tableau (passé en paramètre) et
les valeurs présentes dans $_GET.</em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$parametres</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_normaliser" name="method_normaliser" class="anchor"></a>
<article class="method">
<h3 class="public ">normaliser()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">normaliser() : void</pre>
<p><em>Normalise les données de l&#039;instance d&#039;Url faisant appel à cette méthode.</em></p>
 
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getCanonique" name="method_getCanonique" class="anchor"></a>
<article class="method">
<h3 class="public ">getCanonique()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getCanonique() : \Url</pre>
<p><em>Renvoie une instance d&#039;objet Url representant l&#039;URL canonique du script PHP en cours d&#039;éxécution.</em></p>
 
<h4>Returns</h4>
<a href="../classes/Url.html">\Url</a>
&mdash; <p>retourne un objet Url ou null en cas d'erreur.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getDemande" name="method_getDemande" class="anchor"></a>
<article class="method">
<h3 class="public ">getDemande()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getDemande() : \Url</pre>
<p><em>Renvoie une instance d&#039;objet Url representant l&#039;URL utilisée pour récupérer la requête en cours.</em></p>
 
<h4>Returns</h4>
<a href="../classes/Url.html">\Url</a>
&mdash; <p>retourne un objet Url ou null en cas d'erreur.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getURL" name="method_getURL" class="anchor"></a>
<article class="method">
<h3 class="public ">getURL()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getURL() : string</pre>
<p><em>Renvoie un représentation sous forme de chaine de l&#039;URL.</em></p>
 
<h4>Returns</h4>
string
&mdash; <p>l'url</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getAutorite" name="method_getAutorite" class="anchor"></a>
<article class="method">
<h3 class="private ">getAutorite()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getAutorite() : string|bool</pre>
<p><em>Renvoie la partie autorité, i.e. [ infoUtilisateur &quot;@&quot; ] hote [ &quot;:&quot; port ], ou
false si celle-ci est absente.</em></p>
 
<h4>Returns</h4>
string|bool
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_setAutorite" name="method_setAutorite" class="anchor"></a>
<article class="method">
<h3 class="private ">setAutorite()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">setAutorite(string|false <span class="argument">$autorite</span>) : void</pre>
<p><em></em></p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string|false</td>
<td>$autorite</td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_etreAbsolue" name="method_etreAbsolue" class="anchor"></a>
<article class="method">
<h3 class="private ">etreAbsolue()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">etreAbsolue() : bool</pre>
<p><em>Renvoie vrai ou faux suivant que l&#039;instance en cours représente une URL relative ou absolue.</em></p>
 
<h4>Returns</h4>
bool
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
<div class="row-fluid">
<div class="span8 content class">
<a id="method_supprimerSegmentsAPoints" name="method_supprimerSegmentsAPoints" class="anchor"></a>
<article class="method">
<h3 class="private ">supprimerSegmentsAPoints()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">supprimerSegmentsAPoints(string <span class="argument">$chemin</span>) : string</pre>
<p><em>La suppression des segments à points est décrite dans la RFC 3986, section 5.2.4, e.g.</em></p>
<p>"/foo/../bar/baz" => "/bar/baz"</p>
 
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$chemin</td>
<td><p>un chemin</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>un chemin</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
todo
</th>
<td>
</td>
</tr>
</table>
</aside>
</div>
 
</div>
</section>
 
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">Url.php</h3>
</div>
<div class="modal-body">
<pre data-src="../files/Url.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
 
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on March 12th, 2014 at 16:53.
</section>
</section>
</section>
</footer>
</div>
 
</body>
</html>
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-40/phpdoc-cache-file_46a24be180db055ceb422ee74a0e638f.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-40/phpdoc-cache-file_46a24be180db055ceb422ee74a0e638f.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-25/phpdoc-cache-file_3ddac208e0d32b1cede22ae66c3fe09e.dat
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v0.3-aleaume/doc/PhpDoc/phpdoc-cache-25/phpdoc-cache-file_3ddac208e0d32b1cede22ae66c3fe09e.dat
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/branches/v0.3-aleaume/doc/index.php
18,12 → 18,12
<a href="/" title="Retour à l'accueil du site">
<img src="http://www.tela-botanica.org/sites/accueil/generique/images/graphisme/logo_tela_fond_blanc.png" alt="Le logo de Tela Botanica"/>
</a>
</div>
</div>
<h1>Documentations du Framework de Tela Botanica</h1>
<p>La documentation est disponible sous plusieurs formats :</p>
<ul>
<li><a href="HTMLframesConverter/index.html">Format HTML avec frames</a></li>
<li><a href="HTMLSmartyConverter/index.html">Format HTML sans frames</a></li>
<li><a href="ApiGen/index.html">ApiGen (HTML)</a></li>
<li><a href="PhpDoc/index.html">PhpDoc (HTML)</a></li>
</ul>
</body>
</html>
</html>
/branches/v0.3-aleaume/doc/genererPhpDoc.sh
New file
0,0 → 1,48
#!/bin/bash
########################################################################################################################
# But : création de la PhpDoc du Framework.
# Auteur : Jean-Pascal Milcent <jpm@tela-botanica.org>
# License : GPL v3
# Création : 12 mars 2014
# Version: 2
# Exemple : ./genererPhpDoc.sh -t "Mon Titre"
########################################################################################################################
# Constante
TITRE=""
SOURCE="./../framework"
CIBLE="./PhpDoc"
IGNORER=".htaccess,config.ini"
FORMAT="clean"
 
# Aide
E_OPTERR=65
if [ "$1" = '--help' ]
then # Le script a besoin d'au moins un argument sur la ligne de commande
echo "Usage $0 -[parameters -t ]"
echo "Paramétres : "
echo " -t: indiquer le titre de la doc"
exit $E_OPTERR
fi
 
# Récupération des paramètres et des options de la ligne de commande
TEMP=`getopt -o t: -l help: -- "$@"`
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
eval set -- "$TEMP"
while [ ! -z "$1" ] ; do
#echo $1" # "$2
case "$1" in
-t) TITRE=$2;;
--) shift ; break ;;
*) echo "Internal error!" ; exit 1 ;;
esac
shift 2
done
 
# Suppression des dossiers précédent de la doc
if [ -d PhpDoc ]; then
rm -fR PhpDoc
mkdir PhpDoc
fi;
 
echo "Génération de la documentation :";
/opt/lampp/bin/php /opt/lampp/bin/phpdoc -d "$SOURCE" -t "$CIBLE" -i "$IGNORER" --template="$FORMAT" --title="$TITRE"
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:eol-style
+native
\ No newline at end of property
/branches/v0.3-aleaume/doc/ApiGen/class-Controleur.html
New file
0,0 → 1,435
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Controleur | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li class="active"><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Controleur</h1>
 
 
<div class="description">
<p>Classe Controleur, coeur d'une application, c'est normalement la seule classe
d'une application qui devrait être appelée de l'extérieur. Elle est abstraite
donc doit obligatoirement être étendue.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Abstract</b><br>
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
php 5.2<br>
<b>Copyright:</b>
Copyright (c) 2009, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
<b>Author:</b>
Aurélien PERONNET &lt;<a
href="mailto:aurelien&#64;tela-botanica.org">aurelien&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Controleur.php 332 2011-03-22 16:54:23Z delphine $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Controleur.html#3-121" title="Go to source code">Controleur.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-Controleur.html#38-47" title="Go to source code">__construct</a>( )</code>
 
<div class="description short">
<p>Constructeur par défaut</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constructeur par défaut</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="chargerModele" id="_chargerModele">
 
<td class="attributes"><code>
final public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_chargerModele">#</a>
<code><a href="source-class-Controleur.html#49-67" title="Go to source code">chargerModele</a>( <span>string <var>$nom_modele</var></span> )</code>
 
<div class="description short">
<p>Charge un modele donné et le rend disponible sous la forme
$this-&gt;nom_modele</p>
 
</div>
 
<div class="description detailed hidden">
<p>Charge un modele donné et le rend disponible sous la forme
$this-&gt;nom_modele</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$nom_modele</var></dt>
<dd><code>string</code><br>$nom_modele le nom du modèle à  charger</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>false si le chargement a échoué, sinon true.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getModele" id="_getModele">
 
<td class="attributes"><code>
final protected
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getModele">#</a>
<code><a href="source-class-Controleur.html#69-88" title="Go to source code">getModele</a>( <span>string <var>$nom_modele</var></span>, <span>String <var>$ext</var> = <span class="php-quote">'.php'</span></span> )</code>
 
<div class="description short">
<p>Retourne un modele donné</p>
 
</div>
 
<div class="description detailed hidden">
<p>Retourne un modele donné</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$nom_modele</var></dt>
<dd><code>string</code><br>$nom_modele le nom du fichier modèle à charger sans son extension</dd>
<dt><var>$ext</var></dt>
<dd><code>String</code><br>$ext l'extension du fichier du modèel (par défaut : ".php"</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>false si le chargement a échoué, sinon l'objet du modèle demandé.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getVue" id="_getVue">
 
<td class="attributes"><code>
final protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getVue">#</a>
<code><a href="source-class-Controleur.html#90-107" title="Go to source code">getVue</a>( <span>String <var>$nom_squelette</var></span>, <span>Array <var>&amp; $donnees</var> = <span class="php-keyword1">array</span>()</span>, <span>String <var>$ext</var> = <span class="php-quote">'.tpl.html'</span></span> )</code>
 
<div class="description short">
<p>Fonction prenant en paramètre le nom d'un squelette et un tableau associatif
de données, en extrait les variables, charge le squelette et retourne le
résultat des deux combinés.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Fonction prenant en paramètre le nom d'un squelette et un tableau associatif
de données, en extrait les variables, charge le squelette et retourne le
résultat des deux combinés.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$nom_squelette</var></dt>
<dd><code>String</code><br>$nom_squelette le nom du squelette sans son extension</dd>
<dt><var>$donnees</var></dt>
<dd><code>Array</code><br>$donnees un tableau associatif contenant les variables a injecter dans la vue</dd>
<dt><var>$ext</var></dt>
<dd><code>String</code><br>$ext l'extension du fichier du squelette (par défaut : ".tpl.html"</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>false si la vue n'existe pas, sinon la chaine résultat.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="preTraiterDonnees" id="_preTraiterDonnees">
 
<td class="attributes"><code>
protected
Array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_preTraiterDonnees">#</a>
<code><a href="source-class-Controleur.html#109-120" title="Go to source code">preTraiterDonnees</a>( <span>Array <var>&amp; $donnees</var></span> )</code>
 
<div class="description short">
<p>Fonction prenant en paramètre un tableau de données et effectuant un
traitement dessus. Cette fonction est à surcharger dans les classes filles pour
automatiser un traitement avant chaque chargement de vue.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Fonction prenant en paramètre un tableau de données et effectuant un
traitement dessus. Cette fonction est à surcharger dans les classes filles pour
automatiser un traitement avant chaque chargement de vue.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$donnees</var></dt>
<dd><code>Array</code><br>$donnees Le tableau de données à traiter</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>Array</code><br>$donnees Le tableau de données traité<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="parametres_obligatoires" id="$parametres_obligatoires">
<td class="attributes"><code>
protected
array
</code></td>
 
<td class="name">
<a href="source-class-Controleur.html#35-36" title="Go to source code"><var>$parametres_obligatoires</var></a>
</td>
<td class="value"><code><span class="php-keyword1">array</span>(<span class="php-quote">'chemin_modeles'</span>, <span class="php-quote">'chemin_squelettes'</span>, <span class="php-quote">'chemin_controleurs'</span>, <span class="php-quote">'base_url_application'</span>)</code></td>
<td class="description"><div>
<a href="#$parametres_obligatoires" class="anchor">#</a>
 
<div class="description short">
<p>Tableau des noms des paramètres à définir dans le fichier de config car
obligatoirement nécessaire à cette classe.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Tableau des noms des paramètres à définir dans le fichier de config car
obligatoirement nécessaire à cette classe.</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-RestService.html
New file
0,0 → 1,267
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File RestService.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li class="active"><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-RestService.html" title="Summary of RestService"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">/**
</span></span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment"> * Classe principale gérant les services.
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Paramètres liés dans config.ini :
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * - serveur.baseURL
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> *
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * Encodage en entrée : utf8
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * Encodage en sortie : utf8
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> *
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @category Php 5.2
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @package Framework
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @license GPL v3 &lt;http://www.gnu.org/licenses/gpl.txt&gt;
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @license CECILL v2 &lt;http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt&gt;
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * @since 0.3
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> * @version $Id: RestService.php 382 2011-10-14 10:36:41Z jpm $
</span></span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-comment"> */</span>
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a><span class="php-keyword1">abstract</span> <span class="php-keyword1">class</span> <a id="RestService" href="#RestService">RestService</a> {
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a>
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a> <span class="php-comment">/** Objet de connection à la base de données.
</span></span><span id="23" class="l"><a class="l" href="#23"> 23: </a><span class="php-comment"> * @deprecated Utiliser la methode getBdd().
</span></span><span id="24" class="l"><a class="l" href="#24"> 24: </a><span class="php-comment"> * @see getBdd()
</span></span><span id="25" class="l"><a class="l" href="#25"> 25: </a><span class="php-comment"> */</span>
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$bdd" href="#$bdd">$bdd</a></span> = <span class="php-keyword1">null</span>;
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a>
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-comment">/** Objet Rest Client. */</span>
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$RestClient" href="#$RestClient">$RestClient</a></span> = <span class="php-keyword1">null</span>;
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a>
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> <span class="php-comment">/** Indique si oui (true) ou non (false), on veut utiliser les paramètres brutes. */</span>
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$utilisationParametresBruts" href="#$utilisationParametresBruts">$utilisationParametresBruts</a></span> = <span class="php-keyword1">false</span>;
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a>
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>(<span class="php-var">$config</span>) {
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-var">$this</span>-&gt;config = <span class="php-var">$config</span>;
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a> <span class="php-var">$this</span>-&gt;bdd = <span class="php-keyword1">new</span> Bdd();
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> }
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a>
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_initialiser" href="#_initialiser">initialiser</a>() {
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a>
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a> }
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a>
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a> <span class="php-comment">/**
</span></span><span id="44" class="l"><a class="l" href="#44"> 44: </a><span class="php-comment"> * Méthode de connection à la base de données sur demande.
</span></span><span id="45" class="l"><a class="l" href="#45"> 45: </a><span class="php-comment"> * Tous les services web n'ont pas besoin de s'y connecter.
</span></span><span id="46" class="l"><a class="l" href="#46"> 46: </a><span class="php-comment"> */</span>
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getBdd" href="#_getBdd">getBdd</a>() {
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-keyword1">if</span> (! <span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;bdd)) {
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-var">$this</span>-&gt;bdd = <span class="php-keyword1">new</span> Bdd();
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> }
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;bdd;
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> }
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a>
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> <span class="php-comment">/**
</span></span><span id="55" class="l"><a class="l" href="#55"> 55: </a><span class="php-comment"> * Méthode permettant de faire appel à un client REST en fonction des besoins du service.
</span></span><span id="56" class="l"><a class="l" href="#56"> 56: </a><span class="php-comment"> */</span>
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getRestClient" href="#_getRestClient">getRestClient</a>() {
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> <span class="php-keyword1">if</span> (! <span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;RestClient)) {
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-var">$this</span>-&gt;RestClient = <span class="php-keyword1">new</span> RestClient();
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> }
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;RestClient;
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> }
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a>
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-comment">/**
</span></span><span id="65" class="l"><a class="l" href="#65"> 65: </a><span class="php-comment"> * Méthode permettant de savoir si le service veut utiliser des paramètres bruts (issu de la QueryString)
</span></span><span id="66" class="l"><a class="l" href="#66"> 66: </a><span class="php-comment"> * ou pas (issu de $_GET).
</span></span><span id="67" class="l"><a class="l" href="#67"> 67: </a><span class="php-comment"> */</span>
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_utiliserParametresBruts" href="#_utiliserParametresBruts">utiliserParametresBruts</a>() {
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;utilisationParametresBruts;
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a> }
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a>
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a> <span class="php-comment">/**
</span></span><span id="73" class="l"><a class="l" href="#73"> 73: </a><span class="php-comment"> * Permet d'ajouter un message d'erreur ou d'avertissement qui sera envoyé au client.
</span></span><span id="74" class="l"><a class="l" href="#74"> 74: </a><span class="php-comment"> * Le message doit être au format texte et en UTF-8.
</span></span><span id="75" class="l"><a class="l" href="#75"> 75: </a><span class="php-comment"> * @param string $message le message à envoyer.
</span></span><span id="76" class="l"><a class="l" href="#76"> 76: </a><span class="php-comment"> */</span>
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_ajouterMessage" href="#_ajouterMessage">ajouterMessage</a>(<span class="php-var">$message</span>) {
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> RestServeur::ajouterMessage(<span class="php-var">$message</span>);
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> }
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a>
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a> <span class="php-comment">/**
</span></span><span id="82" class="l"><a class="l" href="#82"> 82: </a><span class="php-comment"> * Méthode appelée lors d'une requête HTTP de type GET.
</span></span><span id="83" class="l"><a class="l" href="#83"> 83: </a><span class="php-comment"> *
</span></span><span id="84" class="l"><a class="l" href="#84"> 84: </a><span class="php-comment"> * Si la consultation est un succès, le code statut HTTP retourné sera 200. Dans tous les autres cas,
</span></span><span id="85" class="l"><a class="l" href="#85"> 85: </a><span class="php-comment"> * la méthode devra retourner le code statut HTTP adéquate.
</span></span><span id="86" class="l"><a class="l" href="#86"> 86: </a><span class="php-comment"> *
</span></span><span id="87" class="l"><a class="l" href="#87"> 87: </a><span class="php-comment"> * @param array Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.
</span></span><span id="88" class="l"><a class="l" href="#88"> 88: </a><span class="php-comment"> * @param array Partie de l'url situé après le '?' servant à paramétrer le service demandé.
</span></span><span id="89" class="l"><a class="l" href="#89"> 89: </a><span class="php-comment"> * @return string une chaine indiquant le succès de l'opération et les données demandées.
</span></span><span id="90" class="l"><a class="l" href="#90"> 90: </a><span class="php-comment"> */</span>
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_consulter" href="#_consulter">consulter</a>(<span class="php-var">$ressources</span>, <span class="php-var">$parametres</span>) {
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> RestServeur::envoyerEnteteStatutHttp(RestServeur::HTTP_CODE_METHODE_NON_AUTORISE);
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> RestServeur::ajouterMessage(<span class="php-quote">&quot;Le service '&quot;</span>.<span class="php-keyword2">get_class</span>(<span class="php-var">$this</span>).<span class="php-quote">&quot;' n'autorise pas la consultation.&quot;</span>);
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> }
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a>
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> <span class="php-comment">/**
</span></span><span id="97" class="l"><a class="l" href="#97"> 97: </a><span class="php-comment"> * Méthode appelée lors d'une requête HTTP de type POST.
</span></span><span id="98" class="l"><a class="l" href="#98"> 98: </a><span class="php-comment"> *
</span></span><span id="99" class="l"><a class="l" href="#99"> 99: </a><span class="php-comment"> * La ressource à modifier est indiquée via l'url. Les données devant servir à la mise à jours sont passées dans le corps
</span></span><span id="100" class="l"><a class="l" href="#100">100: </a><span class="php-comment"> * de la requête.
</span></span><span id="101" class="l"><a class="l" href="#101">101: </a><span class="php-comment"> * Si la modification est un succès, la méthode devra retourner &quot;true&quot; et le code statut HTTP retourné sera 201.
</span></span><span id="102" class="l"><a class="l" href="#102">102: </a><span class="php-comment"> *
</span></span><span id="103" class="l"><a class="l" href="#103">103: </a><span class="php-comment"> * @param array Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.
</span></span><span id="104" class="l"><a class="l" href="#104">104: </a><span class="php-comment"> * @param array les données transférées dans le corps de la requête devant servir à la modification.
</span></span><span id="105" class="l"><a class="l" href="#105">105: </a><span class="php-comment"> * @return mixed une chaine indiquant le succès de l'opération ou rien.
</span></span><span id="106" class="l"><a class="l" href="#106">106: </a><span class="php-comment"> */</span>
</span><span id="107" class="l"><a class="l" href="#107">107: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_modifier" href="#_modifier">modifier</a>(<span class="php-var">$ressources</span>, <span class="php-var">$requeteDonnees</span>) {
</span><span id="108" class="l"><a class="l" href="#108">108: </a> RestServeur::envoyerEnteteStatutHttp(RestServeur::HTTP_CODE_METHODE_NON_AUTORISE);
</span><span id="109" class="l"><a class="l" href="#109">109: </a> RestServeur::ajouterMessage(<span class="php-quote">&quot;Le service '&quot;</span>.<span class="php-keyword2">get_class</span>(<span class="php-var">$this</span>).<span class="php-quote">&quot;' n'autorise pas la modification.&quot;</span>);
</span><span id="110" class="l"><a class="l" href="#110">110: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="111" class="l"><a class="l" href="#111">111: </a> }
</span><span id="112" class="l"><a class="l" href="#112">112: </a>
</span><span id="113" class="l"><a class="l" href="#113">113: </a> <span class="php-comment">/**
</span></span><span id="114" class="l"><a class="l" href="#114">114: </a><span class="php-comment"> * Méthode appelée lors d'une requête HTTP de type PUT.
</span></span><span id="115" class="l"><a class="l" href="#115">115: </a><span class="php-comment"> *
</span></span><span id="116" class="l"><a class="l" href="#116">116: </a><span class="php-comment"> * L'identifiant de la ressource à ajouter est indiqué via l'url si on le connait par avance. Sinon, il doit être créé par
</span></span><span id="117" class="l"><a class="l" href="#117">117: </a><span class="php-comment"> * le service. Dans ce dernier cas, le nouvel identifiant devrait être renvoyé dans le corps de la réponse.
</span></span><span id="118" class="l"><a class="l" href="#118">118: </a><span class="php-comment"> * Si l'ajout est un succès, la méthode devra retourner &quot;true&quot; ou l'identifiant.
</span></span><span id="119" class="l"><a class="l" href="#119">119: </a><span class="php-comment"> * Le code statut HTTP retourné sera 201 en cas de succès.
</span></span><span id="120" class="l"><a class="l" href="#120">120: </a><span class="php-comment"> * Dans le cas contraire, la méthode devra retourner false.
</span></span><span id="121" class="l"><a class="l" href="#121">121: </a><span class="php-comment"> *
</span></span><span id="122" class="l"><a class="l" href="#122">122: </a><span class="php-comment"> * @param array Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.
</span></span><span id="123" class="l"><a class="l" href="#123">123: </a><span class="php-comment"> * @param array les données transférées dans le corps de la requête devant servir à l'ajout.
</span></span><span id="124" class="l"><a class="l" href="#124">124: </a><span class="php-comment"> * @return string l'identifiant créé.
</span></span><span id="125" class="l"><a class="l" href="#125">125: </a><span class="php-comment"> */</span>
</span><span id="126" class="l"><a class="l" href="#126">126: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_ajouter" href="#_ajouter">ajouter</a>(<span class="php-var">$ressources</span>, <span class="php-var">$requeteDonnees</span>) {
</span><span id="127" class="l"><a class="l" href="#127">127: </a> RestServeur::envoyerEnteteStatutHttp(RestServeur::HTTP_CODE_METHODE_NON_AUTORISE);
</span><span id="128" class="l"><a class="l" href="#128">128: </a> RestServeur::ajouterMessage(<span class="php-quote">&quot;Le service '&quot;</span>.<span class="php-keyword2">get_class</span>(<span class="php-var">$this</span>).<span class="php-quote">&quot;' n'autorise pas la création.&quot;</span>);
</span><span id="129" class="l"><a class="l" href="#129">129: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="130" class="l"><a class="l" href="#130">130: </a> }
</span><span id="131" class="l"><a class="l" href="#131">131: </a>
</span><span id="132" class="l"><a class="l" href="#132">132: </a> <span class="php-comment">/**
</span></span><span id="133" class="l"><a class="l" href="#133">133: </a><span class="php-comment"> * Méthode appelée lors d'une requête HTTP de type DELETE (ou POST avec action=DELETE dans le corps de la requete).
</span></span><span id="134" class="l"><a class="l" href="#134">134: </a><span class="php-comment"> *
</span></span><span id="135" class="l"><a class="l" href="#135">135: </a><span class="php-comment"> * Si la suppression est un succès, la méthode devra retourner &quot;true&quot; et le code statut HTTP retourné par
</span></span><span id="136" class="l"><a class="l" href="#136">136: </a><span class="php-comment"> * RestServeur sera 204.
</span></span><span id="137" class="l"><a class="l" href="#137">137: </a><span class="php-comment"> * Si la ressource à supprimer est introuvable, la méthode devra retourner &quot;false&quot; et le code statut HTTP
</span></span><span id="138" class="l"><a class="l" href="#138">138: </a><span class="php-comment"> * retourné par RestServeur sera 404.
</span></span><span id="139" class="l"><a class="l" href="#139">139: </a><span class="php-comment"> * Dans les autres cas de figure ou si vous souhaitez gérer vos propres codes de retour erreur, retourner
</span></span><span id="140" class="l"><a class="l" href="#140">140: </a><span class="php-comment"> * la valeur null ou rien.
</span></span><span id="141" class="l"><a class="l" href="#141">141: </a><span class="php-comment"> *
</span></span><span id="142" class="l"><a class="l" href="#142">142: </a><span class="php-comment"> * @param array Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.
</span></span><span id="143" class="l"><a class="l" href="#143">143: </a><span class="php-comment"> * @return mixed une chaine indiquant le succès de l'opération ou rien.
</span></span><span id="144" class="l"><a class="l" href="#144">144: </a><span class="php-comment"> */</span>
</span><span id="145" class="l"><a class="l" href="#145">145: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_supprimer" href="#_supprimer">supprimer</a>(<span class="php-var">$ressources</span>) {
</span><span id="146" class="l"><a class="l" href="#146">146: </a> RestServeur::envoyerEnteteStatutHttp(RestServeur::HTTP_CODE_METHODE_NON_AUTORISE);
</span><span id="147" class="l"><a class="l" href="#147">147: </a> RestServeur::ajouterMessage(<span class="php-quote">&quot;Le service '&quot;</span>.<span class="php-keyword2">get_class</span>(<span class="php-var">$this</span>).<span class="php-quote">&quot;' n'autorise pas la suppression.&quot;</span>);
</span><span id="148" class="l"><a class="l" href="#148">148: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">null</span>;
</span><span id="149" class="l"><a class="l" href="#149">149: </a> }
</span><span id="150" class="l"><a class="l" href="#150">150: </a>}
</span><span id="151" class="l"><a class="l" href="#151">151: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/tree.html
New file
0,0 → 1,331
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Tree | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheFichier.html">CacheFichier</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-CacheSqlite.html">CacheSqlite</a></li>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
<h3>Exceptions</h3>
<ul>
<li><a href="class-Exception.html">Exception</a></li>
</ul>
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<span>Package</span> </li>
<li>
<span>Class</span> </li>
</ul>
<ul>
<li class="active">
<span>Tree</span> </li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content">
<h1>Tree</h1>
 
<h3>Classes</h3>
<div class="tree">
<ul>
 
<li><div class="notlast"><a href="class-Bdd.html"><span>Bdd</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Cache.html"><span>Cache</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-CacheFichier.html"><span>CacheFichier</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-CacheSimple.html"><span>CacheSimple</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-CacheSqlite.html"><span>CacheSqlite</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Chaine.html"><span>Chaine</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Chronometre.html"><span>Chronometre</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Cli.html"><span>Cli</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Config.html"><span>Config</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Controleur.html"><span>Controleur</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Debug.html"><span>Debug</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Encodage.html"><span>Encodage</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Fichier.html"><span>Fichier</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Framework.html"><span>Framework</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-GestionnaireException.html"><span>GestionnaireException</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-I18n.html"><span>I18n</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Log.html"><span>Log</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Pattern.html"><span>Pattern</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Registre.html"><span>Registre</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-RestClient.html"><span>RestClient</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-RestServeur.html"><span>RestServeur</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-RestService.html"><span>RestService</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Script.html"><span>Script</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-SquelettePhp.html"><span>SquelettePhp</span></a>
</div>
 
</li>
 
<li><div class="notlast"><a href="class-Tableau.html"><span>Tableau</span></a>
</div>
 
</li>
 
<li class="last"><div class="last"><a href="class-Url.html"><span>Url</span></a>
</div>
 
</li>
</ul>
</div>
 
 
 
<h3>Exceptions</h3>
<div class="tree">
<ul>
 
<li class="last"><div class="last"><a href="class-Exception.html"><span>Exception</span></a>
</div>
 
</li>
</ul>
</div>
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/deprecated.html
New file
0,0 → 1,194
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Deprecated | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheFichier.html">CacheFichier</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-CacheSqlite.html">CacheSqlite</a></li>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
<h3>Exceptions</h3>
<ul>
<li><a href="class-Exception.html">Exception</a></li>
</ul>
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<span>Package</span> </li>
<li>
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li class="active">
<span>Deprecated</span> </li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content">
<h1>Deprecated</h1>
 
 
 
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr>
<td class="name"><a href="class-Bdd.html">Bdd</a></td>
<td class="name"><code><a href="class-Bdd.html#_protegerTableau">protegerTableau()</a></code></td>
<td>
changement de nom. Deviendra "private" dans la version 0.5. Utiliser à la place
: @see proteger
<!-- by Texy2! --><br>
</td>
</tr>
<tr>
<td class="name"><a href="class-Bdd.html">Bdd</a></td>
<td class="name"><code><a href="class-Bdd.html#_requete">requete()</a></code></td>
<td>
changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see
requeter<br>
</td>
</tr>
<tr>
<td class="name"><a href="class-Bdd.html">Bdd</a></td>
<td class="name"><code><a href="class-Bdd.html#_requeteTous">requeteTous()</a></code></td>
<td>
changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see
recupererTous<br>
</td>
</tr>
<tr>
<td class="name"><a href="class-Bdd.html">Bdd</a></td>
<td class="name"><code><a href="class-Bdd.html#_requeteUn">requeteUn()</a></code></td>
<td>
changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see
recuperer<br>
</td>
</tr>
<tr>
<td class="name"><a href="class-GestionnaireException.html">GestionnaireException</a></td>
<td class="name"><code><a href="class-GestionnaireException.html#_getExceptions">getExceptions()</a></code></td>
<td>
</td>
</tr>
<tr>
<td class="name"><a href="class-Tableau.html">Tableau</a></td>
<td class="name"><code><a href="class-Tableau.html#_trierTableauMd">trierTableauMd()</a></code></td>
<td>
Utiliser la méthode trierMD()<br>
</td>
</tr>
</table>
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr>
<td class="name"><a href="class-RestService.html">RestService</a></td>
<td class="name"><a href="class-RestService.html#$bdd"><var>$bdd</var></a></td>
<td>
Utiliser la methode getBdd().<br>
</td>
</tr>
</table>
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Framework.html
New file
0,0 → 1,445
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Framework | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li class="active"><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Framework</h1>
 
 
<div class="description">
<p>Classe de base du Framework : - fournissant des infos sur l'application, -
paramétrant l'environnement de l'appli et du framework, - réalisant des
traitements sur les variables globales ($_GET, $_POST, $_COOKIE...)</p>
 
<p>Cette classe contient la fonction de chargement automatique de classes. Ce
fichier doit toujours rester à la racine du framework car il initialise le
chemin de l'application en se basant sur son propre emplacement.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL-v3</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL-v2</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Framework.php 391 2011-11-09 16:55:53Z jpm $<br>
<b>Since:</b>
0.3<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Framework.html#3-250" title="Go to source code">Framework.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="setCheminAppli" id="_setCheminAppli">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setCheminAppli">#</a>
<code><a href="source-class-Framework.html#141-159" title="Go to source code">setCheminAppli</a>( <span>string <var>$chemin_fichier_principal</var></span> )</code>
 
<div class="description short">
<p>Permet d'indiquer le chemin de base de l'Application. Cette méthode doit
obligatoirement être utilisée par l'application pour que le Framework
fonctionne correctement.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Permet d'indiquer le chemin de base de l'Application. Cette méthode doit
obligatoirement être utilisée par l'application pour que le Framework
fonctionne correctement.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$chemin_fichier_principal</var></dt>
<dd><code>string</code><br>$chemin_fichier_principal chemin de base</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getCheminAppli" id="_getCheminAppli">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getCheminAppli">#</a>
<code><a href="source-class-Framework.html#161-167" title="Go to source code">getCheminAppli</a>( )</code>
 
<div class="description short">
<p>accesseur pour le chemin</p>
 
</div>
 
<div class="description detailed hidden">
<p>accesseur pour le chemin</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>le chemin<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setInfoAppli" id="_setInfoAppli">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setInfoAppli">#</a>
<code><a href="source-class-Framework.html#169-183" title="Go to source code">setInfoAppli</a>( <span>array <var>$info</var></span> )</code>
 
<div class="description short">
<p>Le tableau des informations sur l'application possède les clés suivantes
:</p>
 
<ul>
<li>nom : nom de l'application</li>
 
<li>abr : abréviation de l'application</li>
 
<li>encodage : encodage de l'application (ISO-8859-15, UTF-8...)</li>
</ul>
 
</div>
 
<div class="description detailed hidden">
<p>Le tableau des informations sur l'application possède les clés suivantes
:</p>
 
<ul>
<li>nom : nom de l'application</li>
 
<li>abr : abréviation de l'application</li>
 
<li>encodage : encodage de l'application (ISO-8859-15, UTF-8...)</li>
</ul>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$info</var></dt>
<dd><code>array</code><br>$info tableau fournissant des informations sur l'application</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getInfoAppli" id="_getInfoAppli">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getInfoAppli">#</a>
<code><a href="source-class-Framework.html#185-197" title="Go to source code">getInfoAppli</a>( <span>string <var>$cle</var> = <span class="php-keyword1">null</span></span> )</code>
 
<div class="description short">
<p>Accesseur pour le tableau d'infos sur l'application.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Accesseur pour le tableau d'infos sur l'application.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$cle</var></dt>
<dd><code>string</code><br>$cle la clé à laquelle on veut accéder</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="verifierEtReencoderTableauRequete" id="_verifierEtReencoderTableauRequete">
 
<td class="attributes"><code>
protected static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_verifierEtReencoderTableauRequete">#</a>
<code><a href="source-class-Framework.html#199-212" title="Go to source code">verifierEtReencoderTableauRequete</a>( )</code>
 
<div class="description short">
<p>Procédure vérifiant l'encodage des tableaux $_GET et $_POST et les
transcodant dans l'encodage de l'application</p>
 
</div>
 
<div class="description detailed hidden">
<p>Procédure vérifiant l'encodage des tableaux $_GET et $_POST et les
transcodant dans l'encodage de l'application</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="encoderTableau" id="_encoderTableau">
 
<td class="attributes"><code>
final protected static
Array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_encoderTableau">#</a>
<code><a href="source-class-Framework.html#230-249" title="Go to source code">encoderTableau</a>( <span>mixed <var>$tableau</var></span>, <span>mixed <var>$encodage_sortie</var></span>, <span>mixed <var>$encodage_entree</var> = <span class="php-keyword1">null</span></span> )</code>
 
<div class="description short">
<p>Fonction récursive transcodant toutes les valeurs d'un tableau de leur
encodage d'entrée vers un encodage de sortie donné</p>
 
</div>
 
<div class="description detailed hidden">
<p>Fonction récursive transcodant toutes les valeurs d'un tableau de leur
encodage d'entrée vers un encodage de sortie donné</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tableau</var></dt>
<dd><code>mixed</code><br>$tableau Array Un tableau de données à encoder</dd>
<dt><var>$encodage_sortie</var></dt>
<dd><code>mixed</code><br>$encodage_sortie String l'encodage vers lequel on doit transcoder</dd>
<dt><var>$encodage_entree</var></dt>
<dd><code>mixed</code><br>$encodage_entree String l'encodage original des chaines du tableau (optionnel)</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>Array</code><br>Le tableau encodé dans l'encodage de sortie<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/package-Utilitaire.html
New file
0,0 → 1,136
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Package Utilitaire | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li class="active"><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li class="active">
<span>Package</span> </li>
<li>
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="package">
<h1>Package Utilitaire</h1>
 
 
 
<table class="summary" id="classes">
<caption>Classes summary</caption>
<tr>
<td class="name"><a href="class-Chaine.html">Chaine</a></td>
<td>Classe fournissant des méthodes statiques de manipulation des chaînes de
caractères (String).</td>
</tr>
<tr>
<td class="name"><a href="class-Encodage.html">Encodage</a></td>
<td>Classe fournissant des méthodes statiques concernant l'encodage et le décodage
des caractères de variable.</td>
</tr>
<tr>
<td class="name"><a href="class-Fichier.html">Fichier</a></td>
<td>Classe fournissant des méthodes statiques de manipulation des fichiers.</td>
</tr>
<tr>
<td class="name"><a href="class-Pattern.html">Pattern</a></td>
<td>Classe fournissant des constantes correspondant à des expressions régulières
de vérification très courrantes.</td>
</tr>
<tr>
<td class="name"><a href="class-Tableau.html">Tableau</a></td>
<td>Classe fournissant des méthodes statiques de manipulation des tableaux (Array).</td>
</tr>
</table>
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Cache.html
New file
0,0 → 1,623
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Cache.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li class="active"><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Cache.html" title="Summary of Cache"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe Cache permettant de mettre en cache des données.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * Basée sur les principes de Zend_Cache (Copyright (c) 2005-2010, Zend Technologies USA, Inc. All rights reserved.)
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> *
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * @category php 5.2
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @package Framework
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @license http://framework.zend.com/license/new-bsd Licence New BSD
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @version $Id: Cache.php 299 2011-01-18 14:03:46Z jpm $
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> */</span>
</span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-keyword1">class</span> <a id="Cache" href="#Cache">Cache</a> {
</span><span id="18" class="l"><a class="l" href="#18"> 18: </a> <span class="php-comment">/** Socke les enregistrements du cache dans des fichiers textes de façon extremement simple. */</span>
</span><span id="19" class="l"><a class="l" href="#19"> 19: </a> <span class="php-keyword1">const</span> <a id="STOCKAGE_MODE_SIMPLE" href="#STOCKAGE_MODE_SIMPLE">STOCKAGE_MODE_SIMPLE</a> = <span class="php-quote">&quot;FichierSimple&quot;</span>;
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a> <span class="php-comment">/** Socke les enregistrements du cache dans des fichiers textes. */</span>
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a> <span class="php-keyword1">const</span> <a id="STOCKAGE_MODE_FICHIER" href="#STOCKAGE_MODE_FICHIER">STOCKAGE_MODE_FICHIER</a> = <span class="php-quote">&quot;Fichier&quot;</span>;
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a> <span class="php-comment">/** Socke les enregistrements du cache dans une base de données SQLite. */</span>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> <span class="php-keyword1">const</span> <a id="STOCKAGE_MODE_SQLITE" href="#STOCKAGE_MODE_SQLITE">STOCKAGE_MODE_SQLITE</a> = <span class="php-quote">&quot;Sqlite&quot;</span>;
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a>
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a> <span class="php-comment">/** 'tous' (par défaut) : supprime tous les enregistrements. */</span>
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-keyword1">const</span> <a id="NETTOYAGE_MODE_TOUS" href="#NETTOYAGE_MODE_TOUS">NETTOYAGE_MODE_TOUS</a> = <span class="php-quote">&quot;tous&quot;</span>;
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a> <span class="php-comment">/** 'expiration' : supprime tous les enregistrements dont la date d'expériration est dépassée. */</span>
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-keyword1">const</span> <a id="NETTOYAGE_MODE_EXPIRATION" href="#NETTOYAGE_MODE_EXPIRATION">NETTOYAGE_MODE_EXPIRATION</a> = <span class="php-quote">&quot;expiration&quot;</span>;
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-comment">/** 'avecLesTags' : supprime tous les enregistrements contenant tous les tags indiqués. */</span>
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a> <span class="php-keyword1">const</span> <a id="NETTOYAGE_MODE_AVEC_LES_TAGS" href="#NETTOYAGE_MODE_AVEC_LES_TAGS">NETTOYAGE_MODE_AVEC_LES_TAGS</a> = <span class="php-quote">&quot;avecLesTags&quot;</span>;
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> <span class="php-comment">/** 'sansLesTags' : supprime tous les enregistrements contenant aucun des tags indiqués. */</span>
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-keyword1">const</span> <a id="NETTOYAGE_MODE_SANS_LES_TAGS" href="#NETTOYAGE_MODE_SANS_LES_TAGS">NETTOYAGE_MODE_SANS_LES_TAGS</a> = <span class="php-quote">&quot;sansLesTags&quot;</span>;
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a> <span class="php-comment">/** 'avecUnTag' : supprime tous les enregistrements contenant au moins un des tags indiqués. */</span>
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> <span class="php-keyword1">const</span> <a id="NETTOYAGE_MODE_AVEC_UN_TAG" href="#NETTOYAGE_MODE_AVEC_UN_TAG">NETTOYAGE_MODE_AVEC_UN_TAG</a> = <span class="php-quote">&quot;avecUnTag&quot;</span>;
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a>
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a> <span class="php-comment">/**
</span></span><span id="37" class="l"><a class="l" href="#37"> 37: </a><span class="php-comment"> * Dernier identifiant de cache utilisé.
</span></span><span id="38" class="l"><a class="l" href="#38"> 38: </a><span class="php-comment"> *
</span></span><span id="39" class="l"><a class="l" href="#39"> 39: </a><span class="php-comment"> * @var string $dernier_id
</span></span><span id="40" class="l"><a class="l" href="#40"> 40: </a><span class="php-comment"> */</span>
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$dernier_id" href="#$dernier_id">$dernier_id</a></span> = <span class="php-keyword1">null</span>;
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a>
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a> <span class="php-comment">/**
</span></span><span id="44" class="l"><a class="l" href="#44"> 44: </a><span class="php-comment"> * Les options disponibles pour le cache :
</span></span><span id="45" class="l"><a class="l" href="#45"> 45: </a><span class="php-comment"> * ====&gt; (string) stockage_mode :
</span></span><span id="46" class="l"><a class="l" href="#46"> 46: </a><span class="php-comment"> * Indique le mode de stockage du cache à utiliser parmis :
</span></span><span id="47" class="l"><a class="l" href="#47"> 47: </a><span class="php-comment"> * - Cache::STOCKAGE_MODE_FICHIER : sous forme d'une arborescence de fichiers et dossier
</span></span><span id="48" class="l"><a class="l" href="#48"> 48: </a><span class="php-comment"> * - Cache::STOCKAGE_MODE_SQLITE : sous forme d'une base de données SQLite
</span></span><span id="49" class="l"><a class="l" href="#49"> 49: </a><span class="php-comment"> *
</span></span><span id="50" class="l"><a class="l" href="#50"> 50: </a><span class="php-comment"> * ====&gt; (string) stockage_chemin :
</span></span><span id="51" class="l"><a class="l" href="#51"> 51: </a><span class="php-comment"> * Chemin vers :
</span></span><span id="52" class="l"><a class="l" href="#52"> 52: </a><span class="php-comment"> * - Cache::STOCKAGE_MODE_FICHIER : le dossier devant contenir l'arborescence.
</span></span><span id="53" class="l"><a class="l" href="#53"> 53: </a><span class="php-comment"> * - Cache::STOCKAGE_MODE_SQLITE : le fichier contenant la base SQLite.
</span></span><span id="54" class="l"><a class="l" href="#54"> 54: </a><span class="php-comment"> *
</span></span><span id="55" class="l"><a class="l" href="#55"> 55: </a><span class="php-comment"> * ====&gt; (boolean) controle_ecriture :
</span></span><span id="56" class="l"><a class="l" href="#56"> 56: </a><span class="php-comment"> * - Active / Désactive le controle d'écriture (le cache est lue jute après l'écriture du fichier pour détecter sa corruption)
</span></span><span id="57" class="l"><a class="l" href="#57"> 57: </a><span class="php-comment"> * - Activer le controle d'écriture ralentira légèrement l'écriture du fichier de cache mais pas sa lecture
</span></span><span id="58" class="l"><a class="l" href="#58"> 58: </a><span class="php-comment"> * Le controle d'écriture peut détecter la corruption de fichier mais ce n'est pas un système de controle parfait.
</span></span><span id="59" class="l"><a class="l" href="#59"> 59: </a><span class="php-comment"> *
</span></span><span id="60" class="l"><a class="l" href="#60"> 60: </a><span class="php-comment"> * ====&gt; (boolean) mise_en_cache :
</span></span><span id="61" class="l"><a class="l" href="#61"> 61: </a><span class="php-comment"> * - Active / Désactive la mise en cache
</span></span><span id="62" class="l"><a class="l" href="#62"> 62: </a><span class="php-comment"> * (peut être très utile pour le débogage des scripts utilisant le cache
</span></span><span id="63" class="l"><a class="l" href="#63"> 63: </a><span class="php-comment"> *
</span></span><span id="64" class="l"><a class="l" href="#64"> 64: </a><span class="php-comment"> * =====&gt; (string) cache_id_prefixe :
</span></span><span id="65" class="l"><a class="l" href="#65"> 65: </a><span class="php-comment"> * - préfixe pour les identifiant de cache ( = espace de nom)
</span></span><span id="66" class="l"><a class="l" href="#66"> 66: </a><span class="php-comment"> *
</span></span><span id="67" class="l"><a class="l" href="#67"> 67: </a><span class="php-comment"> * ====&gt; (boolean) serialisation_auto :
</span></span><span id="68" class="l"><a class="l" href="#68"> 68: </a><span class="php-comment"> * - Active / Désactive la sérialisation automatique
</span></span><span id="69" class="l"><a class="l" href="#69"> 69: </a><span class="php-comment"> * - Peut être utilisé pour sauver directement des données qui ne sont pas des chaines (mais c'est plus lent)
</span></span><span id="70" class="l"><a class="l" href="#70"> 70: </a><span class="php-comment"> *
</span></span><span id="71" class="l"><a class="l" href="#71"> 71: </a><span class="php-comment"> * ====&gt; (int) nettoyage_auto :
</span></span><span id="72" class="l"><a class="l" href="#72"> 72: </a><span class="php-comment"> * - Désactive / Régler le processus de nettoyage automatique
</span></span><span id="73" class="l"><a class="l" href="#73"> 73: </a><span class="php-comment"> * - Le processus de nettoyage automatiques détruit les fichier trop vieux (pour la durée de vie donnée)
</span></span><span id="74" class="l"><a class="l" href="#74"> 74: </a><span class="php-comment"> * quand un nouveau fichier de cache est écrit :
</span></span><span id="75" class="l"><a class="l" href="#75"> 75: </a><span class="php-comment"> * 0 =&gt; pas de nettoyage automatique
</span></span><span id="76" class="l"><a class="l" href="#76"> 76: </a><span class="php-comment"> * 1 =&gt; nettoyage automatique systématique
</span></span><span id="77" class="l"><a class="l" href="#77"> 77: </a><span class="php-comment"> * x (integer) &gt; 1 =&gt; nettoyage automatique toutes les 1 fois (au hasard) sur x écriture de fichier de cache
</span></span><span id="78" class="l"><a class="l" href="#78"> 78: </a><span class="php-comment"> *
</span></span><span id="79" class="l"><a class="l" href="#79"> 79: </a><span class="php-comment"> * ====&gt; (int) duree_de_vie :
</span></span><span id="80" class="l"><a class="l" href="#80"> 80: </a><span class="php-comment"> * - Durée de vie du cache (en secondes)
</span></span><span id="81" class="l"><a class="l" href="#81"> 81: </a><span class="php-comment"> * - Si null, le cache est valide indéfiniment.
</span></span><span id="82" class="l"><a class="l" href="#82"> 82: </a><span class="php-comment"> *
</span></span><span id="83" class="l"><a class="l" href="#83"> 83: </a><span class="php-comment"> * @var array $options les options disponibles pour le cache .
</span></span><span id="84" class="l"><a class="l" href="#84"> 84: </a><span class="php-comment"> */</span>
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$options" href="#$options">$options</a></span> = <span class="php-keyword1">array</span>(
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a> <span class="php-quote">'stockage_mode'</span> =&gt; self::STOCKAGE_MODE_FICHIER,
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-quote">'stockage_chemin'</span> =&gt; <span class="php-keyword1">null</span>,
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a> <span class="php-quote">'controle_ecriture'</span> =&gt; <span class="php-keyword1">true</span>,
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a> <span class="php-quote">'mise_en_cache'</span> =&gt; <span class="php-keyword1">true</span>,
</span><span id="90" class="l"><a class="l" href="#90"> 90: </a> <span class="php-quote">'cache_id_prefixe'</span> =&gt; <span class="php-keyword1">null</span>,
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> <span class="php-quote">'serialisation_auto'</span> =&gt; <span class="php-keyword1">false</span>,
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> <span class="php-quote">'nettoyage_auto'</span> =&gt; <span class="php-num">10</span>,
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-quote">'duree_de_vie'</span> =&gt; <span class="php-num">3600</span>,
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> );
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a>
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$stockage" href="#$stockage">$stockage</a></span> = <span class="php-keyword1">null</span>;
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a>
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>(<span class="php-var">$options</span> = <span class="php-keyword1">array</span>(), <span class="php-var">$options_stockage</span> = <span class="php-keyword1">array</span>()) {
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> <span class="php-var">$this</span>-&gt;initialiserOptionsParConfig();
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-var">$this</span>-&gt;setOptions(<span class="php-var">$options</span>);
</span><span id="101" class="l"><a class="l" href="#101">101: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_mode'</span>] == self::STOCKAGE_MODE_FICHIER) {
</span><span id="102" class="l"><a class="l" href="#102">102: </a> <span class="php-var">$this</span>-&gt;stockage = <span class="php-keyword1">new</span> CacheFichier(<span class="php-var">$options_stockage</span>, <span class="php-var">$this</span>);
</span><span id="103" class="l"><a class="l" href="#103">103: </a> <span class="php-var">$this</span>-&gt;stockage-&gt;setEmplacement(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>]);
</span><span id="104" class="l"><a class="l" href="#104">104: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_mode'</span>] == self::STOCKAGE_MODE_SQLITE) {
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-var">$this</span>-&gt;stockage = <span class="php-keyword1">new</span> CacheSqlite(<span class="php-var">$options_stockage</span>, <span class="php-var">$this</span>);
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-var">$this</span>-&gt;stockage-&gt;setEmplacement(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>]);
</span><span id="107" class="l"><a class="l" href="#107">107: </a> } <span class="php-keyword1">else</span> {
</span><span id="108" class="l"><a class="l" href="#108">108: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Ce mode de stockage n'existe pas ou ne supporte pas la création par le constructeur&quot;</span>, E_USER_WARNING);
</span><span id="109" class="l"><a class="l" href="#109">109: </a> }
</span><span id="110" class="l"><a class="l" href="#110">110: </a> }
</span><span id="111" class="l"><a class="l" href="#111">111: </a>
</span><span id="112" class="l"><a class="l" href="#112">112: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_initialiserOptionsParConfig" href="#_initialiserOptionsParConfig">initialiserOptionsParConfig</a>() {
</span><span id="113" class="l"><a class="l" href="#113">113: </a> <span class="php-keyword1">while</span> (<span class="php-keyword1">list</span>(<span class="php-var">$nom</span>, <span class="php-var">$valeur</span>) = <span class="php-keyword2">each</span>(<span class="php-var">$this</span>-&gt;options)) {
</span><span id="114" class="l"><a class="l" href="#114">114: </a> <span class="php-keyword1">if</span> (Config::existe(<span class="php-var">$nom</span>)) {
</span><span id="115" class="l"><a class="l" href="#115">115: </a> <span class="php-var">$this</span>-&gt;options[<span class="php-var">$nom</span>] = Config::get(<span class="php-var">$nom</span>);
</span><span id="116" class="l"><a class="l" href="#116">116: </a> }
</span><span id="117" class="l"><a class="l" href="#117">117: </a> }
</span><span id="118" class="l"><a class="l" href="#118">118: </a> }
</span><span id="119" class="l"><a class="l" href="#119">119: </a>
</span><span id="120" class="l"><a class="l" href="#120">120: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_setOptions" href="#_setOptions">setOptions</a>(<span class="php-var">$options</span>) {
</span><span id="121" class="l"><a class="l" href="#121">121: </a> <span class="php-keyword1">while</span> (<span class="php-keyword1">list</span>(<span class="php-var">$nom</span>, <span class="php-var">$valeur</span>) = <span class="php-keyword2">each</span>(<span class="php-var">$options</span>)) {
</span><span id="122" class="l"><a class="l" href="#122">122: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_string</span>(<span class="php-var">$nom</span>)) {
</span><span id="123" class="l"><a class="l" href="#123">123: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Nom d'option incorecte : </span><span class="php-var">$nom</span><span class="php-quote">&quot;</span>, E_USER_WARNING);
</span><span id="124" class="l"><a class="l" href="#124">124: </a> }
</span><span id="125" class="l"><a class="l" href="#125">125: </a> <span class="php-var">$nom</span> = <span class="php-keyword2">strtolower</span>(<span class="php-var">$nom</span>);
</span><span id="126" class="l"><a class="l" href="#126">126: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">array_key_exists</span>(<span class="php-var">$nom</span>, <span class="php-var">$this</span>-&gt;options)) {
</span><span id="127" class="l"><a class="l" href="#127">127: </a> <span class="php-var">$this</span>-&gt;options[<span class="php-var">$nom</span>] = <span class="php-var">$valeur</span>;
</span><span id="128" class="l"><a class="l" href="#128">128: </a> }
</span><span id="129" class="l"><a class="l" href="#129">129: </a> }
</span><span id="130" class="l"><a class="l" href="#130">130: </a> }
</span><span id="131" class="l"><a class="l" href="#131">131: </a>
</span><span id="132" class="l"><a class="l" href="#132">132: </a> <span class="php-comment">/**
</span></span><span id="133" class="l"><a class="l" href="#133">133: </a><span class="php-comment"> * Permet de (re-)définir l'emplacement pour le stockage du cache.
</span></span><span id="134" class="l"><a class="l" href="#134">134: </a><span class="php-comment"> * En fonction du mode de stockage utilisé , l'emplacement indiqué correspondra au chemin du :
</span></span><span id="135" class="l"><a class="l" href="#135">135: </a><span class="php-comment"> * - dossier où stocker les fichiers pour le mode &quot;fichier&quot;.
</span></span><span id="136" class="l"><a class="l" href="#136">136: </a><span class="php-comment"> * - fichier de la base de données pour le mode &quot;sqlite&quot;.
</span></span><span id="137" class="l"><a class="l" href="#137">137: </a><span class="php-comment"> * @param string $emplacement chemin vers dossier (Cache::STOCKAGE_MODE_FICHIER) ou fichier base Sqlite (Cache::STOCKAGE_MODE_SQLITE)
</span></span><span id="138" class="l"><a class="l" href="#138">138: </a><span class="php-comment"> * @return void
</span></span><span id="139" class="l"><a class="l" href="#139">139: </a><span class="php-comment"> */</span>
</span><span id="140" class="l"><a class="l" href="#140">140: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_setEmplacement" href="#_setEmplacement">setEmplacement</a>(<span class="php-var">$emplacement</span>) {
</span><span id="141" class="l"><a class="l" href="#141">141: </a> <span class="php-keyword1">if</span> (<span class="php-var">$emplacement</span> != <span class="php-keyword1">null</span>) {
</span><span id="142" class="l"><a class="l" href="#142">142: </a> <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'setEmplacement'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$emplacement</span>));
</span><span id="143" class="l"><a class="l" href="#143">143: </a> } <span class="php-keyword1">else</span> {
</span><span id="144" class="l"><a class="l" href="#144">144: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;L'emplacement ne peut pas être null.&quot;</span>, E_USER_WARNING);
</span><span id="145" class="l"><a class="l" href="#145">145: </a> }
</span><span id="146" class="l"><a class="l" href="#146">146: </a> }
</span><span id="147" class="l"><a class="l" href="#147">147: </a>
</span><span id="148" class="l"><a class="l" href="#148">148: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_fabriquer" href="#_fabriquer">fabriquer</a>(<span class="php-var">$mode</span>, <span class="php-var">$options</span> = <span class="php-keyword1">array</span>()) {
</span><span id="149" class="l"><a class="l" href="#149">149: </a> <span class="php-keyword1">if</span> (<span class="php-var">$mode</span> == self::STOCKAGE_MODE_SIMPLE) {
</span><span id="150" class="l"><a class="l" href="#150">150: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">new</span> CacheSimple(<span class="php-var">$options</span>);
</span><span id="151" class="l"><a class="l" href="#151">151: </a> } <span class="php-keyword1">else</span> {
</span><span id="152" class="l"><a class="l" href="#152">152: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Le mode '</span><span class="php-var">$mode</span><span class="php-quote">' de stockage n'existe pas ou ne supporte pas la création par fabrique&quot;</span>, E_USER_WARNING);
</span><span id="153" class="l"><a class="l" href="#153">153: </a> }
</span><span id="154" class="l"><a class="l" href="#154">154: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="155" class="l"><a class="l" href="#155">155: </a> }
</span><span id="156" class="l"><a class="l" href="#156">156: </a>
</span><span id="157" class="l"><a class="l" href="#157">157: </a> <span class="php-comment">/**
</span></span><span id="158" class="l"><a class="l" href="#158">158: </a><span class="php-comment"> * Teste si un cache est disponible pour l'identifiant donné et (si oui) le retourne (false dans le cas contraire)
</span></span><span id="159" class="l"><a class="l" href="#159">159: </a><span class="php-comment"> *
</span></span><span id="160" class="l"><a class="l" href="#160">160: </a><span class="php-comment"> * @param string $id Identifiant de cache.
</span></span><span id="161" class="l"><a class="l" href="#161">161: </a><span class="php-comment"> * @param boolean $ne_pas_tester_validiter_du_cache Si mis à true, la validité du cache n'est pas testée
</span></span><span id="162" class="l"><a class="l" href="#162">162: </a><span class="php-comment"> * @return mixed|false Cached datas
</span></span><span id="163" class="l"><a class="l" href="#163">163: </a><span class="php-comment"> */</span>
</span><span id="164" class="l"><a class="l" href="#164">164: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_charger" href="#_charger">charger</a>(<span class="php-var">$id</span>, <span class="php-var">$ne_pas_tester_validiter_du_cache</span> = <span class="php-keyword1">false</span>) {
</span><span id="165" class="l"><a class="l" href="#165">165: </a> <span class="php-var">$donnees</span> = <span class="php-keyword1">false</span>;
</span><span id="166" class="l"><a class="l" href="#166">166: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'mise_en_cache'</span>] === <span class="php-keyword1">true</span>) {
</span><span id="167" class="l"><a class="l" href="#167">167: </a> <span class="php-var">$id</span> = <span class="php-var">$this</span>-&gt;prefixerId(<span class="php-var">$id</span>);
</span><span id="168" class="l"><a class="l" href="#168">168: </a> <span class="php-var">$this</span>-&gt;dernier_id = <span class="php-var">$id</span>;
</span><span id="169" class="l"><a class="l" href="#169">169: </a> self::validerIdOuTag(<span class="php-var">$id</span>);
</span><span id="170" class="l"><a class="l" href="#170">170: </a> <span class="php-var">$donnees</span> = <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'charger'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$id</span>, <span class="php-var">$ne_pas_tester_validiter_du_cache</span>));
</span><span id="171" class="l"><a class="l" href="#171">171: </a> <span class="php-var">$donnees</span> = <span class="php-var">$this</span>-&gt;deserialiserAutomatiquement(<span class="php-var">$donnees</span>);
</span><span id="172" class="l"><a class="l" href="#172">172: </a> }
</span><span id="173" class="l"><a class="l" href="#173">173: </a> <span class="php-keyword1">return</span> <span class="php-var">$donnees</span>;
</span><span id="174" class="l"><a class="l" href="#174">174: </a> }
</span><span id="175" class="l"><a class="l" href="#175">175: </a>
</span><span id="176" class="l"><a class="l" href="#176">176: </a> <span class="php-comment">/**
</span></span><span id="177" class="l"><a class="l" href="#177">177: </a><span class="php-comment"> * Test if a cache is available for the given id
</span></span><span id="178" class="l"><a class="l" href="#178">178: </a><span class="php-comment"> *
</span></span><span id="179" class="l"><a class="l" href="#179">179: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="180" class="l"><a class="l" href="#180">180: </a><span class="php-comment"> * @return int|false Last modified time of cache entry if it is available, false otherwise
</span></span><span id="181" class="l"><a class="l" href="#181">181: </a><span class="php-comment"> */</span>
</span><span id="182" class="l"><a class="l" href="#182">182: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_tester" href="#_tester">tester</a>(<span class="php-var">$id</span>) {
</span><span id="183" class="l"><a class="l" href="#183">183: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">false</span>;
</span><span id="184" class="l"><a class="l" href="#184">184: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'mise_en_cache'</span>] === <span class="php-keyword1">true</span>) {
</span><span id="185" class="l"><a class="l" href="#185">185: </a> <span class="php-var">$id</span> = <span class="php-var">$this</span>-&gt;prefixerId(<span class="php-var">$id</span>);
</span><span id="186" class="l"><a class="l" href="#186">186: </a> self::validerIdOuTag(<span class="php-var">$id</span>);
</span><span id="187" class="l"><a class="l" href="#187">187: </a> <span class="php-var">$this</span>-&gt;dernier_id = <span class="php-var">$id</span>;
</span><span id="188" class="l"><a class="l" href="#188">188: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'tester'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$id</span>));
</span><span id="189" class="l"><a class="l" href="#189">189: </a> }
</span><span id="190" class="l"><a class="l" href="#190">190: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="191" class="l"><a class="l" href="#191">191: </a> }
</span><span id="192" class="l"><a class="l" href="#192">192: </a>
</span><span id="193" class="l"><a class="l" href="#193">193: </a> <span class="php-comment">/**
</span></span><span id="194" class="l"><a class="l" href="#194">194: </a><span class="php-comment"> * Sauvegarde en cache les données passées en paramètre.
</span></span><span id="195" class="l"><a class="l" href="#195">195: </a><span class="php-comment"> *
</span></span><span id="196" class="l"><a class="l" href="#196">196: </a><span class="php-comment"> * @param mixed $donnees Données à mettre en cache (peut être différent d'une chaine si serialisation_auto vaut true).
</span></span><span id="197" class="l"><a class="l" href="#197">197: </a><span class="php-comment"> * @param string $id Identifiant du cache (s'il n'est pas définit, le dernier identifiant sera utilisé).
</span></span><span id="198" class="l"><a class="l" href="#198">198: </a><span class="php-comment"> * @param array $tags Mots-clés du cache.
</span></span><span id="199" class="l"><a class="l" href="#199">199: </a><span class="php-comment"> * @param int $duree_de_vie_specifique Si != false, indique une durée de vie spécifique pour cet enregistrement en cache (null =&gt; durée de vie infinie)
</span></span><span id="200" class="l"><a class="l" href="#200">200: </a><span class="php-comment"> * @return boolean True si aucun problème n'est survenu.
</span></span><span id="201" class="l"><a class="l" href="#201">201: </a><span class="php-comment"> */</span>
</span><span id="202" class="l"><a class="l" href="#202">202: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_sauver" href="#_sauver">sauver</a>(<span class="php-var">$donnees</span>, <span class="php-var">$id</span> = <span class="php-keyword1">null</span>, <span class="php-var">$tags</span> = <span class="php-keyword1">array</span>(), <span class="php-var">$duree_de_vie_specifique</span> = <span class="php-keyword1">false</span>) {
</span><span id="203" class="l"><a class="l" href="#203">203: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="204" class="l"><a class="l" href="#204">204: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'mise_en_cache'</span>] === <span class="php-keyword1">true</span>) {
</span><span id="205" class="l"><a class="l" href="#205">205: </a> <span class="php-var">$id</span> = (<span class="php-var">$id</span> === <span class="php-keyword1">null</span>) ? <span class="php-var">$this</span>-&gt;dernier_id : <span class="php-var">$this</span>-&gt;prefixerId(<span class="php-var">$id</span>);
</span><span id="206" class="l"><a class="l" href="#206">206: </a>
</span><span id="207" class="l"><a class="l" href="#207">207: </a> self::validerIdOuTag(<span class="php-var">$id</span>);
</span><span id="208" class="l"><a class="l" href="#208">208: </a> self::validerTableauDeTags(<span class="php-var">$tags</span>);
</span><span id="209" class="l"><a class="l" href="#209">209: </a> <span class="php-var">$donnees</span> = <span class="php-var">$this</span>-&gt;serialiserAutomatiquement(<span class="php-var">$donnees</span>);
</span><span id="210" class="l"><a class="l" href="#210">210: </a> <span class="php-var">$this</span>-&gt;nettoyerAutomatiquement();
</span><span id="211" class="l"><a class="l" href="#211">211: </a>
</span><span id="212" class="l"><a class="l" href="#212">212: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'sauver'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$donnees</span>, <span class="php-var">$id</span>, <span class="php-var">$tags</span>, <span class="php-var">$duree_de_vie_specifique</span>));
</span><span id="213" class="l"><a class="l" href="#213">213: </a>
</span><span id="214" class="l"><a class="l" href="#214">214: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span> == <span class="php-keyword1">false</span>) {
</span><span id="215" class="l"><a class="l" href="#215">215: </a> <span class="php-comment">// Le cache étant peut être corrompu, nous le supprimons</span>
</span><span id="216" class="l"><a class="l" href="#216">216: </a> <span class="php-var">$this</span>-&gt;supprimer(<span class="php-var">$id</span>);
</span><span id="217" class="l"><a class="l" href="#217">217: </a> } <span class="php-keyword1">else</span> {
</span><span id="218" class="l"><a class="l" href="#218">218: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;controlerEcriture(<span class="php-var">$id</span>, <span class="php-var">$donnees</span>);
</span><span id="219" class="l"><a class="l" href="#219">219: </a> }
</span><span id="220" class="l"><a class="l" href="#220">220: </a> }
</span><span id="221" class="l"><a class="l" href="#221">221: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="222" class="l"><a class="l" href="#222">222: </a> }
</span><span id="223" class="l"><a class="l" href="#223">223: </a>
</span><span id="224" class="l"><a class="l" href="#224">224: </a> <span class="php-comment">/**
</span></span><span id="225" class="l"><a class="l" href="#225">225: </a><span class="php-comment"> * Supprime un enregistrement en cache.
</span></span><span id="226" class="l"><a class="l" href="#226">226: </a><span class="php-comment"> *
</span></span><span id="227" class="l"><a class="l" href="#227">227: </a><span class="php-comment"> * @param string $id Identificant du cache à supprimer.
</span></span><span id="228" class="l"><a class="l" href="#228">228: </a><span class="php-comment"> * @return boolean True si ok
</span></span><span id="229" class="l"><a class="l" href="#229">229: </a><span class="php-comment"> */</span>
</span><span id="230" class="l"><a class="l" href="#230">230: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_supprimer" href="#_supprimer">supprimer</a>(<span class="php-var">$id</span>) {
</span><span id="231" class="l"><a class="l" href="#231">231: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="232" class="l"><a class="l" href="#232">232: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'mise_en_cache'</span>] === <span class="php-keyword1">true</span>) {
</span><span id="233" class="l"><a class="l" href="#233">233: </a> <span class="php-var">$id</span> = <span class="php-var">$this</span>-&gt;prefixerId(<span class="php-var">$id</span>);
</span><span id="234" class="l"><a class="l" href="#234">234: </a> self::validerIdOuTag(<span class="php-var">$id</span>);
</span><span id="235" class="l"><a class="l" href="#235">235: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'supprimer'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$id</span>));
</span><span id="236" class="l"><a class="l" href="#236">236: </a> }
</span><span id="237" class="l"><a class="l" href="#237">237: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="238" class="l"><a class="l" href="#238">238: </a> }
</span><span id="239" class="l"><a class="l" href="#239">239: </a>
</span><span id="240" class="l"><a class="l" href="#240">240: </a> <span class="php-comment">/**
</span></span><span id="241" class="l"><a class="l" href="#241">241: </a><span class="php-comment"> * Nettoyage des enregistrements en cache
</span></span><span id="242" class="l"><a class="l" href="#242">242: </a><span class="php-comment"> *
</span></span><span id="243" class="l"><a class="l" href="#243">243: </a><span class="php-comment"> * Mode de nettoyage disponibles :
</span></span><span id="244" class="l"><a class="l" href="#244">244: </a><span class="php-comment"> * 'tous' (défaut) =&gt; supprime tous les enregistrements ($tags n'est pas utilisé)
</span></span><span id="245" class="l"><a class="l" href="#245">245: </a><span class="php-comment"> * 'expiration' =&gt; supprime tous les enregistrements dont la date d'expériration est dépassée ($tags n'est pas utilisé)
</span></span><span id="246" class="l"><a class="l" href="#246">246: </a><span class="php-comment"> * 'avecLesTag' =&gt; supprime tous les enregistrements contenant tous les tags indiqués
</span></span><span id="247" class="l"><a class="l" href="#247">247: </a><span class="php-comment"> * 'sansLesTag' =&gt; supprime tous les enregistrements contenant aucun des tags indiqués
</span></span><span id="248" class="l"><a class="l" href="#248">248: </a><span class="php-comment"> * 'avecUnTag' =&gt; supprime tous les enregistrements contenant au moins un des tags indiqués
</span></span><span id="249" class="l"><a class="l" href="#249">249: </a><span class="php-comment"> *
</span></span><span id="250" class="l"><a class="l" href="#250">250: </a><span class="php-comment"> * @param string $mode mode de nettoyage
</span></span><span id="251" class="l"><a class="l" href="#251">251: </a><span class="php-comment"> * @param array|string $tags peut être un tableau de chaîne ou une simple chaine.
</span></span><span id="252" class="l"><a class="l" href="#252">252: </a><span class="php-comment"> * @return boolean True si ok
</span></span><span id="253" class="l"><a class="l" href="#253">253: </a><span class="php-comment"> */</span>
</span><span id="254" class="l"><a class="l" href="#254">254: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_nettoyer" href="#_nettoyer">nettoyer</a>(<span class="php-var">$mode</span> = self::NETTOYAGE_MODE_TOUS, <span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="255" class="l"><a class="l" href="#255">255: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="256" class="l"><a class="l" href="#256">256: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'mise_en_cache'</span>] === <span class="php-keyword1">true</span>) {
</span><span id="257" class="l"><a class="l" href="#257">257: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">in_array</span>(<span class="php-var">$mode</span>, <span class="php-keyword1">array</span>(Cache::NETTOYAGE_MODE_TOUS,
</span><span id="258" class="l"><a class="l" href="#258">258: </a> Cache::NETTOYAGE_MODE_EXPIRATION,
</span><span id="259" class="l"><a class="l" href="#259">259: </a> Cache::NETTOYAGE_MODE_AVEC_LES_TAGS,
</span><span id="260" class="l"><a class="l" href="#260">260: </a> Cache::NETTOYAGE_MODE_SANS_LES_TAGS,
</span><span id="261" class="l"><a class="l" href="#261">261: </a> Cache::NETTOYAGE_MODE_AVEC_UN_TAG))) {
</span><span id="262" class="l"><a class="l" href="#262">262: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Le mode de nettoyage du cache indiqué n'est pas valide&quot;</span>, E_USER_WARNING);
</span><span id="263" class="l"><a class="l" href="#263">263: </a> }
</span><span id="264" class="l"><a class="l" href="#264">264: </a> self::validerTableauDeTags(<span class="php-var">$tags</span>);
</span><span id="265" class="l"><a class="l" href="#265">265: </a>
</span><span id="266" class="l"><a class="l" href="#266">266: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'nettoyer'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$mode</span>, <span class="php-var">$tags</span>));
</span><span id="267" class="l"><a class="l" href="#267">267: </a> }
</span><span id="268" class="l"><a class="l" href="#268">268: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="269" class="l"><a class="l" href="#269">269: </a> }
</span><span id="270" class="l"><a class="l" href="#270">270: </a>
</span><span id="271" class="l"><a class="l" href="#271">271: </a> <span class="php-comment">/**
</span></span><span id="272" class="l"><a class="l" href="#272">272: </a><span class="php-comment"> * Return an array of stored cache ids
</span></span><span id="273" class="l"><a class="l" href="#273">273: </a><span class="php-comment"> *
</span></span><span id="274" class="l"><a class="l" href="#274">274: </a><span class="php-comment"> * @return array array of stored cache ids (string)
</span></span><span id="275" class="l"><a class="l" href="#275">275: </a><span class="php-comment"> */</span>
</span><span id="276" class="l"><a class="l" href="#276">276: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIds" href="#_getIds">getIds</a>() {
</span><span id="277" class="l"><a class="l" href="#277">277: </a> <span class="php-var">$ids</span> = <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'getIds'</span>);
</span><span id="278" class="l"><a class="l" href="#278">278: </a> <span class="php-var">$ids</span> = <span class="php-var">$this</span>-&gt;supprimerPrefixe(<span class="php-var">$ids</span>);
</span><span id="279" class="l"><a class="l" href="#279">279: </a> <span class="php-keyword1">return</span> <span class="php-var">$ids</span>;
</span><span id="280" class="l"><a class="l" href="#280">280: </a> }
</span><span id="281" class="l"><a class="l" href="#281">281: </a>
</span><span id="282" class="l"><a class="l" href="#282">282: </a> <span class="php-comment">/**
</span></span><span id="283" class="l"><a class="l" href="#283">283: </a><span class="php-comment"> * Return an array of stored tags
</span></span><span id="284" class="l"><a class="l" href="#284">284: </a><span class="php-comment"> *
</span></span><span id="285" class="l"><a class="l" href="#285">285: </a><span class="php-comment"> * @return array array of stored tags (string)
</span></span><span id="286" class="l"><a class="l" href="#286">286: </a><span class="php-comment"> */</span>
</span><span id="287" class="l"><a class="l" href="#287">287: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getTags" href="#_getTags">getTags</a>() {
</span><span id="288" class="l"><a class="l" href="#288">288: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'getTags'</span>);
</span><span id="289" class="l"><a class="l" href="#289">289: </a> }
</span><span id="290" class="l"><a class="l" href="#290">290: </a>
</span><span id="291" class="l"><a class="l" href="#291">291: </a> <span class="php-comment">/**
</span></span><span id="292" class="l"><a class="l" href="#292">292: </a><span class="php-comment"> * Return an array of stored cache ids which match given tags
</span></span><span id="293" class="l"><a class="l" href="#293">293: </a><span class="php-comment"> *
</span></span><span id="294" class="l"><a class="l" href="#294">294: </a><span class="php-comment"> * In case of multiple tags, a logical AND is made between tags
</span></span><span id="295" class="l"><a class="l" href="#295">295: </a><span class="php-comment"> *
</span></span><span id="296" class="l"><a class="l" href="#296">296: </a><span class="php-comment"> * @param array $tags array of tags
</span></span><span id="297" class="l"><a class="l" href="#297">297: </a><span class="php-comment"> * @return array array of matching cache ids (string)
</span></span><span id="298" class="l"><a class="l" href="#298">298: </a><span class="php-comment"> */</span>
</span><span id="299" class="l"><a class="l" href="#299">299: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIdsAvecLesTags" href="#_getIdsAvecLesTags">getIdsAvecLesTags</a>(<span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="300" class="l"><a class="l" href="#300">300: </a> <span class="php-var">$ids</span> = <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'getIdsAvecLesTags'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$tags</span>));
</span><span id="301" class="l"><a class="l" href="#301">301: </a> <span class="php-var">$ids</span> = <span class="php-var">$this</span>-&gt;supprimerPrefixe(<span class="php-var">$ids</span>);
</span><span id="302" class="l"><a class="l" href="#302">302: </a> <span class="php-keyword1">return</span> <span class="php-var">$ids</span>;
</span><span id="303" class="l"><a class="l" href="#303">303: </a> }
</span><span id="304" class="l"><a class="l" href="#304">304: </a>
</span><span id="305" class="l"><a class="l" href="#305">305: </a> <span class="php-comment">/**
</span></span><span id="306" class="l"><a class="l" href="#306">306: </a><span class="php-comment"> * Return an array of stored cache ids which don't match given tags
</span></span><span id="307" class="l"><a class="l" href="#307">307: </a><span class="php-comment"> *
</span></span><span id="308" class="l"><a class="l" href="#308">308: </a><span class="php-comment"> * In case of multiple tags, a logical OR is made between tags
</span></span><span id="309" class="l"><a class="l" href="#309">309: </a><span class="php-comment"> *
</span></span><span id="310" class="l"><a class="l" href="#310">310: </a><span class="php-comment"> * @param array $tags array of tags
</span></span><span id="311" class="l"><a class="l" href="#311">311: </a><span class="php-comment"> * @return array array of not matching cache ids (string)
</span></span><span id="312" class="l"><a class="l" href="#312">312: </a><span class="php-comment"> */</span>
</span><span id="313" class="l"><a class="l" href="#313">313: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIdsSansLesTags" href="#_getIdsSansLesTags">getIdsSansLesTags</a>(<span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="314" class="l"><a class="l" href="#314">314: </a> <span class="php-var">$ids</span> = <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'getIdsSansLesTags'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$tags</span>));
</span><span id="315" class="l"><a class="l" href="#315">315: </a> <span class="php-var">$ids</span> = <span class="php-var">$this</span>-&gt;supprimerPrefixe(<span class="php-var">$ids</span>);
</span><span id="316" class="l"><a class="l" href="#316">316: </a> <span class="php-keyword1">return</span> <span class="php-var">$ids</span>;
</span><span id="317" class="l"><a class="l" href="#317">317: </a> }
</span><span id="318" class="l"><a class="l" href="#318">318: </a>
</span><span id="319" class="l"><a class="l" href="#319">319: </a> <span class="php-comment">/**
</span></span><span id="320" class="l"><a class="l" href="#320">320: </a><span class="php-comment"> * Return an array of stored cache ids which match any given tags
</span></span><span id="321" class="l"><a class="l" href="#321">321: </a><span class="php-comment"> *
</span></span><span id="322" class="l"><a class="l" href="#322">322: </a><span class="php-comment"> * In case of multiple tags, a logical OR is made between tags
</span></span><span id="323" class="l"><a class="l" href="#323">323: </a><span class="php-comment"> *
</span></span><span id="324" class="l"><a class="l" href="#324">324: </a><span class="php-comment"> * @param array $tags array of tags
</span></span><span id="325" class="l"><a class="l" href="#325">325: </a><span class="php-comment"> * @return array array of matching any cache ids (string)
</span></span><span id="326" class="l"><a class="l" href="#326">326: </a><span class="php-comment"> */</span>
</span><span id="327" class="l"><a class="l" href="#327">327: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIdsAvecUnTag" href="#_getIdsAvecUnTag">getIdsAvecUnTag</a>(<span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="328" class="l"><a class="l" href="#328">328: </a> <span class="php-var">$ids</span> = <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'getIdsAvecUnTag'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$tags</span>));
</span><span id="329" class="l"><a class="l" href="#329">329: </a> <span class="php-var">$ids</span> = <span class="php-var">$this</span>-&gt;supprimerPrefixe(<span class="php-var">$ids</span>);
</span><span id="330" class="l"><a class="l" href="#330">330: </a> <span class="php-keyword1">return</span> <span class="php-var">$ids</span>;
</span><span id="331" class="l"><a class="l" href="#331">331: </a> }
</span><span id="332" class="l"><a class="l" href="#332">332: </a>
</span><span id="333" class="l"><a class="l" href="#333">333: </a> <span class="php-comment">/**
</span></span><span id="334" class="l"><a class="l" href="#334">334: </a><span class="php-comment"> * Return the filling percentage of the backend storage
</span></span><span id="335" class="l"><a class="l" href="#335">335: </a><span class="php-comment"> *
</span></span><span id="336" class="l"><a class="l" href="#336">336: </a><span class="php-comment"> * @return int integer between 0 and 100
</span></span><span id="337" class="l"><a class="l" href="#337">337: </a><span class="php-comment"> */</span>
</span><span id="338" class="l"><a class="l" href="#338">338: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getPourcentageRemplissage" href="#_getPourcentageRemplissage">getPourcentageRemplissage</a>() {
</span><span id="339" class="l"><a class="l" href="#339">339: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'getPourcentageRemplissage'</span>);
</span><span id="340" class="l"><a class="l" href="#340">340: </a> }
</span><span id="341" class="l"><a class="l" href="#341">341: </a>
</span><span id="342" class="l"><a class="l" href="#342">342: </a> <span class="php-comment">/**
</span></span><span id="343" class="l"><a class="l" href="#343">343: </a><span class="php-comment"> * Return an array of metadatas for the given cache id
</span></span><span id="344" class="l"><a class="l" href="#344">344: </a><span class="php-comment"> *
</span></span><span id="345" class="l"><a class="l" href="#345">345: </a><span class="php-comment"> * The array will include these keys :
</span></span><span id="346" class="l"><a class="l" href="#346">346: </a><span class="php-comment"> * - expire : the expire timestamp
</span></span><span id="347" class="l"><a class="l" href="#347">347: </a><span class="php-comment"> * - tags : a string array of tags
</span></span><span id="348" class="l"><a class="l" href="#348">348: </a><span class="php-comment"> * - mtime : timestamp of last modification time
</span></span><span id="349" class="l"><a class="l" href="#349">349: </a><span class="php-comment"> *
</span></span><span id="350" class="l"><a class="l" href="#350">350: </a><span class="php-comment"> * @param string $id cache id
</span></span><span id="351" class="l"><a class="l" href="#351">351: </a><span class="php-comment"> * @return array array of metadatas (false if the cache id is not found)
</span></span><span id="352" class="l"><a class="l" href="#352">352: </a><span class="php-comment"> */</span>
</span><span id="353" class="l"><a class="l" href="#353">353: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getMetadonnees" href="#_getMetadonnees">getMetadonnees</a>(<span class="php-var">$id</span>) {
</span><span id="354" class="l"><a class="l" href="#354">354: </a> <span class="php-var">$id</span> = <span class="php-var">$this</span>-&gt;prefixerId(<span class="php-var">$id</span>);
</span><span id="355" class="l"><a class="l" href="#355">355: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'getMetadonnees'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$id</span>));
</span><span id="356" class="l"><a class="l" href="#356">356: </a> }
</span><span id="357" class="l"><a class="l" href="#357">357: </a>
</span><span id="358" class="l"><a class="l" href="#358">358: </a> <span class="php-comment">/**
</span></span><span id="359" class="l"><a class="l" href="#359">359: </a><span class="php-comment"> * Give (if possible) an extra lifetime to the given cache id
</span></span><span id="360" class="l"><a class="l" href="#360">360: </a><span class="php-comment"> *
</span></span><span id="361" class="l"><a class="l" href="#361">361: </a><span class="php-comment"> * @param string $id cache id
</span></span><span id="362" class="l"><a class="l" href="#362">362: </a><span class="php-comment"> * @param int $extraLifetime
</span></span><span id="363" class="l"><a class="l" href="#363">363: </a><span class="php-comment"> * @return boolean true if ok
</span></span><span id="364" class="l"><a class="l" href="#364">364: </a><span class="php-comment"> */</span>
</span><span id="365" class="l"><a class="l" href="#365">365: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_ajouterSupplementDureeDeVie" href="#_ajouterSupplementDureeDeVie">ajouterSupplementDureeDeVie</a>(<span class="php-var">$id</span>, <span class="php-var">$supplement_duree_de_vie</span>) {
</span><span id="366" class="l"><a class="l" href="#366">366: </a> <span class="php-var">$id</span> = <span class="php-var">$this</span>-&gt;prefixerId(<span class="php-var">$id</span>);
</span><span id="367" class="l"><a class="l" href="#367">367: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'ajouterSupplementDureeDeVie'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$id</span>, <span class="php-var">$supplement_duree_de_vie</span>));
</span><span id="368" class="l"><a class="l" href="#368">368: </a> }
</span><span id="369" class="l"><a class="l" href="#369">369: </a>
</span><span id="370" class="l"><a class="l" href="#370">370: </a>
</span><span id="371" class="l"><a class="l" href="#371">371: </a> <span class="php-comment">/**
</span></span><span id="372" class="l"><a class="l" href="#372">372: </a><span class="php-comment"> * Fabrique et retourne l'identifiant du cache avec son préfixe.
</span></span><span id="373" class="l"><a class="l" href="#373">373: </a><span class="php-comment"> *
</span></span><span id="374" class="l"><a class="l" href="#374">374: </a><span class="php-comment"> * Vérifie l'option 'cache_id_prefixe' et retourne le nouvel id avec préfixe ou simplement l'id lui même si elle vaut null.
</span></span><span id="375" class="l"><a class="l" href="#375">375: </a><span class="php-comment"> *
</span></span><span id="376" class="l"><a class="l" href="#376">376: </a><span class="php-comment"> * @param string $id Identifiant du cache.
</span></span><span id="377" class="l"><a class="l" href="#377">377: </a><span class="php-comment"> * @return string Identifiant du cache avec ou sans préfixe.
</span></span><span id="378" class="l"><a class="l" href="#378">378: </a><span class="php-comment"> */</span>
</span><span id="379" class="l"><a class="l" href="#379">379: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_prefixerId" href="#_prefixerId">prefixerId</a>(<span class="php-var">$id</span>) {
</span><span id="380" class="l"><a class="l" href="#380">380: </a> <span class="php-var">$nouvel_id</span> = <span class="php-var">$id</span>;
</span><span id="381" class="l"><a class="l" href="#381">381: </a> <span class="php-keyword1">if</span> ((<span class="php-var">$id</span> !== <span class="php-keyword1">null</span>) &amp;&amp; <span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'cache_id_prefixe'</span>])) {
</span><span id="382" class="l"><a class="l" href="#382">382: </a> <span class="php-var">$nouvel_id</span> = <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'cache_id_prefixe'</span>].<span class="php-var">$id</span>;
</span><span id="383" class="l"><a class="l" href="#383">383: </a> }
</span><span id="384" class="l"><a class="l" href="#384">384: </a> <span class="php-keyword1">return</span> <span class="php-var">$nouvel_id</span>;
</span><span id="385" class="l"><a class="l" href="#385">385: </a> }
</span><span id="386" class="l"><a class="l" href="#386">386: </a>
</span><span id="387" class="l"><a class="l" href="#387">387: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_executerMethodeStockage" href="#_executerMethodeStockage">executerMethodeStockage</a>(<span class="php-var">$methode</span>, <span class="php-var">$params</span> = <span class="php-keyword1">null</span>) {
</span><span id="388" class="l"><a class="l" href="#388">388: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">method_exists</span>(<span class="php-var">$this</span>-&gt;stockage, <span class="php-var">$methode</span>)) {
</span><span id="389" class="l"><a class="l" href="#389">389: </a> <span class="php-keyword1">if</span> (<span class="php-var">$params</span> == <span class="php-keyword1">null</span>) {
</span><span id="390" class="l"><a class="l" href="#390">390: </a> <span class="php-var">$resultat</span> = <span class="php-keyword2">call_user_func</span>(<span class="php-keyword1">array</span>(<span class="php-var">$this</span>-&gt;stockage, <span class="php-var">$methode</span>));
</span><span id="391" class="l"><a class="l" href="#391">391: </a> } <span class="php-keyword1">else</span> {
</span><span id="392" class="l"><a class="l" href="#392">392: </a> <span class="php-var">$resultat</span> = <span class="php-keyword2">call_user_func_array</span>(<span class="php-keyword1">array</span>(<span class="php-var">$this</span>-&gt;stockage, <span class="php-var">$methode</span>), <span class="php-var">$params</span>);
</span><span id="393" class="l"><a class="l" href="#393">393: </a> }
</span><span id="394" class="l"><a class="l" href="#394">394: </a> } <span class="php-keyword1">else</span> {
</span><span id="395" class="l"><a class="l" href="#395">395: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">false</span>;
</span><span id="396" class="l"><a class="l" href="#396">396: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;La méthode '</span><span class="php-var">$methode</span><span class="php-quote">' n'existe pas dans la classe '&quot;</span>.<span class="php-keyword2">get_class</span>(<span class="php-var">$this</span>).<span class="php-quote">&quot;'.&quot;</span>, E_USER_WARNING);
</span><span id="397" class="l"><a class="l" href="#397">397: </a> }
</span><span id="398" class="l"><a class="l" href="#398">398: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="399" class="l"><a class="l" href="#399">399: </a> }
</span><span id="400" class="l"><a class="l" href="#400">400: </a>
</span><span id="401" class="l"><a class="l" href="#401">401: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_supprimerPrefixe" href="#_supprimerPrefixe">supprimerPrefixe</a>(<span class="php-var">$ids</span>) {
</span><span id="402" class="l"><a class="l" href="#402">402: </a> <span class="php-comment">// Il est nécessaire de retirer les cache_id_prefixe des ids (voir #ZF-6178, #ZF-7600)</span>
</span><span id="403" class="l"><a class="l" href="#403">403: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'cache_id_prefixe'</span>]) &amp;&amp; <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'cache_id_prefixe'</span>] !== <span class="php-quote">''</span>) {
</span><span id="404" class="l"><a class="l" href="#404">404: </a> <span class="php-var">$prefixe</span> =&amp; <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'cache_id_prefixe'</span>];
</span><span id="405" class="l"><a class="l" href="#405">405: </a> <span class="php-var">$prefixe_longueur</span> = <span class="php-keyword2">strlen</span>(<span class="php-var">$prefixe</span>);
</span><span id="406" class="l"><a class="l" href="#406">406: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$ids</span> <span class="php-keyword1">as</span> &amp;<span class="php-var">$id</span>) {
</span><span id="407" class="l"><a class="l" href="#407">407: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">strpos</span>(<span class="php-var">$id</span>, <span class="php-var">$prefixe</span>) === <span class="php-num">0</span>) {
</span><span id="408" class="l"><a class="l" href="#408">408: </a> <span class="php-var">$id</span> = <span class="php-keyword2">substr</span>(<span class="php-var">$id</span>, <span class="php-var">$prefixe_longueur</span>);
</span><span id="409" class="l"><a class="l" href="#409">409: </a> }
</span><span id="410" class="l"><a class="l" href="#410">410: </a> }
</span><span id="411" class="l"><a class="l" href="#411">411: </a> }
</span><span id="412" class="l"><a class="l" href="#412">412: </a> <span class="php-keyword1">return</span> <span class="php-var">$ids</span>;
</span><span id="413" class="l"><a class="l" href="#413">413: </a> }
</span><span id="414" class="l"><a class="l" href="#414">414: </a>
</span><span id="415" class="l"><a class="l" href="#415">415: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_controlerEcriture" href="#_controlerEcriture">controlerEcriture</a>(<span class="php-var">$id</span>, <span class="php-var">$donnees_avant_ecriture</span>) {
</span><span id="416" class="l"><a class="l" href="#416">416: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="417" class="l"><a class="l" href="#417">417: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'controle_ecriture'</span>]) {
</span><span id="418" class="l"><a class="l" href="#418">418: </a> <span class="php-var">$donnees_apres_ecriture</span> = <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'charger'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$id</span>, <span class="php-keyword1">true</span>));
</span><span id="419" class="l"><a class="l" href="#419">419: </a> <span class="php-keyword1">if</span> (<span class="php-var">$donnees_avant_ecriture</span> != <span class="php-var">$donnees_apres_ecriture</span>) {
</span><span id="420" class="l"><a class="l" href="#420">420: </a> <span class="php-var">$this</span>-&gt;executerMethodeStockage(<span class="php-quote">'supprimer'</span>, <span class="php-keyword1">array</span>(<span class="php-var">$id</span>));
</span><span id="421" class="l"><a class="l" href="#421">421: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">false</span>;
</span><span id="422" class="l"><a class="l" href="#422">422: </a> }
</span><span id="423" class="l"><a class="l" href="#423">423: </a> }
</span><span id="424" class="l"><a class="l" href="#424">424: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="425" class="l"><a class="l" href="#425">425: </a> }
</span><span id="426" class="l"><a class="l" href="#426">426: </a>
</span><span id="427" class="l"><a class="l" href="#427">427: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_deserialiserAutomatiquement" href="#_deserialiserAutomatiquement">deserialiserAutomatiquement</a>(<span class="php-var">$donnees</span>) {
</span><span id="428" class="l"><a class="l" href="#428">428: </a> <span class="php-keyword1">if</span> (<span class="php-var">$donnees</span> !== <span class="php-keyword1">false</span> &amp;&amp; <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'serialisation_auto'</span>]) {
</span><span id="429" class="l"><a class="l" href="#429">429: </a> <span class="php-comment">// we need to unserialize before sending the result</span>
</span><span id="430" class="l"><a class="l" href="#430">430: </a> <span class="php-var">$donnees</span> = <span class="php-keyword2">unserialize</span>(<span class="php-var">$donnees</span>);
</span><span id="431" class="l"><a class="l" href="#431">431: </a> }
</span><span id="432" class="l"><a class="l" href="#432">432: </a> <span class="php-keyword1">return</span> <span class="php-var">$donnees</span>;
</span><span id="433" class="l"><a class="l" href="#433">433: </a> }
</span><span id="434" class="l"><a class="l" href="#434">434: </a>
</span><span id="435" class="l"><a class="l" href="#435">435: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_serialiserAutomatiquement" href="#_serialiserAutomatiquement">serialiserAutomatiquement</a>(<span class="php-var">$donnees</span>) {
</span><span id="436" class="l"><a class="l" href="#436">436: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'serialisation_auto'</span>]) {
</span><span id="437" class="l"><a class="l" href="#437">437: </a> <span class="php-comment">// we need to serialize datas before storing them</span>
</span><span id="438" class="l"><a class="l" href="#438">438: </a> <span class="php-var">$donnees</span> = <span class="php-keyword2">serialize</span>(<span class="php-var">$donnees</span>);
</span><span id="439" class="l"><a class="l" href="#439">439: </a> } <span class="php-keyword1">else</span> {
</span><span id="440" class="l"><a class="l" href="#440">440: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_string</span>(<span class="php-var">$donnees</span>)) {
</span><span id="441" class="l"><a class="l" href="#441">441: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Les données doivent être une chaîne de caractères ou vous devez activez l'option serialisation_auto = true&quot;</span>, E_USER_WARNING);
</span><span id="442" class="l"><a class="l" href="#442">442: </a> }
</span><span id="443" class="l"><a class="l" href="#443">443: </a> }
</span><span id="444" class="l"><a class="l" href="#444">444: </a> <span class="php-keyword1">return</span> <span class="php-var">$donnees</span>;
</span><span id="445" class="l"><a class="l" href="#445">445: </a> }
</span><span id="446" class="l"><a class="l" href="#446">446: </a>
</span><span id="447" class="l"><a class="l" href="#447">447: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_nettoyerAutomatiquement" href="#_nettoyerAutomatiquement">nettoyerAutomatiquement</a>() {
</span><span id="448" class="l"><a class="l" href="#448">448: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'nettoyage_auto'</span>] &gt; <span class="php-num">0</span>) {
</span><span id="449" class="l"><a class="l" href="#449">449: </a> <span class="php-var">$rand</span> = <span class="php-keyword2">rand</span>(<span class="php-num">1</span>, <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'nettoyage_auto'</span>]);
</span><span id="450" class="l"><a class="l" href="#450">450: </a> <span class="php-keyword1">if</span> (<span class="php-var">$rand</span> == <span class="php-num">1</span>) {
</span><span id="451" class="l"><a class="l" href="#451">451: </a> <span class="php-var">$this</span>-&gt;nettoyer(self::NETTOYAGE_MODE_EXPIRATION);
</span><span id="452" class="l"><a class="l" href="#452">452: </a> }
</span><span id="453" class="l"><a class="l" href="#453">453: </a> }
</span><span id="454" class="l"><a class="l" href="#454">454: </a> }
</span><span id="455" class="l"><a class="l" href="#455">455: </a>
</span><span id="456" class="l"><a class="l" href="#456">456: </a> <span class="php-comment">/**
</span></span><span id="457" class="l"><a class="l" href="#457">457: </a><span class="php-comment"> * Valide un identifiant de cache ou un tag (securité, nom de fichiers fiables, préfixes réservés...)
</span></span><span id="458" class="l"><a class="l" href="#458">458: </a><span class="php-comment"> *
</span></span><span id="459" class="l"><a class="l" href="#459">459: </a><span class="php-comment"> * @param string $chaine Identificant de cache ou tag
</span></span><span id="460" class="l"><a class="l" href="#460">460: </a><span class="php-comment"> * @return void
</span></span><span id="461" class="l"><a class="l" href="#461">461: </a><span class="php-comment"> */</span>
</span><span id="462" class="l"><a class="l" href="#462">462: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_validerIdOuTag" href="#_validerIdOuTag">validerIdOuTag</a>(<span class="php-var">$chaine</span>) {
</span><span id="463" class="l"><a class="l" href="#463">463: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_string</span>(<span class="php-var">$chaine</span>)) {
</span><span id="464" class="l"><a class="l" href="#464">464: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">'Id ou tag invalide : doit être une chaîne de caractères'</span>, E_USER_ERROR);
</span><span id="465" class="l"><a class="l" href="#465">465: </a> }
</span><span id="466" class="l"><a class="l" href="#466">466: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">substr</span>(<span class="php-var">$chaine</span>, <span class="php-num">0</span>, <span class="php-num">9</span>) == <span class="php-quote">'internal-'</span>) {
</span><span id="467" class="l"><a class="l" href="#467">467: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">'&quot;internal-*&quot; identifiants ou tags sont réservés'</span>, E_USER_WARNING);
</span><span id="468" class="l"><a class="l" href="#468">468: </a> }
</span><span id="469" class="l"><a class="l" href="#469">469: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">preg_match</span>(<span class="php-quote">'~^[a-zA-Z0-9_]+$~D'</span>, <span class="php-var">$chaine</span>)) {
</span><span id="470" class="l"><a class="l" href="#470">470: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Id ou tag invalide '</span><span class="php-var">$chaine</span><span class="php-quote">' : doit contenir seulement [a-zA-Z0-9_]&quot;</span>, E_USER_WARNING);
</span><span id="471" class="l"><a class="l" href="#471">471: </a> }
</span><span id="472" class="l"><a class="l" href="#472">472: </a> }
</span><span id="473" class="l"><a class="l" href="#473">473: </a>
</span><span id="474" class="l"><a class="l" href="#474">474: </a> <span class="php-comment">/**
</span></span><span id="475" class="l"><a class="l" href="#475">475: </a><span class="php-comment"> * Valide un tableau de tags (securité, nom de fichiers fiables, préfixes réservés...)
</span></span><span id="476" class="l"><a class="l" href="#476">476: </a><span class="php-comment"> *
</span></span><span id="477" class="l"><a class="l" href="#477">477: </a><span class="php-comment"> * @param array $tags tableau de tags
</span></span><span id="478" class="l"><a class="l" href="#478">478: </a><span class="php-comment"> * @return void
</span></span><span id="479" class="l"><a class="l" href="#479">479: </a><span class="php-comment"> */</span>
</span><span id="480" class="l"><a class="l" href="#480">480: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_validerTableauDeTags" href="#_validerTableauDeTags">validerTableauDeTags</a>(<span class="php-var">$tags</span>) {
</span><span id="481" class="l"><a class="l" href="#481">481: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_array</span>(<span class="php-var">$tags</span>)) {
</span><span id="482" class="l"><a class="l" href="#482">482: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Tableau de tags invalide : doit être un tableau 'array'&quot;</span>, E_USER_WARNING);
</span><span id="483" class="l"><a class="l" href="#483">483: </a> }
</span><span id="484" class="l"><a class="l" href="#484">484: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tags</span> <span class="php-keyword1">as</span> <span class="php-var">$tag</span>) {
</span><span id="485" class="l"><a class="l" href="#485">485: </a> self::validerIdOuTag(<span class="php-var">$tag</span>);
</span><span id="486" class="l"><a class="l" href="#486">486: </a> }
</span><span id="487" class="l"><a class="l" href="#487">487: </a> <span class="php-keyword2">reset</span>(<span class="php-var">$tags</span>);
</span><span id="488" class="l"><a class="l" href="#488">488: </a> }
</span><span id="489" class="l"><a class="l" href="#489">489: </a>
</span><span id="490" class="l"><a class="l" href="#490">490: </a> <span class="php-comment">/**
</span></span><span id="491" class="l"><a class="l" href="#491">491: </a><span class="php-comment"> * Calcule et retourne le timestamp d'expiration
</span></span><span id="492" class="l"><a class="l" href="#492">492: </a><span class="php-comment"> *
</span></span><span id="493" class="l"><a class="l" href="#493">493: </a><span class="php-comment"> * @return int timestamp d'expiration (unix timestamp)
</span></span><span id="494" class="l"><a class="l" href="#494">494: </a><span class="php-comment"> */</span>
</span><span id="495" class="l"><a class="l" href="#495">495: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getTimestampExpiration" href="#_getTimestampExpiration">getTimestampExpiration</a>(<span class="php-var">$duree_de_vie</span>) {
</span><span id="496" class="l"><a class="l" href="#496">496: </a> <span class="php-keyword1">if</span> (<span class="php-var">$duree_de_vie</span> === <span class="php-keyword1">false</span>) {
</span><span id="497" class="l"><a class="l" href="#497">497: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'duree_de_vie'</span>]) &amp;&amp; <span class="php-keyword2">is_int</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'duree_de_vie'</span>])) {
</span><span id="498" class="l"><a class="l" href="#498">498: </a> <span class="php-var">$duree_de_vie</span> = (int) <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'duree_de_vie'</span>];
</span><span id="499" class="l"><a class="l" href="#499">499: </a> } <span class="php-keyword1">else</span> {
</span><span id="500" class="l"><a class="l" href="#500">500: </a> <span class="php-var">$duree_de_vie</span> = <span class="php-num">3600</span>;
</span><span id="501" class="l"><a class="l" href="#501">501: </a> }
</span><span id="502" class="l"><a class="l" href="#502">502: </a> }
</span><span id="503" class="l"><a class="l" href="#503">503: </a> <span class="php-var">$timestamp</span> = (<span class="php-var">$duree_de_vie</span> === <span class="php-keyword1">null</span>) ? <span class="php-num">9999999999</span> : (<span class="php-keyword2">time</span>() + <span class="php-var">$duree_de_vie</span>);
</span><span id="504" class="l"><a class="l" href="#504">504: </a> <span class="php-keyword1">return</span> <span class="php-var">$timestamp</span>;
</span><span id="505" class="l"><a class="l" href="#505">505: </a> }
</span><span id="506" class="l"><a class="l" href="#506">506: </a>
</span><span id="507" class="l"><a class="l" href="#507">507: </a></span>}</code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/404.html
New file
0,0 → 1,131
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>Page not found | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheFichier.html">CacheFichier</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-CacheSqlite.html">CacheSqlite</a></li>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
<h3>Exceptions</h3>
<ul>
<li><a href="class-Exception.html">Exception</a></li>
</ul>
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<span>Package</span> </li>
<li>
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content">
<h1>Page not found</h1>
<p>The requested page could not be found.</p>
<p>You have probably clicked on a link that is outdated and points to a page that does not exist any more or you have made an typing error in the address.</p>
<p>To continue please try to find requested page in the menu, take a look at <a href="tree.html">the tree view</a> of the whole project or use search field on the top.</p>
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-GestionnaireException.html
New file
0,0 → 1,363
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File GestionnaireException.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li class="active"><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-GestionnaireException.html" title="Summary of GestionnaireException"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe de gestion des exceptions.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * C'est un Singleton.
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> *
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @package Framework
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @author Aurélien PERONNET &lt;aurelien@tela-botanica.org&gt;
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jmp@tela-botanica.org&gt;
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @version $Id: GestionnaireException.php 367 2011-10-03 12:40:48Z jpm $$
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> *
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> */</span>
</span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-keyword1">class</span> <a id="GestionnaireException" href="#GestionnaireException">GestionnaireException</a> {
</span><span id="19" class="l"><a class="l" href="#19"> 19: </a>
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a> <span class="php-keyword1">const</span> <a id="MODE_CLI" href="#MODE_CLI">MODE_CLI</a> = <span class="php-quote">'cli'</span>;
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a>
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a> <span class="php-comment">/** Liste des exceptions enregistrées */</span>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$exceptions" href="#$exceptions">$exceptions</a></span> = <span class="php-keyword1">array</span>();
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a>
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a> <span class="php-comment">/** Détermine si l'on affiche ou non le contexte */</span>
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$contexte" href="#$contexte">$contexte</a></span> = <span class="php-keyword1">false</span>;
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a>
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-comment">/** Détermine si l'on loggue ou non les erreurs */</span>
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$logger" href="#$logger">$logger</a></span> = <span class="php-keyword1">false</span>;
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a>
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> <span class="php-comment">/** Détermine si l'affichage des erreurs est forcé (true) ou pas (false) à la destruction de la classe */</span>
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$afficher" href="#$afficher">$afficher</a></span> = <span class="php-keyword1">false</span>;
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a>
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> <span class="php-comment">/** Definit si php est lancé en ligne de commande ou en mode serveur */</span>
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$mode" href="#$mode">$mode</a></span> = <span class="php-keyword1">null</span> ;
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a>
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> <span class="php-comment">/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/</span>
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$parametres_obligatoires" href="#$parametres_obligatoires">$parametres_obligatoires</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'debogage'</span>, <span class="php-quote">'debogage_contexte'</span>, <span class="php-quote">'log_debogage'</span>);
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a>
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> <span class="php-comment">/** Initialise le Gestionnaire d'exceptions et d'erreur sans tenir comptes des paramêtres de config. */</span>
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_initialiser" href="#_initialiser">initialiser</a>() {
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a> self::<span class="php-var">$mode</span> = <span class="php-keyword2">php_sapi_name</span>();
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a> <span class="php-comment">// Désactivation des balises HTML dans les messages d'erreur de PHP en mode ligne de commande</span>
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a> <span class="php-keyword1">if</span> (self::<span class="php-var">$mode</span> == self::MODE_CLI) {
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a> <span class="php-keyword2">ini_set</span>(<span class="php-quote">'html_errors'</span>, <span class="php-num">0</span>);
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> }
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a>
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-keyword2">set_exception_handler</span>(<span class="php-keyword1">array</span>(<span class="php-keyword2">get_class</span>(),<span class="php-quote">'gererException'</span>));
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-keyword2">set_error_handler</span>(<span class="php-keyword1">array</span>(<span class="php-keyword2">get_class</span>(),<span class="php-quote">'gererErreur'</span>));
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> }
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a>
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> <span class="php-comment">/** Configure le Gestionnaire d'exceptions et d'erreur à partir des paramêtres de config. */</span>
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_configurer" href="#_configurer">configurer</a>() {
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> Config::verifierPresenceParametres(self::<span class="php-var">$parametres_obligatoires</span>);
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> self::<span class="php-var">$contexte</span> = Config::get(<span class="php-quote">'debogage_contexte'</span>);
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> self::<span class="php-var">$logger</span> = Config::get(<span class="php-quote">'log_debogage'</span>);
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> self::<span class="php-var">$afficher</span> = Config::get(<span class="php-quote">'debogage'</span>);
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> }
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a>
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> <span class="php-comment">/**
</span></span><span id="61" class="l"><a class="l" href="#61"> 61: </a><span class="php-comment"> * Renvoie le nombre d'exceptions et d'erreurs levées.
</span></span><span id="62" class="l"><a class="l" href="#62"> 62: </a><span class="php-comment"> * @see getExceptions() pour obtenir les exceptions formatées.
</span></span><span id="63" class="l"><a class="l" href="#63"> 63: </a><span class="php-comment"> * @since 0.3
</span></span><span id="64" class="l"><a class="l" href="#64"> 64: </a><span class="php-comment"> * @return int le nombre d'exception actuellement levées
</span></span><span id="65" class="l"><a class="l" href="#65"> 65: </a><span class="php-comment"> */</span>
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getExceptionsNbre" href="#_getExceptionsNbre">getExceptionsNbre</a>() {
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">count</span>(self::<span class="php-var">$exceptions</span>);
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a> }
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a>
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a> <span class="php-comment">/**
</span></span><span id="71" class="l"><a class="l" href="#71"> 71: </a><span class="php-comment"> * Renvoie le booleen définissant si l'on affiche le contexte ou non
</span></span><span id="72" class="l"><a class="l" href="#72"> 72: </a><span class="php-comment"> * @return bool true si on affiche le contexte sinon false.
</span></span><span id="73" class="l"><a class="l" href="#73"> 73: </a><span class="php-comment"> */</span>
</span><span id="74" class="l"><a class="l" href="#74"> 74: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getContexte" href="#_getContexte">getContexte</a>() {
</span><span id="75" class="l"><a class="l" href="#75"> 75: </a> <span class="php-keyword1">return</span> self::<span class="php-var">$contexte</span>;
</span><span id="76" class="l"><a class="l" href="#76"> 76: </a> }
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a>
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> <span class="php-comment">/**
</span></span><span id="79" class="l"><a class="l" href="#79"> 79: </a><span class="php-comment"> * Definit si l'on veut afficher le contexte ou non
</span></span><span id="80" class="l"><a class="l" href="#80"> 80: </a><span class="php-comment"> * @param bool true si on veut afficher le contexte, false sinon, par défaut vaut false
</span></span><span id="81" class="l"><a class="l" href="#81"> 81: </a><span class="php-comment"> */</span>
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_setContexte" href="#_setContexte">setContexte</a>(<span class="php-var">$contexte</span>) {
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a> self::<span class="php-var">$contexte</span> = <span class="php-var">$contexte</span>;
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> }
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a>
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a> <span class="php-comment">/**
</span></span><span id="87" class="l"><a class="l" href="#87"> 87: </a><span class="php-comment"> * Fonction de gestion des exceptions, remplace le handler par défaut.
</span></span><span id="88" class="l"><a class="l" href="#88"> 88: </a><span class="php-comment"> * Si une boucle génère de multiple exception (ou erreur) identique une seule sera stockée.
</span></span><span id="89" class="l"><a class="l" href="#89"> 89: </a><span class="php-comment"> * @param Exception $e l'exception à traiter
</span></span><span id="90" class="l"><a class="l" href="#90"> 90: </a><span class="php-comment"> */</span>
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_gererException" href="#_gererException">gererException</a>(Exception <span class="php-var">$e</span>) {
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> <span class="php-var">$cle</span> = <span class="php-keyword2">hash</span>(<span class="php-quote">'md5'</span>, <span class="php-var">$e</span>-&gt;getMessage().<span class="php-quote">'-'</span>.<span class="php-var">$e</span>-&gt;getFile().<span class="php-quote">'-'</span>.<span class="php-var">$e</span>-&gt;getLine());
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword1">isset</span>(self::<span class="php-var">$exceptions</span>[<span class="php-var">$cle</span>])) {
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> self::<span class="php-var">$exceptions</span>[<span class="php-var">$cle</span>] = <span class="php-var">$e</span>;
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> self::loggerException(<span class="php-var">$e</span>);
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> }
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> }
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a>
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> <span class="php-comment">/**
</span></span><span id="100" class="l"><a class="l" href="#100">100: </a><span class="php-comment"> * Gère les erreurs en les convertissant en exceptions (remplace la fonction gestion d'erreurs native de php)
</span></span><span id="101" class="l"><a class="l" href="#101">101: </a><span class="php-comment"> * @param int $niveau le niveau de l'erreur
</span></span><span id="102" class="l"><a class="l" href="#102">102: </a><span class="php-comment"> * @param string $message le message associé à l'erreur
</span></span><span id="103" class="l"><a class="l" href="#103">103: </a><span class="php-comment"> * @param string $fichier le nom du fichier où l'erreur s'est produite
</span></span><span id="104" class="l"><a class="l" href="#104">104: </a><span class="php-comment"> * @param int $ligne la ligne où l'erreur s'est produite
</span></span><span id="105" class="l"><a class="l" href="#105">105: </a><span class="php-comment"> * @param string $contexte le contexte associé à l'erreur
</span></span><span id="106" class="l"><a class="l" href="#106">106: </a><span class="php-comment"> */</span>
</span><span id="107" class="l"><a class="l" href="#107">107: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_gererErreur" href="#_gererErreur">gererErreur</a>(<span class="php-var">$niveau</span>, <span class="php-var">$message</span>, <span class="php-var">$fichier</span>, <span class="php-var">$ligne</span>, <span class="php-var">$contexte</span>){
</span><span id="108" class="l"><a class="l" href="#108">108: </a> <span class="php-comment">// Si un rapport d'erreur existe, création d'une exception</span>
</span><span id="109" class="l"><a class="l" href="#109">109: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">error_reporting</span>() != <span class="php-num">0</span>) {
</span><span id="110" class="l"><a class="l" href="#110">110: </a> <span class="php-var">$e</span> = <span class="php-keyword1">new</span> ErrorException(<span class="php-var">$message</span>, <span class="php-num">0</span>, <span class="php-var">$niveau</span>, <span class="php-var">$fichier</span>, <span class="php-var">$ligne</span>);
</span><span id="111" class="l"><a class="l" href="#111">111: </a> self::gererException(<span class="php-var">$e</span>);
</span><span id="112" class="l"><a class="l" href="#112">112: </a> }
</span><span id="113" class="l"><a class="l" href="#113">113: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">null</span>;
</span><span id="114" class="l"><a class="l" href="#114">114: </a> }
</span><span id="115" class="l"><a class="l" href="#115">115: </a>
</span><span id="116" class="l"><a class="l" href="#116">116: </a> <span class="php-comment">/**
</span></span><span id="117" class="l"><a class="l" href="#117">117: </a><span class="php-comment"> * Renvoie les exceptions au format (X)HTML ou bien au format texte suivant le mode d'utilisation de PHP.
</span></span><span id="118" class="l"><a class="l" href="#118">118: </a><span class="php-comment"> * @since 0.3
</span></span><span id="119" class="l"><a class="l" href="#119">119: </a><span class="php-comment"> * @deprecated
</span></span><span id="120" class="l"><a class="l" href="#120">120: </a><span class="php-comment"> * @see getExceptionsFormatees()
</span></span><span id="121" class="l"><a class="l" href="#121">121: </a><span class="php-comment"> * @return string les exceptions formatées en texte ou (X)HTML.
</span></span><span id="122" class="l"><a class="l" href="#122">122: </a><span class="php-comment"> */</span>
</span><span id="123" class="l"><a class="l" href="#123">123: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getExceptions" href="#_getExceptions">getExceptions</a>() {
</span><span id="124" class="l"><a class="l" href="#124">124: </a> <span class="php-keyword1">return</span> self::getExceptionsFormatees();
</span><span id="125" class="l"><a class="l" href="#125">125: </a> }
</span><span id="126" class="l"><a class="l" href="#126">126: </a>
</span><span id="127" class="l"><a class="l" href="#127">127: </a> <span class="php-comment">/**
</span></span><span id="128" class="l"><a class="l" href="#128">128: </a><span class="php-comment"> * Renvoie les exceptions au format (X)HTML ou bien au format texte suivant le mode d'utilisation de PHP.
</span></span><span id="129" class="l"><a class="l" href="#129">129: </a><span class="php-comment"> * @since 0.3
</span></span><span id="130" class="l"><a class="l" href="#130">130: </a><span class="php-comment"> * @return string les exceptions formatées en texte ou (X)HTML.
</span></span><span id="131" class="l"><a class="l" href="#131">131: </a><span class="php-comment"> */</span>
</span><span id="132" class="l"><a class="l" href="#132">132: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getExceptionsFormatees" href="#_getExceptionsFormatees">getExceptionsFormatees</a>() {
</span><span id="133" class="l"><a class="l" href="#133">133: </a> <span class="php-var">$retour</span> = <span class="php-quote">''</span>;
</span><span id="134" class="l"><a class="l" href="#134">134: </a> <span class="php-keyword1">if</span> (self::getExceptionsNbre() &gt; <span class="php-num">0</span>) {
</span><span id="135" class="l"><a class="l" href="#135">135: </a> <span class="php-keyword1">foreach</span> (self::<span class="php-var">$exceptions</span> <span class="php-keyword1">as</span> <span class="php-var">$cle</span> =&gt; <span class="php-var">$e</span>) {
</span><span id="136" class="l"><a class="l" href="#136">136: </a> <span class="php-keyword1">switch</span> (self::<span class="php-var">$mode</span>) {
</span><span id="137" class="l"><a class="l" href="#137">137: </a> <span class="php-keyword1">case</span> self::MODE_CLI :
</span><span id="138" class="l"><a class="l" href="#138">138: </a> <span class="php-var">$retour</span> .= self::formaterExceptionTxt(<span class="php-var">$e</span>);
</span><span id="139" class="l"><a class="l" href="#139">139: </a> <span class="php-keyword1">break</span>;
</span><span id="140" class="l"><a class="l" href="#140">140: </a> <span class="php-keyword1">default</span>:
</span><span id="141" class="l"><a class="l" href="#141">141: </a> <span class="php-var">$retour</span> .= self::formaterExceptionXhtml(<span class="php-var">$e</span>);
</span><span id="142" class="l"><a class="l" href="#142">142: </a> }
</span><span id="143" class="l"><a class="l" href="#143">143: </a> <span class="php-comment">// Nous vidons le tableau des exceptions au fur et à mesure pour éviter le réaffichage avec le destructeur.</span>
</span><span id="144" class="l"><a class="l" href="#144">144: </a> <span class="php-keyword1">unset</span>(self::<span class="php-var">$exceptions</span>[<span class="php-var">$cle</span>]);
</span><span id="145" class="l"><a class="l" href="#145">145: </a> }
</span><span id="146" class="l"><a class="l" href="#146">146: </a> }
</span><span id="147" class="l"><a class="l" href="#147">147: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="148" class="l"><a class="l" href="#148">148: </a> }
</span><span id="149" class="l"><a class="l" href="#149">149: </a>
</span><span id="150" class="l"><a class="l" href="#150">150: </a> <span class="php-comment">/**
</span></span><span id="151" class="l"><a class="l" href="#151">151: </a><span class="php-comment"> * Renvoie le tableau d'objets Exception générées par le script PHP triées du niveau de sévérité le plus élevé au moins élevé.
</span></span><span id="152" class="l"><a class="l" href="#152">152: </a><span class="php-comment"> * Format du tableau :
</span></span><span id="153" class="l"><a class="l" href="#153">153: </a><span class="php-comment"> * array{sévérité_1 = array{Exception1, Exception2, Exception3,...}, sévérité_1 = array{Exception1, Exception2, ...}, ...};
</span></span><span id="154" class="l"><a class="l" href="#154">154: </a><span class="php-comment"> * ATTENTION : si vous utilisez cette méthode, c'est à vous de gérer l'affichage des Exceptions. Le gestionnaire d'exception
</span></span><span id="155" class="l"><a class="l" href="#155">155: </a><span class="php-comment"> * n'enverra plus rien au navigateur ou à la console.
</span></span><span id="156" class="l"><a class="l" href="#156">156: </a><span class="php-comment"> * @since 0.3
</span></span><span id="157" class="l"><a class="l" href="#157">157: </a><span class="php-comment"> * @return array le tableau trié d'objet Exception.
</span></span><span id="158" class="l"><a class="l" href="#158">158: </a><span class="php-comment"> */</span>
</span><span id="159" class="l"><a class="l" href="#159">159: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getExceptionsTriees" href="#_getExceptionsTriees">getExceptionsTriees</a>() {
</span><span id="160" class="l"><a class="l" href="#160">160: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">array</span>();
</span><span id="161" class="l"><a class="l" href="#161">161: </a> <span class="php-keyword1">if</span> (self::getExceptionsNbre() &gt; <span class="php-num">0</span>) {
</span><span id="162" class="l"><a class="l" href="#162">162: </a> <span class="php-keyword1">foreach</span> (self::<span class="php-var">$exceptions</span> <span class="php-keyword1">as</span> <span class="php-var">$cle</span> =&gt; <span class="php-var">$e</span>) {
</span><span id="163" class="l"><a class="l" href="#163">163: </a> <span class="php-var">$retour</span>[<span class="php-var">$e</span>-&gt;getSeverity()][] = <span class="php-var">$e</span>;
</span><span id="164" class="l"><a class="l" href="#164">164: </a> <span class="php-comment">// Nous vidons le tableau des exceptions au fur et à mesure pour éviter le réaffichage avec le destructeur.</span>
</span><span id="165" class="l"><a class="l" href="#165">165: </a> <span class="php-keyword1">unset</span>(self::<span class="php-var">$exceptions</span>[<span class="php-var">$cle</span>]);
</span><span id="166" class="l"><a class="l" href="#166">166: </a> }
</span><span id="167" class="l"><a class="l" href="#167">167: </a> <span class="php-keyword2">ksort</span>(<span class="php-var">$retour</span>);
</span><span id="168" class="l"><a class="l" href="#168">168: </a> }
</span><span id="169" class="l"><a class="l" href="#169">169: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="170" class="l"><a class="l" href="#170">170: </a> }
</span><span id="171" class="l"><a class="l" href="#171">171: </a>
</span><span id="172" class="l"><a class="l" href="#172">172: </a> <span class="php-comment">/**
</span></span><span id="173" class="l"><a class="l" href="#173">173: </a><span class="php-comment"> * Logue une exception donnée sous une forme lisible si self::logger vaut true.
</span></span><span id="174" class="l"><a class="l" href="#174">174: </a><span class="php-comment"> * @param Exception $e l'exception à logger
</span></span><span id="175" class="l"><a class="l" href="#175">175: </a><span class="php-comment"> */</span>
</span><span id="176" class="l"><a class="l" href="#176">176: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_loggerException" href="#_loggerException">loggerException</a>(Exception <span class="php-var">$e</span>) {
</span><span id="177" class="l"><a class="l" href="#177">177: </a> <span class="php-keyword1">if</span> (self::<span class="php-var">$logger</span>) {
</span><span id="178" class="l"><a class="l" href="#178">178: </a> <span class="php-var">$message</span> = self::formaterExceptionTxt(<span class="php-var">$e</span>);
</span><span id="179" class="l"><a class="l" href="#179">179: </a> <span class="php-keyword2">Log</span>::ajouterEntree(<span class="php-quote">'erreurs'</span>, <span class="php-var">$message</span>);
</span><span id="180" class="l"><a class="l" href="#180">180: </a> }
</span><span id="181" class="l"><a class="l" href="#181">181: </a> }
</span><span id="182" class="l"><a class="l" href="#182">182: </a>
</span><span id="183" class="l"><a class="l" href="#183">183: </a> <span class="php-comment">/**
</span></span><span id="184" class="l"><a class="l" href="#184">184: </a><span class="php-comment"> * Formate en texte une exception passée en paramètre.
</span></span><span id="185" class="l"><a class="l" href="#185">185: </a><span class="php-comment"> * @since 0.3
</span></span><span id="186" class="l"><a class="l" href="#186">186: </a><span class="php-comment"> * @param Exception l'exception à formater.
</span></span><span id="187" class="l"><a class="l" href="#187">187: </a><span class="php-comment"> */</span>
</span><span id="188" class="l"><a class="l" href="#188">188: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_formaterExceptionDebug" href="#_formaterExceptionDebug">formaterExceptionDebug</a>(Exception <span class="php-var">$e</span>) {
</span><span id="189" class="l"><a class="l" href="#189">189: </a> <span class="php-var">$txt</span> = <span class="php-quote">''</span>;
</span><span id="190" class="l"><a class="l" href="#190">190: </a> <span class="php-keyword1">if</span> (<span class="php-var">$e</span>-&gt;getSeverity() == E_USER_NOTICE) {
</span><span id="191" class="l"><a class="l" href="#191">191: </a> <span class="php-var">$txt</span> = <span class="php-var">$e</span>-&gt;getMessage();
</span><span id="192" class="l"><a class="l" href="#192">192: </a> } <span class="php-keyword1">else</span> {
</span><span id="193" class="l"><a class="l" href="#193">193: </a> <span class="php-var">$txt</span> = self::formaterExceptionTxt(<span class="php-var">$e</span>);
</span><span id="194" class="l"><a class="l" href="#194">194: </a> }
</span><span id="195" class="l"><a class="l" href="#195">195: </a> <span class="php-keyword1">return</span> <span class="php-var">$txt</span>;
</span><span id="196" class="l"><a class="l" href="#196">196: </a> }
</span><span id="197" class="l"><a class="l" href="#197">197: </a>
</span><span id="198" class="l"><a class="l" href="#198">198: </a> <span class="php-comment">/**
</span></span><span id="199" class="l"><a class="l" href="#199">199: </a><span class="php-comment"> * Formate en texte une exception passée en paramètre.
</span></span><span id="200" class="l"><a class="l" href="#200">200: </a><span class="php-comment"> * @since 0.3
</span></span><span id="201" class="l"><a class="l" href="#201">201: </a><span class="php-comment"> * @param Exception l'exception à formater.
</span></span><span id="202" class="l"><a class="l" href="#202">202: </a><span class="php-comment"> */</span>
</span><span id="203" class="l"><a class="l" href="#203">203: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_formaterExceptionTxt" href="#_formaterExceptionTxt">formaterExceptionTxt</a>(Exception <span class="php-var">$e</span>) {
</span><span id="204" class="l"><a class="l" href="#204">204: </a> <span class="php-var">$message</span> = <span class="php-quote">''</span>;
</span><span id="205" class="l"><a class="l" href="#205">205: </a> <span class="php-var">$message</span> .= <span class="php-var">$e</span>-&gt;getMessage().<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="206" class="l"><a class="l" href="#206">206: </a> <span class="php-var">$message</span> .= <span class="php-quote">'Fichier : '</span>.<span class="php-var">$e</span>-&gt;getFile().<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="207" class="l"><a class="l" href="#207">207: </a> <span class="php-var">$message</span> .= <span class="php-quote">'Ligne : '</span>.<span class="php-var">$e</span>-&gt;getLine().<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="208" class="l"><a class="l" href="#208">208: </a> <span class="php-keyword1">if</span> (self::getContexte()) {
</span><span id="209" class="l"><a class="l" href="#209">209: </a> <span class="php-var">$message</span> .= <span class="php-quote">'Contexte : '</span>.<span class="php-quote">&quot;\n&quot;</span>.<span class="php-keyword2">print_r</span>(<span class="php-var">$e</span>-&gt;getTraceAsString(), <span class="php-keyword1">true</span>).<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="210" class="l"><a class="l" href="#210">210: </a> }
</span><span id="211" class="l"><a class="l" href="#211">211: </a> <span class="php-var">$message</span> .= <span class="php-quote">&quot;\n&quot;</span>;
</span><span id="212" class="l"><a class="l" href="#212">212: </a> <span class="php-keyword1">return</span> <span class="php-var">$message</span>;
</span><span id="213" class="l"><a class="l" href="#213">213: </a> }
</span><span id="214" class="l"><a class="l" href="#214">214: </a>
</span><span id="215" class="l"><a class="l" href="#215">215: </a> <span class="php-comment">/**
</span></span><span id="216" class="l"><a class="l" href="#216">216: </a><span class="php-comment"> * Formate en (X)HTML une exception passée en paramètre.
</span></span><span id="217" class="l"><a class="l" href="#217">217: </a><span class="php-comment"> * @since 0.3
</span></span><span id="218" class="l"><a class="l" href="#218">218: </a><span class="php-comment"> * @param Exception l'exception à formater.
</span></span><span id="219" class="l"><a class="l" href="#219">219: </a><span class="php-comment"> */</span>
</span><span id="220" class="l"><a class="l" href="#220">220: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_formaterExceptionXhtml" href="#_formaterExceptionXhtml">formaterExceptionXhtml</a>(Exception <span class="php-var">$e</span>) {
</span><span id="221" class="l"><a class="l" href="#221">221: </a> <span class="php-var">$message</span> = <span class="php-quote">''</span>;
</span><span id="222" class="l"><a class="l" href="#222">222: </a> <span class="php-var">$message</span> .= <span class="php-quote">'&lt;div class=&quot;debogage&quot;&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="223" class="l"><a class="l" href="#223">223: </a> <span class="php-var">$message</span> .= <span class="php-var">$e</span>-&gt;getMessage().<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="224" class="l"><a class="l" href="#224">224: </a> <span class="php-var">$message</span> .= <span class="php-quote">'&lt;span class=&quot;debogage_fichier&quot;&gt;'</span>.<span class="php-quote">'Fichier : '</span>.<span class="php-var">$e</span>-&gt;getFile().<span class="php-quote">'&lt;/span&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="225" class="l"><a class="l" href="#225">225: </a> <span class="php-var">$message</span> .= <span class="php-quote">'&lt;span class=&quot;debogage_ligne&quot;&gt;'</span>.<span class="php-quote">'Ligne : '</span>.<span class="php-var">$e</span>-&gt;getLine().<span class="php-quote">'&lt;/span&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="226" class="l"><a class="l" href="#226">226: </a> <span class="php-keyword1">if</span> (self::getContexte()) {
</span><span id="227" class="l"><a class="l" href="#227">227: </a> <span class="php-var">$message</span> .= <span class="php-quote">'&lt;pre&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="228" class="l"><a class="l" href="#228">228: </a> <span class="php-var">$message</span> .= <span class="php-quote">'&lt;strong&gt;Contexte : &lt;/strong&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>.<span class="php-keyword2">print_r</span>(<span class="php-var">$e</span>-&gt;getTraceAsString(), <span class="php-keyword1">true</span>).<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="229" class="l"><a class="l" href="#229">229: </a> <span class="php-var">$message</span> .= <span class="php-quote">'&lt;/pre&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="230" class="l"><a class="l" href="#230">230: </a> }
</span><span id="231" class="l"><a class="l" href="#231">231: </a> <span class="php-var">$message</span> .= <span class="php-quote">'&lt;/div&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="232" class="l"><a class="l" href="#232">232: </a> <span class="php-keyword1">return</span> <span class="php-var">$message</span>;
</span><span id="233" class="l"><a class="l" href="#233">233: </a> }
</span><span id="234" class="l"><a class="l" href="#234">234: </a>
</span><span id="235" class="l"><a class="l" href="#235">235: </a> <span class="php-comment">/**
</span></span><span id="236" class="l"><a class="l" href="#236">236: </a><span class="php-comment"> * Lors de la destruction de la classe si des exceptions n'ont pas été affichées, et si le débogage est à true, elles sont
</span></span><span id="237" class="l"><a class="l" href="#237">237: </a><span class="php-comment"> * affichées.
</span></span><span id="238" class="l"><a class="l" href="#238">238: </a><span class="php-comment"> */</span>
</span><span id="239" class="l"><a class="l" href="#239">239: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___destruct" href="#___destruct">__destruct</a>() {
</span><span id="240" class="l"><a class="l" href="#240">240: </a> <span class="php-comment">// Si des erreurs n'ont pas été affichée nous forçons leur affichage</span>
</span><span id="241" class="l"><a class="l" href="#241">241: </a> <span class="php-keyword1">if</span> (self::<span class="php-var">$afficher</span> &amp;&amp; self::getExceptionsNbre() &gt; <span class="php-num">0</span>) {
</span><span id="242" class="l"><a class="l" href="#242">242: </a> <span class="php-keyword1">echo</span> self::getExceptionsFormatees();
</span><span id="243" class="l"><a class="l" href="#243">243: </a> }
</span><span id="244" class="l"><a class="l" href="#244">244: </a> }
</span><span id="245" class="l"><a class="l" href="#245">245: </a>
</span><span id="246" class="l"><a class="l" href="#246">246: </a>}
</span><span id="247" class="l"><a class="l" href="#247">247: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Fichier.html
New file
0,0 → 1,422
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Fichier | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li class="active"><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li class="active"><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Utilitaire.html" title="Summary of Utilitaire"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Fichier</h1>
 
 
<div class="description">
<p>Classe fournissant des méthodes statiques de manipulation des fichiers.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Utilitaire.html">Utilitaire</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2009, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL-v3</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL-v2</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Fichier.php 351 2011-07-21 10:22:34Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Fichier.html#3-201" title="Go to source code">utilitaires/Fichier.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="creerFichier" id="_creerFichier">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_creerFichier">#</a>
<code><a href="source-class-Fichier.html#16-46" title="Go to source code">creerFichier</a>( <span>string <var>$fichier</var></span>, <span>string <var>$contenu</var></span> )</code>
 
<div class="description short">
<p>Créer et stocke du contenu dans un fichier.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Créer et stocke du contenu dans un fichier.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier</var></dt>
<dd><code>string</code><br>le chemin et le nom du fichier.</dd>
<dt><var>$contenu</var></dt>
<dd><code>string</code><br>le contenu à stocker dans le fichier.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>true en cas de succès sinon false.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="creerFichierGzip" id="_creerFichierGzip">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_creerFichierGzip">#</a>
<code><a href="source-class-Fichier.html#48-83" title="Go to source code">creerFichierGzip</a>( <span>string <var>$fichier</var></span>, <span>string <var>$contenu</var></span> )</code>
 
<div class="description short">
<p>Créer et stocke du contenu dans un fichier compressé en Gzip.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Créer et stocke du contenu dans un fichier compressé en Gzip.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier</var></dt>
<dd><code>string</code><br>le chemin et le nom du fichier.</dd>
<dt><var>$contenu</var></dt>
<dd><code>string</code><br>le contenu à stocker dans le fichier.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>true en cas de succès sinon false.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimerDossier" id="_supprimerDossier">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimerDossier">#</a>
<code><a href="source-class-Fichier.html#85-107" title="Go to source code">supprimerDossier</a>( <span>string <var>$dossier</var></span> )</code>
 
<div class="description short">
<p>Supprime récursivement un dossier et tout son contenu.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Supprime récursivement un dossier et tout son contenu.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$dossier</var></dt>
<dd><code>string</code><br>$dossier le chemin vers le dossier à supprimer.</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="convertirTaille" id="_convertirTaille">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_convertirTaille">#</a>
<code><a href="source-class-Fichier.html#109-119" title="Go to source code">convertirTaille</a>( <span>integer <var>$taille</var></span> )</code>
 
<div class="description short">
<p>Convertion d'un nombre d'octet en kB, MB, GB.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Convertion d'un nombre d'octet en kB, MB, GB.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$taille</var></dt>
<dd><code>integer</code><br>$taille la taille en octet à convertir</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>la chaine représentant la taille en octets.<br>
</div>
 
 
<h4>Link</h4>
<div class="list">
<a href="http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html">http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html</a><br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="getDossierTmp" id="_getDossierTmp">
 
<td class="attributes"><code>
public static
string|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getDossierTmp">#</a>
<code><a href="source-class-Fichier.html#121-186" title="Go to source code">getDossierTmp</a>( )</code>
 
<div class="description short">
<p>Détermine le dossier système temporaire et détecte si nous y avons accès
en lecture et écriture.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Détermine le dossier système temporaire et détecte si nous y avons accès
en lecture et écriture.</p>
 
<p>Inspiré de Zend_File_Transfer_Adapter_Abstract &amp; Zend_Cache</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>string|false</code><br>le chemine vers le dossier temporaire ou false en cas d'échec.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="etreAccessibleEnLectureEtEcriture" id="_etreAccessibleEnLectureEtEcriture">
 
<td class="attributes"><code>
protected static
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_etreAccessibleEnLectureEtEcriture">#</a>
<code><a href="source-class-Fichier.html#188-200" title="Go to source code">etreAccessibleEnLectureEtEcriture</a>( <span>mixed <var>$ressource</var></span> )</code>
 
<div class="description short">
<p>Vérifie si le fichier ou dossier est accessible en lecture et écriture.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Vérifie si le fichier ou dossier est accessible en lecture et écriture.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$ressource</var></dt>
<dd><code>mixed</code><br>$ressource chemin vers le dossier ou fichier à tester</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true si la ressource est accessible en lecture et écriture.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Pattern.html
New file
0,0 → 1,126
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File utilitaires/Pattern.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li class="active"><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li class="active"><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Utilitaire.html" title="Summary of Utilitaire"><span>Package</span></a>
</li>
<li>
<a href="class-Pattern.html" title="Summary of Pattern"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe fournissant des constantes correspondant à des expressions régulières de vérification très courrantes.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> *
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * @package Utilitaire
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="10" class="l"><a class="l" href="#10">10: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
</span></span><span id="11" class="l"><a class="l" href="#11">11: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
</span></span><span id="12" class="l"><a class="l" href="#12">12: </a><span class="php-comment"> * @version $Id: Pattern.php 299 2011-01-18 14:03:46Z jpm $
</span></span><span id="13" class="l"><a class="l" href="#13">13: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="14" class="l"><a class="l" href="#14">14: </a><span class="php-comment"> */</span>
</span><span id="15" class="l"><a class="l" href="#15">15: </a><span class="php-keyword1">class</span> <span class="php-keyword2">Pattern</span> {
</span><span id="16" class="l"><a class="l" href="#16">16: </a> <span class="php-keyword1">const</span> <a id="PRENOM" href="#PRENOM">PRENOM</a> = <span class="php-quote">&quot;[\p{L}-]+&quot;</span>;<span class="php-comment">// Pattern prénom</span>
</span><span id="17" class="l"><a class="l" href="#17">17: </a> <span class="php-keyword1">const</span> <a id="NOM" href="#NOM">NOM</a> = <span class="php-quote">&quot;[\p{Lu}]+&quot;</span>;<span class="php-comment">// Pattern nom</span>
</span><span id="18" class="l"><a class="l" href="#18">18: </a> <span class="php-keyword1">const</span> <a id="COURRIEL" href="#COURRIEL">COURRIEL</a> = <span class="php-quote">&quot;[a-z0-9!#</span><span class="php-var">$</span><span class="php-quote">%&amp;'*+=?^_`{|}~-]+(?:\\.[a-z0-9!#</span><span class="php-var">$</span><span class="php-quote">%&amp;'*+=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?&quot;</span>;<span class="php-comment">// Pattern courriel</span>
</span><span id="19" class="l"><a class="l" href="#19">19: </a> <span class="php-keyword1">const</span> <a id="URL" href="#URL">URL</a> = <span class="php-quote">&quot;^(?:(?:ht|f)tp(?:s?)\\:\\/\\/|~/|/)?(?:\\w+:\\w+@)?(?:(?:[-\\w]+\\.)+(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?::[\\d]{1,5})?(?:(?:(?:/(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,=]|%[a-f\\d]{2})+)+|/)+|\\?|#)?(?:(?:\\?(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,*:]|%[a-f\\d{2}])+=(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,*:=]|%[a-f\\d]{2})*)(?:&amp;(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,*:]|%[a-f\\d{2}])+=(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,*:=]|%[a-f\\d]{2})*)*)*(?:#(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,*:=]|%[a-f\\d]{2})*)?</span><span class="php-var">$</span><span class="php-quote">&quot;</span>;
</span><span id="20" class="l"><a class="l" href="#20">20: </a> <span class="php-keyword1">const</span> <a id="HEURE_MINUTE" href="#HEURE_MINUTE">HEURE_MINUTE</a> = <span class="php-quote">&quot;^(?:[0-1][0-9]|2[0-4]):(?:[0-5][0-9]|60)</span><span class="php-var">$</span><span class="php-quote">&quot;</span>;<span class="php-comment">// Heure au format 24h avec séparateur d'heure et minute ':' </span>
</span><span id="21" class="l"><a class="l" href="#21">21: </a> <span class="php-keyword1">const</span> <a id="LATITUDE" href="#LATITUDE">LATITUDE</a> = <span class="php-quote">&quot;^-?([0-8]?[0-9]([.,][0-9]*)?|90)</span><span class="php-var">$</span><span class="php-quote">&quot;</span>; <span class="php-comment">// Nombre décimal positif ou négatif allant de 0 à 89 ou nombre entier valant 90 avec pour séparateur des décimales &quot;.&quot; ou &quot;,&quot;</span>
</span><span id="22" class="l"><a class="l" href="#22">22: </a> <span class="php-keyword1">const</span> <a id="LONGITUDE" href="#LONGITUDE">LONGITUDE</a> = <span class="php-quote">&quot;^-?((1[0-7][0-9]|[1-9]?[0-9])([.,][0-9]*)?|180)</span><span class="php-var">$</span><span class="php-quote">&quot;</span>; <span class="php-comment">// Nombre décimal positif ou négatif allant de 0 à 179 ou nombre entier valant 180 avec pour séparateur des décimales &quot;.&quot; ou &quot;,&quot;</span>
</span><span id="23" class="l"><a class="l" href="#23">23: </a>}
</span><span id="24" class="l"><a class="l" href="#24">24: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Tableau.html
New file
0,0 → 1,312
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Tableau | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li class="active"><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li class="active"><a href="class-Tableau.html">Tableau</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Utilitaire.html" title="Summary of Utilitaire"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Tableau</h1>
 
 
<div class="description">
<p>Classe fournissant des méthodes statiques de manipulation des tableaux
(Array).</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Utilitaire.html">Utilitaire</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2009, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL-v3</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL-v2</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Tableau.php 400 2011-11-25 16:26:26Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Tableau.html#3-96" title="Go to source code">utilitaires/Tableau.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="etendre" id="_etendre">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_etendre">#</a>
<code><a href="source-class-Tableau.html#17-42" title="Go to source code">etendre</a>( <span>array <var>&amp; $tableau_a_etendre</var></span>, <span>array <var>&amp; $tableau_a_copier</var></span> )</code>
 
<div class="description short">
<p>Etend le tableau à étendre avec les données du tableau à copier. Si des
clés sont identiques entre les deux tableaux une erreur est déclenchée et la
valeur du tableau à étendre est gardée. Si les deux tableaux ont des clés
numériques leurs valeurs sont gardées (à la différence de array_merge). Les
tableaux sont passés par références et le tableau à copier est
progressivement détruit pour éviter la consomation de mémoire.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Etend le tableau à étendre avec les données du tableau à copier. Si des
clés sont identiques entre les deux tableaux une erreur est déclenchée et la
valeur du tableau à étendre est gardée. Si les deux tableaux ont des clés
numériques leurs valeurs sont gardées (à la différence de array_merge). Les
tableaux sont passés par références et le tableau à copier est
progressivement détruit pour éviter la consomation de mémoire.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tableau_a_etendre</var></dt>
<dd><code>array</code><br>$tableau_a_etendre</dd>
<dt><var>$tableau_a_copier</var></dt>
<dd><code>array</code><br>$tableau_a_copier</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="trierTableauMd" id="_trierTableauMd">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_trierTableauMd">#</a>
<code><a href="source-class-Tableau.html#44-50" title="Go to source code">trierTableauMd</a>( <span>mixed <var>$array</var></span>, <span>mixed <var>$cols</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
<h4>Deprecated</h4>
<div class="list">
Utiliser la méthode trierMD()<br>
</div>
 
 
 
 
<h4>See</h4>
<div class="list">
<code><code><a href="class-Tableau.html#_trierMD">Tableau::trierMD()</a></code></code><br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="trierMD" id="_trierMD">
 
<td class="attributes"><code>
public static
Array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_trierMD">#</a>
<code><a href="source-class-Tableau.html#52-95" title="Go to source code">trierMD</a>( <span>Array <var>$array</var></span>, <span>Array <var>$cols</var></span> )</code>
 
<div class="description short">
<p>Permet de trier un tableau multi-dimenssionnel en gardant l'ordre des
clés.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Permet de trier un tableau multi-dimenssionnel en gardant l'ordre des
clés.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$array</var></dt>
<dd><code>Array</code><br>$array le tableau à trier</dd>
<dt><var>$cols</var></dt>
<dd><code>Array</code><br>$cols tableau indiquant en clé la colonne à trier et en valeur l'ordre avec
SORT_ASC ou SORT_DESC</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>Array</code><br>le tableau trié.<br>
</div>
 
 
<h4>Author</h4>
<div class="list">
cagret at gmail dot com<br>
</div>
<h4>See</h4>
<div class="list">
<a
href="http://fr.php.net/manual/fr/function.array-multisort.php">http://fr.php.net/manual/fr/function.array-multisort.php</a>
Post du 21-Jun-2009 12:38<br>
</div>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Log.html
New file
0,0 → 1,265
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Log.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li class="active"><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Log.html" title="Summary of Log"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">//declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe permettant de logger des messages dans les fichier situés dans le dossier de log.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> *
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * @package Framework
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @author Aurélien PERONNET &lt;aurelien@tela-botanica.org&gt;
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @version $Id: Log.php 274 2010-12-28 15:37:22Z jpm $
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> */</span>
</span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-keyword1">class</span> <span class="php-keyword2">Log</span> {
</span><span id="17" class="l"><a class="l" href="#17"> 17: </a>
</span><span id="18" class="l"><a class="l" href="#18"> 18: </a> <span class="php-comment">/** Boolean indiquant si l'on doit utiliser les logs ou pas. */</span>
</span><span id="19" class="l"><a class="l" href="#19"> 19: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$logger" href="#$logger">$logger</a></span> = <span class="php-keyword1">false</span>;
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a>
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a> <span class="php-comment">/** Tableau associatif stockant les descripteurs de fichiers. */</span>
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$fichiersLog" href="#$fichiersLog">$fichiersLog</a></span> = <span class="php-keyword1">array</span>();
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a>
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a> <span class="php-comment">/** Chemin de base du dossier log de l'application. */</span>
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$cheminLogs" href="#$cheminLogs">$cheminLogs</a></span> = <span class="php-quote">''</span>;
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a>
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a> <span class="php-comment">/** Booleen indiquant si l'on peut correctement écrire dans les fichiers de logs. */</span>
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$droitLogger" href="#$droitLogger">$droitLogger</a></span> = <span class="php-keyword1">true</span>;
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a>
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a> <span class="php-comment">/** Zone horaire (pour éviter des avertissements dans les dates). */</span>
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$timeZone" href="#$timeZone">$timeZone</a></span> = <span class="php-quote">'Europe/Paris'</span>;
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a>
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a> <span class="php-comment">/** Taille maximum d'un fichier de log avant que celui ne soit archivé (en octets). */</span>
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$tailleMax" href="#$tailleMax">$tailleMax</a></span> = <span class="php-num">10000</span>;
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a>
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a> <span class="php-comment">/** séparateur de dossier dans un chemin. */</span>
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$sd" href="#$sd">$sd</a></span> = DIRECTORY_SEPARATOR;
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a>
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a> <span class="php-comment">/** Extension des fichiers de log. */</span>
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$ext" href="#$ext">$ext</a></span> = <span class="php-quote">'.log'</span>;
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a>
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a> <span class="php-comment">/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/</span>
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$parametres_obligatoires" href="#$parametres_obligatoires">$parametres_obligatoires</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'chemin_logs'</span>, <span class="php-quote">'i18n_timezone'</span>, <span class="php-quote">'log_taille_max'</span>, <span class="php-quote">'log_debogage'</span>);
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a>
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a> <span class="php-comment">/** Initialiser les logs par défaut, sans tenir comptes des paramêtres de config. */</span>
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_initialiser" href="#_initialiser">initialiser</a>() {
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a> <span class="php-comment">// gestion de la timezone pour éviter des erreurs</span>
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">function_exists</span>(<span class="php-quote">'date_default_timezone_set'</span>) &amp;&amp; <span class="php-keyword2">function_exists</span>(<span class="php-quote">'date_default_timezone_get'</span>)) {
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-keyword2">date_default_timezone_set</span>(self::<span class="php-var">$timeZone</span>);
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> }
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a>
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> <span class="php-keyword1">if</span> (self::<span class="php-var">$logger</span> &amp;&amp; (!<span class="php-keyword2">is_dir</span>(self::<span class="php-var">$cheminLogs</span>) || !<span class="php-keyword2">is_writable</span>(self::<span class="php-var">$cheminLogs</span>))) {
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a> self::desactiverEcriture();
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> }
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> }
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a>
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> <span class="php-comment">/** Configure le Log à partir des paramêtres de config. */</span>
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_configurer" href="#_configurer">configurer</a>() {
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> Config::verifierPresenceParametres(self::<span class="php-var">$parametres_obligatoires</span>);
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> self::<span class="php-var">$cheminLogs</span> = Config::get(<span class="php-quote">'chemin_logs'</span>);
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> self::<span class="php-var">$timeZone</span> = (Config::get(<span class="php-quote">'i18n_timezone'</span>) != <span class="php-quote">''</span>) ? Config::get(<span class="php-quote">'i18n_timezone'</span>) : self::<span class="php-var">$timeZone</span>;
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> self::<span class="php-var">$tailleMax</span> = (Config::get(<span class="php-quote">'log_taille_max'</span>) != <span class="php-quote">''</span>) ? Config::get(<span class="php-quote">'log_taille_max'</span>) : self::<span class="php-var">$tailleMax</span>;
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a> self::<span class="php-var">$logger</span> = (Config::get(<span class="php-quote">'log_debogage'</span>) != <span class="php-quote">''</span>) ? Config::get(<span class="php-quote">'log_debogage'</span>) : self::<span class="php-var">$logger</span>;
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> self::initialiser();
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> }
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a>
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> <span class="php-comment">/**
</span></span><span id="68" class="l"><a class="l" href="#68"> 68: </a><span class="php-comment"> * Ajoute une entrée au log spécifié par le paramètre $nomFichier
</span></span><span id="69" class="l"><a class="l" href="#69"> 69: </a><span class="php-comment"> * @param string $nomFichier le nom du fichier dans lequel écrire
</span></span><span id="70" class="l"><a class="l" href="#70"> 70: </a><span class="php-comment"> */</span>
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_ajouterEntree" href="#_ajouterEntree">ajouterEntree</a>(<span class="php-var">$nomFichier</span>, <span class="php-var">$entree</span>, <span class="php-var">$mode</span> = <span class="php-quote">'a+'</span>) {
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a> <span class="php-keyword1">if</span> (self::<span class="php-var">$droitLogger</span>) {
</span><span id="73" class="l"><a class="l" href="#73"> 73: </a> <span class="php-var">$date</span> = <span class="php-quote">&quot;\n\n&quot;</span>.<span class="php-keyword2">date</span>(<span class="php-quote">'d m Y H:i'</span>).<span class="php-quote">&quot;\n&quot;</span> ;
</span><span id="74" class="l"><a class="l" href="#74"> 74: </a>
</span><span id="75" class="l"><a class="l" href="#75"> 75: </a> <span class="php-keyword1">if</span> (self::verifierOuvrirFichier(<span class="php-var">$nomFichier</span>, <span class="php-var">$mode</span>)) {
</span><span id="76" class="l"><a class="l" href="#76"> 76: </a> <span class="php-keyword2">fwrite</span>(self::<span class="php-var">$fichiersLog</span>[<span class="php-var">$nomFichier</span>], <span class="php-var">$date</span>.<span class="php-var">$entree</span>);
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> self::verifierTailleFichierOuArchiver(<span class="php-var">$nomFichier</span>);
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> } <span class="php-keyword1">else</span> {
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> self::desactiverEcriture(<span class="php-var">$nomFichier</span>);
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> }
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a> }
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> }
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a>
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> <span class="php-comment">/**
</span></span><span id="85" class="l"><a class="l" href="#85"> 85: </a><span class="php-comment"> * Vide un fichier log indiqué
</span></span><span id="86" class="l"><a class="l" href="#86"> 86: </a><span class="php-comment"> * @param string $nomFichier le nom du fichier à vider
</span></span><span id="87" class="l"><a class="l" href="#87"> 87: </a><span class="php-comment"> */</span>
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_viderLog" href="#_viderLog">viderLog</a>(<span class="php-var">$nomFichier</span>) {
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a> self::ajouterEntree(<span class="php-var">$nomFichier</span>, <span class="php-quote">''</span>, <span class="php-quote">'w'</span>);
</span><span id="90" class="l"><a class="l" href="#90"> 90: </a> }
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a>
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> <span class="php-comment">/**
</span></span><span id="93" class="l"><a class="l" href="#93"> 93: </a><span class="php-comment"> * Vérifie la présence d'un fichier dans le tableau, ses droits d'écriture, l'ouvre si nécessaire.
</span></span><span id="94" class="l"><a class="l" href="#94"> 94: </a><span class="php-comment"> *
</span></span><span id="95" class="l"><a class="l" href="#95"> 95: </a><span class="php-comment"> * @param string $nomFichier le nom du fichier dont on doit vérifier la présence
</span></span><span id="96" class="l"><a class="l" href="#96"> 96: </a><span class="php-comment"> * @return boolean true si le fichier est ouvert ou maintenant accessible, false sinon
</span></span><span id="97" class="l"><a class="l" href="#97"> 97: </a><span class="php-comment"> */</span>
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_verifierOuvrirFichier" href="#_verifierOuvrirFichier">verifierOuvrirFichier</a>(<span class="php-var">$nomFichier</span>,<span class="php-var">$mode</span>) {
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">in_array</span>(<span class="php-var">$nomFichier</span>, self::<span class="php-var">$fichiersLog</span>)) {
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_writable</span>(self::<span class="php-var">$cheminLogs</span>.<span class="php-var">$nomFichier</span>.self::<span class="php-var">$ext</span>)) {
</span><span id="101" class="l"><a class="l" href="#101">101: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">true</span>;
</span><span id="102" class="l"><a class="l" href="#102">102: </a> }
</span><span id="103" class="l"><a class="l" href="#103">103: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="104" class="l"><a class="l" href="#104">104: </a> } <span class="php-keyword1">else</span> {
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-var">$fp</span> = @<span class="php-keyword2">fopen</span>(self::<span class="php-var">$cheminLogs</span>.<span class="php-var">$nomFichier</span>.self::<span class="php-var">$ext</span>,<span class="php-var">$mode</span>);
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-keyword1">if</span> (<span class="php-var">$fp</span> &amp;&amp; <span class="php-keyword2">is_writable</span>(self::<span class="php-var">$cheminLogs</span>.<span class="php-var">$nomFichier</span>.self::<span class="php-var">$ext</span>)) {
</span><span id="107" class="l"><a class="l" href="#107">107: </a> self::<span class="php-var">$fichiersLog</span>[<span class="php-var">$nomFichier</span>] = <span class="php-var">$fp</span>;
</span><span id="108" class="l"><a class="l" href="#108">108: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">true</span>;
</span><span id="109" class="l"><a class="l" href="#109">109: </a> }
</span><span id="110" class="l"><a class="l" href="#110">110: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="111" class="l"><a class="l" href="#111">111: </a> }
</span><span id="112" class="l"><a class="l" href="#112">112: </a> }
</span><span id="113" class="l"><a class="l" href="#113">113: </a>
</span><span id="114" class="l"><a class="l" href="#114">114: </a> <span class="php-comment">/**
</span></span><span id="115" class="l"><a class="l" href="#115">115: </a><span class="php-comment"> * Vérifie la taille d'un fichier donné et si celle ci est trop importante
</span></span><span id="116" class="l"><a class="l" href="#116">116: </a><span class="php-comment"> * archive le fichier de log
</span></span><span id="117" class="l"><a class="l" href="#117">117: </a><span class="php-comment"> * @param string $nomFichier nom du fichier à vérifier
</span></span><span id="118" class="l"><a class="l" href="#118">118: </a><span class="php-comment"> */</span>
</span><span id="119" class="l"><a class="l" href="#119">119: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_verifierTailleFichierOuArchiver" href="#_verifierTailleFichierOuArchiver">verifierTailleFichierOuArchiver</a>(<span class="php-var">$nomFichier</span>) {
</span><span id="120" class="l"><a class="l" href="#120">120: </a> <span class="php-keyword1">if</span>(<span class="php-keyword2">filesize</span>(self::<span class="php-var">$cheminLogs</span>.<span class="php-var">$nomFichier</span>.self::<span class="php-var">$ext</span>) &gt; self::<span class="php-var">$tailleMax</span>) {
</span><span id="121" class="l"><a class="l" href="#121">121: </a> <span class="php-keyword2">rename</span>(self::<span class="php-var">$cheminLogs</span>.<span class="php-var">$nomFichier</span>.self::<span class="php-var">$ext</span>,self::<span class="php-var">$cheminLogs</span>.<span class="php-var">$nomFichier</span>.<span class="php-keyword2">date</span>(<span class="php-quote">'d_m_Y_H:i'</span>).self::<span class="php-var">$ext</span>);
</span><span id="122" class="l"><a class="l" href="#122">122: </a> self::ajouterEntree(<span class="php-var">$nomFichier</span>,<span class="php-quote">''</span>);
</span><span id="123" class="l"><a class="l" href="#123">123: </a> }
</span><span id="124" class="l"><a class="l" href="#124">124: </a> }
</span><span id="125" class="l"><a class="l" href="#125">125: </a>
</span><span id="126" class="l"><a class="l" href="#126">126: </a> <span class="php-comment">/**
</span></span><span id="127" class="l"><a class="l" href="#127">127: </a><span class="php-comment"> * Désactive l'écriture du log et envoie un message au gestionnaire d'erreurs
</span></span><span id="128" class="l"><a class="l" href="#128">128: </a><span class="php-comment"> * @param string $nomFichier le nom du fichier qui a causé l'erreur
</span></span><span id="129" class="l"><a class="l" href="#129">129: </a><span class="php-comment"> */</span>
</span><span id="130" class="l"><a class="l" href="#130">130: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_desactiverEcriture" href="#_desactiverEcriture">desactiverEcriture</a>(<span class="php-var">$nomFichier</span> = <span class="php-quote">''</span>) {
</span><span id="131" class="l"><a class="l" href="#131">131: </a> self::<span class="php-var">$droitLogger</span> = <span class="php-keyword1">false</span>;
</span><span id="132" class="l"><a class="l" href="#132">132: </a> <span class="php-keyword1">if</span> (<span class="php-var">$nomFichier</span> != <span class="php-quote">''</span>) {
</span><span id="133" class="l"><a class="l" href="#133">133: </a> <span class="php-var">$fichierDossier</span> = <span class="php-quote">'fichier '</span>.<span class="php-var">$nomFichier</span> ;
</span><span id="134" class="l"><a class="l" href="#134">134: </a> } <span class="php-keyword1">else</span> {
</span><span id="135" class="l"><a class="l" href="#135">135: </a> <span class="php-var">$fichierDossier</span> = <span class="php-quote">'dossier des logs'</span>;
</span><span id="136" class="l"><a class="l" href="#136">136: </a> }
</span><span id="137" class="l"><a class="l" href="#137">137: </a> <span class="php-var">$message</span> = <span class="php-quote">'Écriture impossible dans le '</span>.<span class="php-var">$fichierDossier</span>.<span class="php-quote">', Assurez-vous des droits du dossier et des fichiers'</span>;
</span><span id="138" class="l"><a class="l" href="#138">138: </a> <span class="php-var">$e</span> = <span class="php-keyword1">new</span> ErrorException(<span class="php-var">$message</span>, <span class="php-num">0</span>, E_USER_WARNING, __FILE__, __LINE__);
</span><span id="139" class="l"><a class="l" href="#139">139: </a> GestionnaireException::gererException(<span class="php-var">$e</span>);
</span><span id="140" class="l"><a class="l" href="#140">140: </a> }
</span><span id="141" class="l"><a class="l" href="#141">141: </a>
</span><span id="142" class="l"><a class="l" href="#142">142: </a> <span class="php-comment">/** Destructeur de classe, ferme les descripteurs ouverts. */</span>
</span><span id="143" class="l"><a class="l" href="#143">143: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___destruct" href="#___destruct">__destruct</a>() {
</span><span id="144" class="l"><a class="l" href="#144">144: </a> <span class="php-keyword1">foreach</span>(self::<span class="php-var">$fichiersLog</span> <span class="php-keyword1">as</span> <span class="php-var">$nomFichier</span> =&gt; <span class="php-var">$fp</span>) {
</span><span id="145" class="l"><a class="l" href="#145">145: </a> <span class="php-keyword2">fclose</span>(<span class="php-var">$fp</span>);
</span><span id="146" class="l"><a class="l" href="#146">146: </a> }
</span><span id="147" class="l"><a class="l" href="#147">147: </a> }
</span><span id="148" class="l"><a class="l" href="#148">148: </a>}
</span><span id="149" class="l"><a class="l" href="#149">149: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-CacheSqlite.html
New file
0,0 → 1,716
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File CacheSqlite.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li class="active"><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-CacheFichier.html">CacheFichier</a></li>
<li class="active"><a href="class-CacheSqlite.html">CacheSqlite</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-None.html" title="Summary of None"><span>Package</span></a>
</li>
<li>
<a href="class-CacheSqlite.html" title="Summary of CacheSqlite"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-keyword1">class</span> <a id="CacheSqlite" href="#CacheSqlite">CacheSqlite</a> {
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a> <span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Options disponibles :
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> *
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * ====&gt; (string) stockage_chemin :
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * Chemin vers le fichier contenant la base SQLite.
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> *
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> *
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * ====&gt; (int) defragmentation_auto :
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * - Désactive / Régler le processus de défragmentation automatique
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * - Le processus de défragmentation automatiques réduit la taille du fichier contenant la base de données
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * quand un ajout ou une suppression de cache est réalisée :
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * 0 =&gt; pas de défragmentation automatique
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * 1 =&gt; défragmentation automatique systématique
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * x (integer) &gt; 1 =&gt; défragmentation automatique toutes les 1 fois (au hasard) sur x ajout ou suppression de cache
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> *
</span></span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-comment"> * @var array options disponibles
</span></span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-comment"> */</span>
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$options" href="#$options">$options</a></span> = <span class="php-keyword1">array</span>(
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a> <span class="php-quote">'stockage_chemin'</span> =&gt; <span class="php-keyword1">null</span>,
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a> <span class="php-quote">'defragmentation_auto'</span> =&gt; <span class="php-num">10</span>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> );
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a>
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a> <span class="php-comment">/**
</span></span><span id="26" class="l"><a class="l" href="#26"> 26: </a><span class="php-comment"> * DB ressource
</span></span><span id="27" class="l"><a class="l" href="#27"> 27: </a><span class="php-comment"> *
</span></span><span id="28" class="l"><a class="l" href="#28"> 28: </a><span class="php-comment"> * @var mixed $db
</span></span><span id="29" class="l"><a class="l" href="#29"> 29: </a><span class="php-comment"> */</span>
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$bdd" href="#$bdd">$bdd</a></span> = <span class="php-keyword1">null</span>;
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a>
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-comment">/**
</span></span><span id="33" class="l"><a class="l" href="#33"> 33: </a><span class="php-comment"> * Boolean to store if the structure has benn checked or not
</span></span><span id="34" class="l"><a class="l" href="#34"> 34: </a><span class="php-comment"> *
</span></span><span id="35" class="l"><a class="l" href="#35"> 35: </a><span class="php-comment"> * @var boolean $structure_ok
</span></span><span id="36" class="l"><a class="l" href="#36"> 36: </a><span class="php-comment"> */</span>
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$structure_ok" href="#$structure_ok">$structure_ok</a></span> = <span class="php-keyword1">false</span>;
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a>
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$Cache" href="#$Cache">$Cache</a></span> = <span class="php-keyword1">null</span>;
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a>
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a> <span class="php-comment">/**
</span></span><span id="42" class="l"><a class="l" href="#42"> 42: </a><span class="php-comment"> * Constructor
</span></span><span id="43" class="l"><a class="l" href="#43"> 43: </a><span class="php-comment"> *
</span></span><span id="44" class="l"><a class="l" href="#44"> 44: </a><span class="php-comment"> * @param array $options Associative array of options
</span></span><span id="45" class="l"><a class="l" href="#45"> 45: </a><span class="php-comment"> * @throws Zend_cache_Exception
</span></span><span id="46" class="l"><a class="l" href="#46"> 46: </a><span class="php-comment"> * @return void
</span></span><span id="47" class="l"><a class="l" href="#47"> 47: </a><span class="php-comment"> */</span>
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>(<span class="php-keyword1">array</span> <span class="php-var">$options</span> = <span class="php-keyword1">array</span>(), Cache <span class="php-var">$cache</span>) {
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-var">$this</span>-&gt;Cache = <span class="php-var">$cache</span>;
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">extension_loaded</span>(<span class="php-quote">'sqlite'</span>)) {
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a> <span class="php-var">$this</span>-&gt;initialiserOptionsParConfig();
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> <span class="php-var">$this</span>-&gt;setOptions(<span class="php-var">$options</span>);
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a> } <span class="php-keyword1">else</span> {
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Impossible d'utiliser le cache SQLITE car l'extenssion 'sqlite' n'est pas chargée dans l'environnement PHP courrant.&quot;</span>;
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_ERROR);
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> }
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> }
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a>
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_initialiserOptionsParConfig" href="#_initialiserOptionsParConfig">initialiserOptionsParConfig</a>() {
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> <span class="php-keyword1">while</span> (<span class="php-keyword1">list</span>(<span class="php-var">$nom</span>, <span class="php-var">$valeur</span>) = <span class="php-keyword2">each</span>(<span class="php-var">$this</span>-&gt;options)) {
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> <span class="php-keyword1">if</span> (Config::existe(<span class="php-var">$nom</span>)) {
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> <span class="php-var">$this</span>-&gt;options[<span class="php-var">$nom</span>] = Config::get(<span class="php-var">$nom</span>);
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a> }
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> }
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> }
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a>
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> <span class="php-comment">/**
</span></span><span id="68" class="l"><a class="l" href="#68"> 68: </a><span class="php-comment"> * Destructor
</span></span><span id="69" class="l"><a class="l" href="#69"> 69: </a><span class="php-comment"> *
</span></span><span id="70" class="l"><a class="l" href="#70"> 70: </a><span class="php-comment"> * @return void
</span></span><span id="71" class="l"><a class="l" href="#71"> 71: </a><span class="php-comment"> */</span>
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___destruct" href="#___destruct">__destruct</a>() {
</span><span id="73" class="l"><a class="l" href="#73"> 73: </a> @<span class="php-keyword2">sqlite_close</span>(<span class="php-var">$this</span>-&gt;getConnexion());
</span><span id="74" class="l"><a class="l" href="#74"> 74: </a> }
</span><span id="75" class="l"><a class="l" href="#75"> 75: </a>
</span><span id="76" class="l"><a class="l" href="#76"> 76: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_setOptions" href="#_setOptions">setOptions</a>(<span class="php-var">$options</span>) {
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> <span class="php-keyword1">while</span> (<span class="php-keyword1">list</span>(<span class="php-var">$nom</span>, <span class="php-var">$valeur</span>) = <span class="php-keyword2">each</span>(<span class="php-var">$options</span>)) {
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_string</span>(<span class="php-var">$nom</span>)) {
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Nom d'option incorecte : </span><span class="php-var">$nom</span><span class="php-quote">&quot;</span>, E_USER_WARNING);
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> }
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a> <span class="php-var">$nom</span> = <span class="php-keyword2">strtolower</span>(<span class="php-var">$nom</span>);
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">array_key_exists</span>(<span class="php-var">$nom</span>, <span class="php-var">$this</span>-&gt;options)) {
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a> <span class="php-var">$this</span>-&gt;options[<span class="php-var">$nom</span>] = <span class="php-var">$valeur</span>;
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> }
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a> }
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a> }
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a>
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_setEmplacement" href="#_setEmplacement">setEmplacement</a>(<span class="php-var">$emplacement</span>) {
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">extension_loaded</span>(<span class="php-quote">'sqlite'</span>)) {
</span><span id="90" class="l"><a class="l" href="#90"> 90: </a> <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>] = <span class="php-var">$emplacement</span>;
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> } <span class="php-keyword1">else</span> {
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Impossible d'utiliser le mode de sotckage SQLite car l'extenssion 'sqlite' n'est pas chargé dans &quot;</span>.
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-quote">&quot;l'environnement PHP courrant.&quot;</span>, E_USER_ERROR);
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> }
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> }
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a>
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> <span class="php-comment">/**
</span></span><span id="98" class="l"><a class="l" href="#98"> 98: </a><span class="php-comment"> * Test if a cache is available for the given id and (if yes) return it (false else)
</span></span><span id="99" class="l"><a class="l" href="#99"> 99: </a><span class="php-comment"> *
</span></span><span id="100" class="l"><a class="l" href="#100">100: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="101" class="l"><a class="l" href="#101">101: </a><span class="php-comment"> * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested
</span></span><span id="102" class="l"><a class="l" href="#102">102: </a><span class="php-comment"> * @return string|false Cached datas
</span></span><span id="103" class="l"><a class="l" href="#103">103: </a><span class="php-comment"> */</span>
</span><span id="104" class="l"><a class="l" href="#104">104: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_charger" href="#_charger">charger</a>(<span class="php-var">$id</span>, <span class="php-var">$ne_pas_tester_validiter_du_cache</span> = <span class="php-keyword1">false</span>) {
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-var">$requete</span> = <span class="php-quote">&quot;SELECT content FROM cache WHERE id = '</span><span class="php-var">$id</span><span class="php-quote">'&quot;</span>.
</span><span id="107" class="l"><a class="l" href="#107">107: </a> ((<span class="php-var">$ne_pas_tester_validiter_du_cache</span>) ? <span class="php-quote">''</span> : <span class="php-quote">' AND (expire = 0 OR expire &gt; '</span>.<span class="php-keyword2">time</span>().<span class="php-quote">')'</span>);
</span><span id="108" class="l"><a class="l" href="#108">108: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-var">$requete</span>);
</span><span id="109" class="l"><a class="l" href="#109">109: </a> <span class="php-var">$ligne</span> = @<span class="php-keyword2">sqlite_fetch_array</span>(<span class="php-var">$resultat</span>);
</span><span id="110" class="l"><a class="l" href="#110">110: </a> <span class="php-keyword1">return</span> (<span class="php-var">$ligne</span>) ? <span class="php-var">$ligne</span>[<span class="php-quote">'content'</span>] : <span class="php-keyword1">false</span>;
</span><span id="111" class="l"><a class="l" href="#111">111: </a> }
</span><span id="112" class="l"><a class="l" href="#112">112: </a>
</span><span id="113" class="l"><a class="l" href="#113">113: </a> <span class="php-comment">/**
</span></span><span id="114" class="l"><a class="l" href="#114">114: </a><span class="php-comment"> * Test if a cache is available or not (for the given id)
</span></span><span id="115" class="l"><a class="l" href="#115">115: </a><span class="php-comment"> *
</span></span><span id="116" class="l"><a class="l" href="#116">116: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="117" class="l"><a class="l" href="#117">117: </a><span class="php-comment"> * @return mixed|false (a cache is not available) or &quot;last modified&quot; timestamp (int) of the available cache record
</span></span><span id="118" class="l"><a class="l" href="#118">118: </a><span class="php-comment"> */</span>
</span><span id="119" class="l"><a class="l" href="#119">119: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_tester" href="#_tester">tester</a>(<span class="php-var">$id</span>) {
</span><span id="120" class="l"><a class="l" href="#120">120: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="121" class="l"><a class="l" href="#121">121: </a> <span class="php-var">$requete</span> = <span class="php-quote">&quot;SELECT lastModified FROM cache WHERE id = '</span><span class="php-var">$id</span><span class="php-quote">' AND (expire = 0 OR expire &gt; &quot;</span>.<span class="php-keyword2">time</span>().<span class="php-quote">')'</span>;
</span><span id="122" class="l"><a class="l" href="#122">122: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-var">$requete</span>);
</span><span id="123" class="l"><a class="l" href="#123">123: </a> <span class="php-var">$ligne</span> = @<span class="php-keyword2">sqlite_fetch_array</span>(<span class="php-var">$resultat</span>);
</span><span id="124" class="l"><a class="l" href="#124">124: </a> <span class="php-keyword1">return</span> (<span class="php-var">$ligne</span>) ? ((int) <span class="php-var">$ligne</span>[<span class="php-quote">'lastModified'</span>]) : <span class="php-keyword1">false</span>;
</span><span id="125" class="l"><a class="l" href="#125">125: </a> }
</span><span id="126" class="l"><a class="l" href="#126">126: </a>
</span><span id="127" class="l"><a class="l" href="#127">127: </a> <span class="php-comment">/**
</span></span><span id="128" class="l"><a class="l" href="#128">128: </a><span class="php-comment"> * Save some string datas into a cache record
</span></span><span id="129" class="l"><a class="l" href="#129">129: </a><span class="php-comment"> *
</span></span><span id="130" class="l"><a class="l" href="#130">130: </a><span class="php-comment"> * Note : $data is always &quot;string&quot; (serialization is done by the
</span></span><span id="131" class="l"><a class="l" href="#131">131: </a><span class="php-comment"> * core not by the backend)
</span></span><span id="132" class="l"><a class="l" href="#132">132: </a><span class="php-comment"> *
</span></span><span id="133" class="l"><a class="l" href="#133">133: </a><span class="php-comment"> * @param string $data Datas to cache
</span></span><span id="134" class="l"><a class="l" href="#134">134: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="135" class="l"><a class="l" href="#135">135: </a><span class="php-comment"> * @param array $tags Array of strings, the cache record will be tagged by each string entry
</span></span><span id="136" class="l"><a class="l" href="#136">136: </a><span class="php-comment"> * @param int $specificLifetime If != false, set a specific lifetime for this cache record (null =&gt; infinite lifetime)
</span></span><span id="137" class="l"><a class="l" href="#137">137: </a><span class="php-comment"> * @throws Zend_Cache_Exception
</span></span><span id="138" class="l"><a class="l" href="#138">138: </a><span class="php-comment"> * @return boolean True if no problem
</span></span><span id="139" class="l"><a class="l" href="#139">139: </a><span class="php-comment"> */</span>
</span><span id="140" class="l"><a class="l" href="#140">140: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_sauver" href="#_sauver">sauver</a>(<span class="php-var">$donnees</span>, <span class="php-var">$id</span>, <span class="php-var">$tags</span> = <span class="php-keyword1">array</span>(), <span class="php-var">$duree_vie_specifique</span> = <span class="php-keyword1">false</span>) {
</span><span id="141" class="l"><a class="l" href="#141">141: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="142" class="l"><a class="l" href="#142">142: </a>
</span><span id="143" class="l"><a class="l" href="#143">143: </a> <span class="php-comment">//FIXME : si l'extension n'est pas installée, le cache passe tout de même par cette fonction et s'arrête à cet endroit.</span>
</span><span id="144" class="l"><a class="l" href="#144">144: </a> <span class="php-var">$donnees</span> = @<span class="php-keyword2">sqlite_escape_string</span>(<span class="php-var">$donnees</span>);
</span><span id="145" class="l"><a class="l" href="#145">145: </a> <span class="php-var">$timestamp_courrant</span> = <span class="php-keyword2">time</span>();
</span><span id="146" class="l"><a class="l" href="#146">146: </a> <span class="php-var">$expiration</span> = <span class="php-var">$this</span>-&gt;Cache-&gt;getTimestampExpiration(<span class="php-var">$duree_vie_specifique</span>);
</span><span id="147" class="l"><a class="l" href="#147">147: </a>
</span><span id="148" class="l"><a class="l" href="#148">148: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;DELETE FROM cache WHERE id = '</span><span class="php-var">$id</span><span class="php-quote">'&quot;</span>);
</span><span id="149" class="l"><a class="l" href="#149">149: </a> <span class="php-var">$sql</span> = <span class="php-quote">&quot;INSERT INTO cache (id, content, lastModified, expire) VALUES ('</span><span class="php-var">$id</span><span class="php-quote">', '</span><span class="php-var">$donnees</span><span class="php-quote">', </span><span class="php-var">$timestamp_courrant</span><span class="php-quote">, </span><span class="php-var">$expiration</span><span class="php-quote">)&quot;</span>;
</span><span id="150" class="l"><a class="l" href="#150">150: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-var">$sql</span>);
</span><span id="151" class="l"><a class="l" href="#151">151: </a> <span class="php-keyword1">if</span> (!<span class="php-var">$resultat</span>) {
</span><span id="152" class="l"><a class="l" href="#152">152: </a> <span class="php-comment">// TODO : ajouter un log sauver() : impossible de stocker le cache d'id '$id'</span>
</span><span id="153" class="l"><a class="l" href="#153">153: </a> Debug::printr(<span class="php-quote">&quot;sauver() : impossible de stocker le cache d'id '</span><span class="php-var">$id</span><span class="php-quote">'&quot;</span>);
</span><span id="154" class="l"><a class="l" href="#154">154: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">false</span>;
</span><span id="155" class="l"><a class="l" href="#155">155: </a> } <span class="php-keyword1">else</span> {
</span><span id="156" class="l"><a class="l" href="#156">156: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="157" class="l"><a class="l" href="#157">157: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tags</span> <span class="php-keyword1">as</span> <span class="php-var">$tag</span>) {
</span><span id="158" class="l"><a class="l" href="#158">158: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;enregisterTag(<span class="php-var">$id</span>, <span class="php-var">$tag</span>) &amp;&amp; <span class="php-var">$resultat</span>;
</span><span id="159" class="l"><a class="l" href="#159">159: </a> }
</span><span id="160" class="l"><a class="l" href="#160">160: </a> }
</span><span id="161" class="l"><a class="l" href="#161">161: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="162" class="l"><a class="l" href="#162">162: </a> }
</span><span id="163" class="l"><a class="l" href="#163">163: </a>
</span><span id="164" class="l"><a class="l" href="#164">164: </a> <span class="php-comment">/**
</span></span><span id="165" class="l"><a class="l" href="#165">165: </a><span class="php-comment"> * Remove a cache record
</span></span><span id="166" class="l"><a class="l" href="#166">166: </a><span class="php-comment"> *
</span></span><span id="167" class="l"><a class="l" href="#167">167: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="168" class="l"><a class="l" href="#168">168: </a><span class="php-comment"> * @return boolean True if no problem
</span></span><span id="169" class="l"><a class="l" href="#169">169: </a><span class="php-comment"> */</span>
</span><span id="170" class="l"><a class="l" href="#170">170: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_supprimer" href="#_supprimer">supprimer</a>(<span class="php-var">$id</span>) {
</span><span id="171" class="l"><a class="l" href="#171">171: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="172" class="l"><a class="l" href="#172">172: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;SELECT COUNT(*) AS nbr FROM cache WHERE id = '</span><span class="php-var">$id</span><span class="php-quote">'&quot;</span>);
</span><span id="173" class="l"><a class="l" href="#173">173: </a> <span class="php-var">$resultat_nbre</span> = @<span class="php-keyword2">sqlite_fetch_single</span>(<span class="php-var">$resultat</span>);
</span><span id="174" class="l"><a class="l" href="#174">174: </a> <span class="php-var">$suppression_cache</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;DELETE FROM cache WHERE id = '</span><span class="php-var">$id</span><span class="php-quote">'&quot;</span>);
</span><span id="175" class="l"><a class="l" href="#175">175: </a> <span class="php-var">$suppression_tags</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;DELETE FROM tag WHERE id = '</span><span class="php-var">$id</span><span class="php-quote">'&quot;</span>);
</span><span id="176" class="l"><a class="l" href="#176">176: </a> <span class="php-var">$this</span>-&gt;defragmenterAutomatiquement();
</span><span id="177" class="l"><a class="l" href="#177">177: </a> <span class="php-keyword1">return</span> (<span class="php-var">$resultat_nbre</span> &amp;&amp; <span class="php-var">$suppression_cache</span> &amp;&amp; <span class="php-var">$suppression_tags</span>);
</span><span id="178" class="l"><a class="l" href="#178">178: </a> }
</span><span id="179" class="l"><a class="l" href="#179">179: </a>
</span><span id="180" class="l"><a class="l" href="#180">180: </a> <span class="php-comment">/**
</span></span><span id="181" class="l"><a class="l" href="#181">181: </a><span class="php-comment"> * Clean some cache records
</span></span><span id="182" class="l"><a class="l" href="#182">182: </a><span class="php-comment"> *
</span></span><span id="183" class="l"><a class="l" href="#183">183: </a><span class="php-comment"> * Available modes are :
</span></span><span id="184" class="l"><a class="l" href="#184">184: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_ALL (default) =&gt; remove all cache entries ($tags is not used)
</span></span><span id="185" class="l"><a class="l" href="#185">185: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_OLD =&gt; remove too old cache entries ($tags is not used)
</span></span><span id="186" class="l"><a class="l" href="#186">186: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_MATCHING_TAG =&gt; remove cache entries matching all given tags
</span></span><span id="187" class="l"><a class="l" href="#187">187: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="188" class="l"><a class="l" href="#188">188: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG =&gt; remove cache entries not {matching one of the given tags}
</span></span><span id="189" class="l"><a class="l" href="#189">189: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="190" class="l"><a class="l" href="#190">190: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG =&gt; remove cache entries matching any given tags
</span></span><span id="191" class="l"><a class="l" href="#191">191: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="192" class="l"><a class="l" href="#192">192: </a><span class="php-comment"> *
</span></span><span id="193" class="l"><a class="l" href="#193">193: </a><span class="php-comment"> * @param string $mode Clean mode
</span></span><span id="194" class="l"><a class="l" href="#194">194: </a><span class="php-comment"> * @param array $tags Array of tags
</span></span><span id="195" class="l"><a class="l" href="#195">195: </a><span class="php-comment"> * @return boolean True if no problem
</span></span><span id="196" class="l"><a class="l" href="#196">196: </a><span class="php-comment"> */</span>
</span><span id="197" class="l"><a class="l" href="#197">197: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_nettoyer" href="#_nettoyer">nettoyer</a>(<span class="php-var">$mode</span> = Cache::NETTOYAGE_MODE_TOUS, <span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="198" class="l"><a class="l" href="#198">198: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="199" class="l"><a class="l" href="#199">199: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;nettoyerSqlite(<span class="php-var">$mode</span>, <span class="php-var">$tags</span>);
</span><span id="200" class="l"><a class="l" href="#200">200: </a> <span class="php-var">$this</span>-&gt;defragmenterAutomatiquement();
</span><span id="201" class="l"><a class="l" href="#201">201: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="202" class="l"><a class="l" href="#202">202: </a> }
</span><span id="203" class="l"><a class="l" href="#203">203: </a>
</span><span id="204" class="l"><a class="l" href="#204">204: </a> <span class="php-comment">/**
</span></span><span id="205" class="l"><a class="l" href="#205">205: </a><span class="php-comment"> * Return an array of stored cache ids
</span></span><span id="206" class="l"><a class="l" href="#206">206: </a><span class="php-comment"> *
</span></span><span id="207" class="l"><a class="l" href="#207">207: </a><span class="php-comment"> * @return array array of stored cache ids (string)
</span></span><span id="208" class="l"><a class="l" href="#208">208: </a><span class="php-comment"> */</span>
</span><span id="209" class="l"><a class="l" href="#209">209: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIds" href="#_getIds">getIds</a>() {
</span><span id="210" class="l"><a class="l" href="#210">210: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="211" class="l"><a class="l" href="#211">211: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'SELECT id FROM cache WHERE (expire = 0 OR expire &gt; '</span>.<span class="php-keyword2">time</span>().<span class="php-quote">')'</span>);
</span><span id="212" class="l"><a class="l" href="#212">212: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">array</span>();
</span><span id="213" class="l"><a class="l" href="#213">213: </a> <span class="php-keyword1">while</span> (<span class="php-var">$id</span> = @<span class="php-keyword2">sqlite_fetch_single</span>(<span class="php-var">$resultat</span>)) {
</span><span id="214" class="l"><a class="l" href="#214">214: </a> <span class="php-var">$retour</span>[] = <span class="php-var">$id</span>;
</span><span id="215" class="l"><a class="l" href="#215">215: </a> }
</span><span id="216" class="l"><a class="l" href="#216">216: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="217" class="l"><a class="l" href="#217">217: </a> }
</span><span id="218" class="l"><a class="l" href="#218">218: </a>
</span><span id="219" class="l"><a class="l" href="#219">219: </a> <span class="php-comment">/**
</span></span><span id="220" class="l"><a class="l" href="#220">220: </a><span class="php-comment"> * Return an array of stored tags
</span></span><span id="221" class="l"><a class="l" href="#221">221: </a><span class="php-comment"> *
</span></span><span id="222" class="l"><a class="l" href="#222">222: </a><span class="php-comment"> * @return array array of stored tags (string)
</span></span><span id="223" class="l"><a class="l" href="#223">223: </a><span class="php-comment"> */</span>
</span><span id="224" class="l"><a class="l" href="#224">224: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getTags" href="#_getTags">getTags</a>() {
</span><span id="225" class="l"><a class="l" href="#225">225: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="226" class="l"><a class="l" href="#226">226: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'SELECT DISTINCT(name) AS name FROM tag'</span>);
</span><span id="227" class="l"><a class="l" href="#227">227: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">array</span>();
</span><span id="228" class="l"><a class="l" href="#228">228: </a> <span class="php-keyword1">while</span> (<span class="php-var">$id</span> = @<span class="php-keyword2">sqlite_fetch_single</span>(<span class="php-var">$resultat</span>)) {
</span><span id="229" class="l"><a class="l" href="#229">229: </a> <span class="php-var">$retour</span>[] = <span class="php-var">$id</span>;
</span><span id="230" class="l"><a class="l" href="#230">230: </a> }
</span><span id="231" class="l"><a class="l" href="#231">231: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="232" class="l"><a class="l" href="#232">232: </a> }
</span><span id="233" class="l"><a class="l" href="#233">233: </a>
</span><span id="234" class="l"><a class="l" href="#234">234: </a> <span class="php-comment">/**
</span></span><span id="235" class="l"><a class="l" href="#235">235: </a><span class="php-comment"> * Return an array of stored cache ids which match given tags
</span></span><span id="236" class="l"><a class="l" href="#236">236: </a><span class="php-comment"> *
</span></span><span id="237" class="l"><a class="l" href="#237">237: </a><span class="php-comment"> * In case of multiple tags, a logical AND is made between tags
</span></span><span id="238" class="l"><a class="l" href="#238">238: </a><span class="php-comment"> *
</span></span><span id="239" class="l"><a class="l" href="#239">239: </a><span class="php-comment"> * @param array $tags array of tags
</span></span><span id="240" class="l"><a class="l" href="#240">240: </a><span class="php-comment"> * @return array array of matching cache ids (string)
</span></span><span id="241" class="l"><a class="l" href="#241">241: </a><span class="php-comment"> */</span>
</span><span id="242" class="l"><a class="l" href="#242">242: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIdsAvecLesTags" href="#_getIdsAvecLesTags">getIdsAvecLesTags</a>(<span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="243" class="l"><a class="l" href="#243">243: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="244" class="l"><a class="l" href="#244">244: </a> <span class="php-var">$premier</span> = <span class="php-keyword1">true</span>;
</span><span id="245" class="l"><a class="l" href="#245">245: </a> <span class="php-var">$ids</span> = <span class="php-keyword1">array</span>();
</span><span id="246" class="l"><a class="l" href="#246">246: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tags</span> <span class="php-keyword1">as</span> <span class="php-var">$tag</span>) {
</span><span id="247" class="l"><a class="l" href="#247">247: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;SELECT DISTINCT(id) AS id FROM tag WHERE name='</span><span class="php-var">$tag</span><span class="php-quote">'&quot;</span>);
</span><span id="248" class="l"><a class="l" href="#248">248: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span>) {
</span><span id="249" class="l"><a class="l" href="#249">249: </a> <span class="php-var">$lignes</span> = @<span class="php-keyword2">sqlite_fetch_all</span>(<span class="php-var">$resultat</span>, SQLITE_ASSOC);
</span><span id="250" class="l"><a class="l" href="#250">250: </a> <span class="php-var">$ids_tmp</span> = <span class="php-keyword1">array</span>();
</span><span id="251" class="l"><a class="l" href="#251">251: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$lignes</span> <span class="php-keyword1">as</span> <span class="php-var">$ligne</span>) {
</span><span id="252" class="l"><a class="l" href="#252">252: </a> <span class="php-var">$ids_tmp</span>[] = <span class="php-var">$ligne</span>[<span class="php-quote">'id'</span>];
</span><span id="253" class="l"><a class="l" href="#253">253: </a> }
</span><span id="254" class="l"><a class="l" href="#254">254: </a> <span class="php-keyword1">if</span> (<span class="php-var">$premier</span>) {
</span><span id="255" class="l"><a class="l" href="#255">255: </a> <span class="php-var">$ids</span> = <span class="php-var">$ids_tmp</span>;
</span><span id="256" class="l"><a class="l" href="#256">256: </a> <span class="php-var">$premier</span> = <span class="php-keyword1">false</span>;
</span><span id="257" class="l"><a class="l" href="#257">257: </a> } <span class="php-keyword1">else</span> {
</span><span id="258" class="l"><a class="l" href="#258">258: </a> <span class="php-var">$ids</span> = <span class="php-keyword2">array_intersect</span>(<span class="php-var">$ids</span>, <span class="php-var">$ids_tmp</span>);
</span><span id="259" class="l"><a class="l" href="#259">259: </a> }
</span><span id="260" class="l"><a class="l" href="#260">260: </a> }
</span><span id="261" class="l"><a class="l" href="#261">261: </a> }
</span><span id="262" class="l"><a class="l" href="#262">262: </a>
</span><span id="263" class="l"><a class="l" href="#263">263: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">array</span>();
</span><span id="264" class="l"><a class="l" href="#264">264: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(<span class="php-var">$ids</span>) &gt; <span class="php-num">0</span>) {
</span><span id="265" class="l"><a class="l" href="#265">265: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$ids</span> <span class="php-keyword1">as</span> <span class="php-var">$id</span>) {
</span><span id="266" class="l"><a class="l" href="#266">266: </a> <span class="php-var">$retour</span>[] = <span class="php-var">$id</span>;
</span><span id="267" class="l"><a class="l" href="#267">267: </a> }
</span><span id="268" class="l"><a class="l" href="#268">268: </a> }
</span><span id="269" class="l"><a class="l" href="#269">269: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="270" class="l"><a class="l" href="#270">270: </a> }
</span><span id="271" class="l"><a class="l" href="#271">271: </a>
</span><span id="272" class="l"><a class="l" href="#272">272: </a> <span class="php-comment">/**
</span></span><span id="273" class="l"><a class="l" href="#273">273: </a><span class="php-comment"> * Return an array of stored cache ids which don't match given tags
</span></span><span id="274" class="l"><a class="l" href="#274">274: </a><span class="php-comment"> *
</span></span><span id="275" class="l"><a class="l" href="#275">275: </a><span class="php-comment"> * In case of multiple tags, a logical OR is made between tags
</span></span><span id="276" class="l"><a class="l" href="#276">276: </a><span class="php-comment"> *
</span></span><span id="277" class="l"><a class="l" href="#277">277: </a><span class="php-comment"> * @param array $tags array of tags
</span></span><span id="278" class="l"><a class="l" href="#278">278: </a><span class="php-comment"> * @return array array of not matching cache ids (string)
</span></span><span id="279" class="l"><a class="l" href="#279">279: </a><span class="php-comment"> */</span>
</span><span id="280" class="l"><a class="l" href="#280">280: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIdsSansLesTags" href="#_getIdsSansLesTags">getIdsSansLesTags</a>(<span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="281" class="l"><a class="l" href="#281">281: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="282" class="l"><a class="l" href="#282">282: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'SELECT id FROM cache'</span>);
</span><span id="283" class="l"><a class="l" href="#283">283: </a> <span class="php-var">$lignes</span> = @<span class="php-keyword2">sqlite_fetch_all</span>(<span class="php-var">$resultat</span>, SQLITE_ASSOC);
</span><span id="284" class="l"><a class="l" href="#284">284: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">array</span>();
</span><span id="285" class="l"><a class="l" href="#285">285: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$lignes</span> <span class="php-keyword1">as</span> <span class="php-var">$ligne</span>) {
</span><span id="286" class="l"><a class="l" href="#286">286: </a> <span class="php-var">$id</span> = <span class="php-var">$ligne</span>[<span class="php-quote">'id'</span>];
</span><span id="287" class="l"><a class="l" href="#287">287: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">false</span>;
</span><span id="288" class="l"><a class="l" href="#288">288: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tags</span> <span class="php-keyword1">as</span> <span class="php-var">$tag</span>) {
</span><span id="289" class="l"><a class="l" href="#289">289: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;SELECT COUNT(*) AS nbr FROM tag WHERE name = '</span><span class="php-var">$tag</span><span class="php-quote">' AND id = '</span><span class="php-var">$id</span><span class="php-quote">'&quot;</span>);
</span><span id="290" class="l"><a class="l" href="#290">290: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span>) {
</span><span id="291" class="l"><a class="l" href="#291">291: </a> <span class="php-var">$nbre</span> = (int) @<span class="php-keyword2">sqlite_fetch_single</span>(<span class="php-var">$resultat</span>);
</span><span id="292" class="l"><a class="l" href="#292">292: </a> <span class="php-keyword1">if</span> (<span class="php-var">$nbre</span> &gt; <span class="php-num">0</span>) {
</span><span id="293" class="l"><a class="l" href="#293">293: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">true</span>;
</span><span id="294" class="l"><a class="l" href="#294">294: </a> }
</span><span id="295" class="l"><a class="l" href="#295">295: </a> }
</span><span id="296" class="l"><a class="l" href="#296">296: </a> }
</span><span id="297" class="l"><a class="l" href="#297">297: </a> <span class="php-keyword1">if</span> (!<span class="php-var">$correspondance</span>) {
</span><span id="298" class="l"><a class="l" href="#298">298: </a> <span class="php-var">$retour</span>[] = <span class="php-var">$id</span>;
</span><span id="299" class="l"><a class="l" href="#299">299: </a> }
</span><span id="300" class="l"><a class="l" href="#300">300: </a> }
</span><span id="301" class="l"><a class="l" href="#301">301: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="302" class="l"><a class="l" href="#302">302: </a> }
</span><span id="303" class="l"><a class="l" href="#303">303: </a>
</span><span id="304" class="l"><a class="l" href="#304">304: </a> <span class="php-comment">/**
</span></span><span id="305" class="l"><a class="l" href="#305">305: </a><span class="php-comment"> * Return an array of stored cache ids which match any given tags
</span></span><span id="306" class="l"><a class="l" href="#306">306: </a><span class="php-comment"> *
</span></span><span id="307" class="l"><a class="l" href="#307">307: </a><span class="php-comment"> * In case of multiple tags, a logical AND is made between tags
</span></span><span id="308" class="l"><a class="l" href="#308">308: </a><span class="php-comment"> *
</span></span><span id="309" class="l"><a class="l" href="#309">309: </a><span class="php-comment"> * @param array $tags array of tags
</span></span><span id="310" class="l"><a class="l" href="#310">310: </a><span class="php-comment"> * @return array array of any matching cache ids (string)
</span></span><span id="311" class="l"><a class="l" href="#311">311: </a><span class="php-comment"> */</span>
</span><span id="312" class="l"><a class="l" href="#312">312: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIdsAvecUnTag" href="#_getIdsAvecUnTag">getIdsAvecUnTag</a>(<span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="313" class="l"><a class="l" href="#313">313: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="314" class="l"><a class="l" href="#314">314: </a> <span class="php-var">$premier</span> = <span class="php-keyword1">true</span>;
</span><span id="315" class="l"><a class="l" href="#315">315: </a> <span class="php-var">$ids</span> = <span class="php-keyword1">array</span>();
</span><span id="316" class="l"><a class="l" href="#316">316: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tags</span> <span class="php-keyword1">as</span> <span class="php-var">$tag</span>) {
</span><span id="317" class="l"><a class="l" href="#317">317: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;SELECT DISTINCT(id) AS id FROM tag WHERE name = '</span><span class="php-var">$tag</span><span class="php-quote">'&quot;</span>);
</span><span id="318" class="l"><a class="l" href="#318">318: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span>) {
</span><span id="319" class="l"><a class="l" href="#319">319: </a> <span class="php-var">$lignes</span> = @<span class="php-keyword2">sqlite_fetch_all</span>(<span class="php-var">$resultat</span>, SQLITE_ASSOC);
</span><span id="320" class="l"><a class="l" href="#320">320: </a> <span class="php-var">$ids_tmp</span> = <span class="php-keyword1">array</span>();
</span><span id="321" class="l"><a class="l" href="#321">321: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$lignes</span> <span class="php-keyword1">as</span> <span class="php-var">$ligne</span>) {
</span><span id="322" class="l"><a class="l" href="#322">322: </a> <span class="php-var">$ids_tmp</span>[] = <span class="php-var">$ligne</span>[<span class="php-quote">'id'</span>];
</span><span id="323" class="l"><a class="l" href="#323">323: </a> }
</span><span id="324" class="l"><a class="l" href="#324">324: </a> <span class="php-keyword1">if</span> (<span class="php-var">$premier</span>) {
</span><span id="325" class="l"><a class="l" href="#325">325: </a> <span class="php-var">$ids</span> = <span class="php-var">$ids_tmp</span>;
</span><span id="326" class="l"><a class="l" href="#326">326: </a> <span class="php-var">$premier</span> = <span class="php-keyword1">false</span>;
</span><span id="327" class="l"><a class="l" href="#327">327: </a> } <span class="php-keyword1">else</span> {
</span><span id="328" class="l"><a class="l" href="#328">328: </a> <span class="php-var">$ids</span> = <span class="php-keyword2">array_merge</span>(<span class="php-var">$ids</span>, <span class="php-var">$ids_tmp</span>);
</span><span id="329" class="l"><a class="l" href="#329">329: </a> }
</span><span id="330" class="l"><a class="l" href="#330">330: </a> }
</span><span id="331" class="l"><a class="l" href="#331">331: </a> }
</span><span id="332" class="l"><a class="l" href="#332">332: </a>
</span><span id="333" class="l"><a class="l" href="#333">333: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">array</span>();
</span><span id="334" class="l"><a class="l" href="#334">334: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(<span class="php-var">$ids</span>) &gt; <span class="php-num">0</span>) {
</span><span id="335" class="l"><a class="l" href="#335">335: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$ids</span> <span class="php-keyword1">as</span> <span class="php-var">$id</span>) {
</span><span id="336" class="l"><a class="l" href="#336">336: </a> <span class="php-var">$retour</span>[] = <span class="php-var">$id</span>;
</span><span id="337" class="l"><a class="l" href="#337">337: </a> }
</span><span id="338" class="l"><a class="l" href="#338">338: </a> }
</span><span id="339" class="l"><a class="l" href="#339">339: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="340" class="l"><a class="l" href="#340">340: </a> }
</span><span id="341" class="l"><a class="l" href="#341">341: </a>
</span><span id="342" class="l"><a class="l" href="#342">342: </a> <span class="php-comment">/**
</span></span><span id="343" class="l"><a class="l" href="#343">343: </a><span class="php-comment"> * Return the filling percentage of the backend storage
</span></span><span id="344" class="l"><a class="l" href="#344">344: </a><span class="php-comment"> *
</span></span><span id="345" class="l"><a class="l" href="#345">345: </a><span class="php-comment"> * @throws Zend_Cache_Exception
</span></span><span id="346" class="l"><a class="l" href="#346">346: </a><span class="php-comment"> * @return int integer between 0 and 100
</span></span><span id="347" class="l"><a class="l" href="#347">347: </a><span class="php-comment"> */</span>
</span><span id="348" class="l"><a class="l" href="#348">348: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getPourcentageRemplissage" href="#_getPourcentageRemplissage">getPourcentageRemplissage</a>() {
</span><span id="349" class="l"><a class="l" href="#349">349: </a> <span class="php-var">$dossier</span> = <span class="php-keyword2">dirname</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>]);
</span><span id="350" class="l"><a class="l" href="#350">350: </a> <span class="php-var">$libre</span> = <span class="php-keyword2">disk_free_space</span>(<span class="php-var">$dossier</span>);
</span><span id="351" class="l"><a class="l" href="#351">351: </a> <span class="php-var">$total</span> = <span class="php-keyword2">disk_total_space</span>(<span class="php-var">$dossier</span>);
</span><span id="352" class="l"><a class="l" href="#352">352: </a>
</span><span id="353" class="l"><a class="l" href="#353">353: </a> <span class="php-var">$pourcentage</span> = <span class="php-num">0</span>;
</span><span id="354" class="l"><a class="l" href="#354">354: </a> <span class="php-keyword1">if</span> (<span class="php-var">$total</span> == <span class="php-num">0</span>) {
</span><span id="355" class="l"><a class="l" href="#355">355: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Impossible d'utiliser la fonction disk_total_space&quot;</span>, E_USER_WARNING);
</span><span id="356" class="l"><a class="l" href="#356">356: </a> } <span class="php-keyword1">else</span> {
</span><span id="357" class="l"><a class="l" href="#357">357: </a> <span class="php-var">$pourcentage</span> = (<span class="php-var">$libre</span> &gt;= <span class="php-var">$total</span>) ? <span class="php-num">100</span> : ((int) (<span class="php-num">100</span>. * (<span class="php-var">$total</span> - <span class="php-var">$libre</span>) / <span class="php-var">$total</span>));
</span><span id="358" class="l"><a class="l" href="#358">358: </a> }
</span><span id="359" class="l"><a class="l" href="#359">359: </a> <span class="php-keyword1">return</span> <span class="php-var">$pourcentage</span>;
</span><span id="360" class="l"><a class="l" href="#360">360: </a> }
</span><span id="361" class="l"><a class="l" href="#361">361: </a>
</span><span id="362" class="l"><a class="l" href="#362">362: </a> <span class="php-comment">/**
</span></span><span id="363" class="l"><a class="l" href="#363">363: </a><span class="php-comment"> * Return an array of metadatas for the given cache id
</span></span><span id="364" class="l"><a class="l" href="#364">364: </a><span class="php-comment"> *
</span></span><span id="365" class="l"><a class="l" href="#365">365: </a><span class="php-comment"> * The array must include these keys :
</span></span><span id="366" class="l"><a class="l" href="#366">366: </a><span class="php-comment"> * - expire : the expire timestamp
</span></span><span id="367" class="l"><a class="l" href="#367">367: </a><span class="php-comment"> * - tags : a string array of tags
</span></span><span id="368" class="l"><a class="l" href="#368">368: </a><span class="php-comment"> * - mtime : timestamp of last modification time
</span></span><span id="369" class="l"><a class="l" href="#369">369: </a><span class="php-comment"> *
</span></span><span id="370" class="l"><a class="l" href="#370">370: </a><span class="php-comment"> * @param string $id cache id
</span></span><span id="371" class="l"><a class="l" href="#371">371: </a><span class="php-comment"> * @return array array of metadatas (false if the cache id is not found)
</span></span><span id="372" class="l"><a class="l" href="#372">372: </a><span class="php-comment"> */</span>
</span><span id="373" class="l"><a class="l" href="#373">373: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getMetadonnees" href="#_getMetadonnees">getMetadonnees</a>(<span class="php-var">$id</span>) {
</span><span id="374" class="l"><a class="l" href="#374">374: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="375" class="l"><a class="l" href="#375">375: </a> <span class="php-var">$tags</span> = <span class="php-keyword1">array</span>();
</span><span id="376" class="l"><a class="l" href="#376">376: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;SELECT name FROM tag WHERE id = '</span><span class="php-var">$id</span><span class="php-quote">'&quot;</span>);
</span><span id="377" class="l"><a class="l" href="#377">377: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span>) {
</span><span id="378" class="l"><a class="l" href="#378">378: </a> <span class="php-var">$lignes</span> = @<span class="php-keyword2">sqlite_fetch_all</span>(<span class="php-var">$resultat</span>, SQLITE_ASSOC);
</span><span id="379" class="l"><a class="l" href="#379">379: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$lignes</span> <span class="php-keyword1">as</span> <span class="php-var">$ligne</span>) {
</span><span id="380" class="l"><a class="l" href="#380">380: </a> <span class="php-var">$tags</span>[] = <span class="php-var">$ligne</span>[<span class="php-quote">'name'</span>];
</span><span id="381" class="l"><a class="l" href="#381">381: </a> }
</span><span id="382" class="l"><a class="l" href="#382">382: </a> }
</span><span id="383" class="l"><a class="l" href="#383">383: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;SELECT lastModified, expire FROM cache WHERE id = '</span><span class="php-var">$id</span><span class="php-quote">'&quot;</span>);
</span><span id="384" class="l"><a class="l" href="#384">384: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span>) {
</span><span id="385" class="l"><a class="l" href="#385">385: </a> <span class="php-var">$ligne</span> = @<span class="php-keyword2">sqlite_fetch_array</span>(<span class="php-var">$resultat</span>, SQLITE_ASSOC);
</span><span id="386" class="l"><a class="l" href="#386">386: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">array</span>(
</span><span id="387" class="l"><a class="l" href="#387">387: </a> <span class="php-quote">'tags'</span> =&gt; <span class="php-var">$tags</span>,
</span><span id="388" class="l"><a class="l" href="#388">388: </a> <span class="php-quote">'mtime'</span> =&gt; <span class="php-var">$ligne</span>[<span class="php-quote">'lastModified'</span>],
</span><span id="389" class="l"><a class="l" href="#389">389: </a> <span class="php-quote">'expiration'</span> =&gt; <span class="php-var">$ligne</span>[<span class="php-quote">'expire'</span>]);
</span><span id="390" class="l"><a class="l" href="#390">390: </a> } <span class="php-keyword1">else</span> {
</span><span id="391" class="l"><a class="l" href="#391">391: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">false</span>;
</span><span id="392" class="l"><a class="l" href="#392">392: </a> }
</span><span id="393" class="l"><a class="l" href="#393">393: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="394" class="l"><a class="l" href="#394">394: </a> }
</span><span id="395" class="l"><a class="l" href="#395">395: </a>
</span><span id="396" class="l"><a class="l" href="#396">396: </a> <span class="php-comment">/**
</span></span><span id="397" class="l"><a class="l" href="#397">397: </a><span class="php-comment"> * Give (if possible) an extra lifetime to the given cache id
</span></span><span id="398" class="l"><a class="l" href="#398">398: </a><span class="php-comment"> *
</span></span><span id="399" class="l"><a class="l" href="#399">399: </a><span class="php-comment"> * @param string $id cache id
</span></span><span id="400" class="l"><a class="l" href="#400">400: </a><span class="php-comment"> * @param int $extraLifetime
</span></span><span id="401" class="l"><a class="l" href="#401">401: </a><span class="php-comment"> * @return boolean true if ok
</span></span><span id="402" class="l"><a class="l" href="#402">402: </a><span class="php-comment"> */</span>
</span><span id="403" class="l"><a class="l" href="#403">403: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_ajouterSupplementDureeDeVie" href="#_ajouterSupplementDureeDeVie">ajouterSupplementDureeDeVie</a>(<span class="php-var">$id</span>, <span class="php-var">$supplement_duree_de_vie</span>) {
</span><span id="404" class="l"><a class="l" href="#404">404: </a> <span class="php-var">$this</span>-&gt;verifierEtCreerStructureBdd();
</span><span id="405" class="l"><a class="l" href="#405">405: </a> <span class="php-var">$augmentation</span> = <span class="php-keyword1">false</span>;
</span><span id="406" class="l"><a class="l" href="#406">406: </a> <span class="php-var">$requete</span> = <span class="php-quote">&quot;SELECT expire FROM cache WHERE id = '</span><span class="php-var">$id</span><span class="php-quote">' AND (expire = 0 OR expire &gt; &quot;</span>.<span class="php-keyword2">time</span>().<span class="php-quote">')'</span>;
</span><span id="407" class="l"><a class="l" href="#407">407: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-var">$requete</span>);
</span><span id="408" class="l"><a class="l" href="#408">408: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span>) {
</span><span id="409" class="l"><a class="l" href="#409">409: </a> <span class="php-var">$expiration</span> = @<span class="php-keyword2">sqlite_fetch_single</span>(<span class="php-var">$resultat</span>);
</span><span id="410" class="l"><a class="l" href="#410">410: </a> <span class="php-var">$nouvelle_expiration</span> = <span class="php-var">$expiration</span> + <span class="php-var">$supplement_duree_de_vie</span>;
</span><span id="411" class="l"><a class="l" href="#411">411: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'UPDATE cache SET lastModified = '</span>.<span class="php-keyword2">time</span>().<span class="php-quote">&quot;, expire = </span><span class="php-var">$nouvelle_expiration</span><span class="php-quote"> WHERE id = '</span><span class="php-var">$id</span><span class="php-quote">'&quot;</span>);
</span><span id="412" class="l"><a class="l" href="#412">412: </a> <span class="php-var">$augmentation</span> = (<span class="php-var">$resultat</span>) ? <span class="php-keyword1">true</span> : <span class="php-keyword1">false</span>;
</span><span id="413" class="l"><a class="l" href="#413">413: </a> }
</span><span id="414" class="l"><a class="l" href="#414">414: </a> <span class="php-keyword1">return</span> <span class="php-var">$augmentation</span>;
</span><span id="415" class="l"><a class="l" href="#415">415: </a> }
</span><span id="416" class="l"><a class="l" href="#416">416: </a>
</span><span id="417" class="l"><a class="l" href="#417">417: </a> <span class="php-comment">/**
</span></span><span id="418" class="l"><a class="l" href="#418">418: </a><span class="php-comment"> * Return the connection resource
</span></span><span id="419" class="l"><a class="l" href="#419">419: </a><span class="php-comment"> *
</span></span><span id="420" class="l"><a class="l" href="#420">420: </a><span class="php-comment"> * If we are not connected, the connection is made
</span></span><span id="421" class="l"><a class="l" href="#421">421: </a><span class="php-comment"> *
</span></span><span id="422" class="l"><a class="l" href="#422">422: </a><span class="php-comment"> * @throws Zend_Cache_Exception
</span></span><span id="423" class="l"><a class="l" href="#423">423: </a><span class="php-comment"> * @return resource Connection resource
</span></span><span id="424" class="l"><a class="l" href="#424">424: </a><span class="php-comment"> */</span>
</span><span id="425" class="l"><a class="l" href="#425">425: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_getConnexion" href="#_getConnexion">getConnexion</a>() {
</span><span id="426" class="l"><a class="l" href="#426">426: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_resource</span>(<span class="php-var">$this</span>-&gt;bdd)) {
</span><span id="427" class="l"><a class="l" href="#427">427: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>] === <span class="php-keyword1">null</span>) {
</span><span id="428" class="l"><a class="l" href="#428">428: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;L'emplacement du chemin vers le fichier de la base de données SQLite n'a pas été défini&quot;</span>;
</span><span id="429" class="l"><a class="l" href="#429">429: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_ERROR);
</span><span id="430" class="l"><a class="l" href="#430">430: </a> } <span class="php-keyword1">else</span> {
</span><span id="431" class="l"><a class="l" href="#431">431: </a> <span class="php-var">$this</span>-&gt;bdd = <span class="php-keyword2">sqlite_open</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>]);
</span><span id="432" class="l"><a class="l" href="#432">432: </a> <span class="php-keyword1">if</span> (!(<span class="php-keyword2">is_resource</span>(<span class="php-var">$this</span>-&gt;bdd))) {
</span><span id="433" class="l"><a class="l" href="#433">433: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Impossible d'ouvrir le fichier '&quot;</span>.<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>].<span class="php-quote">&quot;' de la base de données SQLite.&quot;</span>;
</span><span id="434" class="l"><a class="l" href="#434">434: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_ERROR);
</span><span id="435" class="l"><a class="l" href="#435">435: </a> <span class="php-var">$this</span>-&gt;bdd = <span class="php-keyword1">null</span>;
</span><span id="436" class="l"><a class="l" href="#436">436: </a> }
</span><span id="437" class="l"><a class="l" href="#437">437: </a> }
</span><span id="438" class="l"><a class="l" href="#438">438: </a> }
</span><span id="439" class="l"><a class="l" href="#439">439: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;bdd;
</span><span id="440" class="l"><a class="l" href="#440">440: </a> }
</span><span id="441" class="l"><a class="l" href="#441">441: </a>
</span><span id="442" class="l"><a class="l" href="#442">442: </a> <span class="php-comment">/**
</span></span><span id="443" class="l"><a class="l" href="#443">443: </a><span class="php-comment"> * Execute une requête SQL sans afficher de messages d'erreur.
</span></span><span id="444" class="l"><a class="l" href="#444">444: </a><span class="php-comment"> *
</span></span><span id="445" class="l"><a class="l" href="#445">445: </a><span class="php-comment"> * @param string $requete requête SQL
</span></span><span id="446" class="l"><a class="l" href="#446">446: </a><span class="php-comment"> * @return mixed|false resultats de la requête
</span></span><span id="447" class="l"><a class="l" href="#447">447: </a><span class="php-comment"> */</span>
</span><span id="448" class="l"><a class="l" href="#448">448: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_requeter" href="#_requeter">requeter</a>(<span class="php-var">$requete</span>) {
</span><span id="449" class="l"><a class="l" href="#449">449: </a> <span class="php-var">$bdd</span> = <span class="php-var">$this</span>-&gt;getConnexion();
</span><span id="450" class="l"><a class="l" href="#450">450: </a> <span class="php-comment">//Debug::printr($requete);</span>
</span><span id="451" class="l"><a class="l" href="#451">451: </a> <span class="php-var">$resultat</span> = (<span class="php-keyword2">is_resource</span>(<span class="php-var">$bdd</span>)) ? @<span class="php-keyword2">sqlite_query</span>(<span class="php-var">$bdd</span>, <span class="php-var">$requete</span>, SQLITE_ASSOC, <span class="php-var">$e_sqlite</span>) : <span class="php-keyword1">false</span>;
</span><span id="452" class="l"><a class="l" href="#452">452: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_resource</span>(<span class="php-var">$bdd</span>) &amp;&amp; ! <span class="php-var">$resultat</span>) {
</span><span id="453" class="l"><a class="l" href="#453">453: </a> Debug::printr(<span class="php-quote">&quot;Erreur SQLITE :\n</span><span class="php-var">$e_sqlite</span><span class="php-quote">\nPour la requête :\n</span><span class="php-var">$requete</span><span class="php-quote">\nRessource : </span><span class="php-var">$bdd</span><span class="php-quote">&quot;</span>);
</span><span id="454" class="l"><a class="l" href="#454">454: </a> }
</span><span id="455" class="l"><a class="l" href="#455">455: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="456" class="l"><a class="l" href="#456">456: </a> }
</span><span id="457" class="l"><a class="l" href="#457">457: </a>
</span><span id="458" class="l"><a class="l" href="#458">458: </a> <span class="php-comment">/**
</span></span><span id="459" class="l"><a class="l" href="#459">459: </a><span class="php-comment"> * Deal with the automatic vacuum process
</span></span><span id="460" class="l"><a class="l" href="#460">460: </a><span class="php-comment"> *
</span></span><span id="461" class="l"><a class="l" href="#461">461: </a><span class="php-comment"> * @return void
</span></span><span id="462" class="l"><a class="l" href="#462">462: </a><span class="php-comment"> */</span>
</span><span id="463" class="l"><a class="l" href="#463">463: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_defragmenterAutomatiquement" href="#_defragmenterAutomatiquement">defragmenterAutomatiquement</a>() {
</span><span id="464" class="l"><a class="l" href="#464">464: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'defragmentation_auto'</span>] &gt; <span class="php-num">0</span>) {
</span><span id="465" class="l"><a class="l" href="#465">465: </a> <span class="php-var">$rand</span> = <span class="php-keyword2">rand</span>(<span class="php-num">1</span>, <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'defragmentation_auto'</span>]);
</span><span id="466" class="l"><a class="l" href="#466">466: </a> <span class="php-keyword1">if</span> (<span class="php-var">$rand</span> == <span class="php-num">1</span>) {
</span><span id="467" class="l"><a class="l" href="#467">467: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'VACUUM'</span>);
</span><span id="468" class="l"><a class="l" href="#468">468: </a> @<span class="php-keyword2">sqlite_close</span>(<span class="php-var">$this</span>-&gt;getConnexion());
</span><span id="469" class="l"><a class="l" href="#469">469: </a> }
</span><span id="470" class="l"><a class="l" href="#470">470: </a> }
</span><span id="471" class="l"><a class="l" href="#471">471: </a> }
</span><span id="472" class="l"><a class="l" href="#472">472: </a>
</span><span id="473" class="l"><a class="l" href="#473">473: </a> <span class="php-comment">/**
</span></span><span id="474" class="l"><a class="l" href="#474">474: </a><span class="php-comment"> * Register a cache id with the given tag
</span></span><span id="475" class="l"><a class="l" href="#475">475: </a><span class="php-comment"> *
</span></span><span id="476" class="l"><a class="l" href="#476">476: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="477" class="l"><a class="l" href="#477">477: </a><span class="php-comment"> * @param string $tag Tag
</span></span><span id="478" class="l"><a class="l" href="#478">478: </a><span class="php-comment"> * @return boolean True if no problem
</span></span><span id="479" class="l"><a class="l" href="#479">479: </a><span class="php-comment"> */</span>
</span><span id="480" class="l"><a class="l" href="#480">480: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_enregisterTag" href="#_enregisterTag">enregisterTag</a>(<span class="php-var">$id</span>, <span class="php-var">$tag</span>) {
</span><span id="481" class="l"><a class="l" href="#481">481: </a> <span class="php-var">$requete_suppression</span> = <span class="php-quote">&quot;DELETE FROM tag WHERE name = '</span><span class="php-var">$tag</span><span class="php-quote">' AND id = '</span><span class="php-var">$id</span><span class="php-quote">'&quot;</span>;
</span><span id="482" class="l"><a class="l" href="#482">482: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-var">$requete_suppression</span>);
</span><span id="483" class="l"><a class="l" href="#483">483: </a> <span class="php-var">$requete_insertion</span> = <span class="php-quote">&quot;INSERT INTO tag(name,id) VALUES ('</span><span class="php-var">$tag</span><span class="php-quote">','</span><span class="php-var">$id</span><span class="php-quote">')&quot;</span>;
</span><span id="484" class="l"><a class="l" href="#484">484: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-var">$requete_insertion</span>);
</span><span id="485" class="l"><a class="l" href="#485">485: </a> <span class="php-keyword1">if</span> (!<span class="php-var">$resultat</span>) {
</span><span id="486" class="l"><a class="l" href="#486">486: </a> <span class="php-comment">// TODO : ajouter un log -&gt; impossible d'enregistrer le tag=$tag pour le cache id=$id&quot;);</span>
</span><span id="487" class="l"><a class="l" href="#487">487: </a> Debug::printr(<span class="php-quote">&quot;Impossible d'enregistrer le tag=</span><span class="php-var">$tag</span><span class="php-quote"> pour le cache id=</span><span class="php-var">$id</span><span class="php-quote">&quot;</span>);
</span><span id="488" class="l"><a class="l" href="#488">488: </a> }
</span><span id="489" class="l"><a class="l" href="#489">489: </a> <span class="php-keyword1">return</span> (<span class="php-var">$resultat</span>) ? <span class="php-keyword1">true</span> : <span class="php-keyword1">false</span>;
</span><span id="490" class="l"><a class="l" href="#490">490: </a> }
</span><span id="491" class="l"><a class="l" href="#491">491: </a>
</span><span id="492" class="l"><a class="l" href="#492">492: </a> <span class="php-comment">/**
</span></span><span id="493" class="l"><a class="l" href="#493">493: </a><span class="php-comment"> * Build the database structure
</span></span><span id="494" class="l"><a class="l" href="#494">494: </a><span class="php-comment"> *
</span></span><span id="495" class="l"><a class="l" href="#495">495: </a><span class="php-comment"> * @return false
</span></span><span id="496" class="l"><a class="l" href="#496">496: </a><span class="php-comment"> */</span>
</span><span id="497" class="l"><a class="l" href="#497">497: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_creerStructure" href="#_creerStructure">creerStructure</a>() {
</span><span id="498" class="l"><a class="l" href="#498">498: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'DROP INDEX IF EXISTS tag_id_index'</span>);
</span><span id="499" class="l"><a class="l" href="#499">499: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'DROP INDEX IF EXISTS tag_name_index'</span>);
</span><span id="500" class="l"><a class="l" href="#500">500: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'DROP INDEX IF EXISTS cache_id_expire_index'</span>);
</span><span id="501" class="l"><a class="l" href="#501">501: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'DROP TABLE IF EXISTS version'</span>);
</span><span id="502" class="l"><a class="l" href="#502">502: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'DROP TABLE IF EXISTS cache'</span>);
</span><span id="503" class="l"><a class="l" href="#503">503: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'DROP TABLE IF EXISTS tag'</span>);
</span><span id="504" class="l"><a class="l" href="#504">504: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'CREATE TABLE version (num INTEGER PRIMARY KEY)'</span>);
</span><span id="505" class="l"><a class="l" href="#505">505: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'CREATE TABLE cache(id TEXT PRIMARY KEY, content BLOB, lastModified INTEGER, expire INTEGER)'</span>);
</span><span id="506" class="l"><a class="l" href="#506">506: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'CREATE TABLE tag (name TEXT, id TEXT)'</span>);
</span><span id="507" class="l"><a class="l" href="#507">507: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'CREATE INDEX tag_id_index ON tag(id)'</span>);
</span><span id="508" class="l"><a class="l" href="#508">508: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'CREATE INDEX tag_name_index ON tag(name)'</span>);
</span><span id="509" class="l"><a class="l" href="#509">509: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'CREATE INDEX cache_id_expire_index ON cache(id, expire)'</span>);
</span><span id="510" class="l"><a class="l" href="#510">510: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'INSERT INTO version (num) VALUES (1)'</span>);
</span><span id="511" class="l"><a class="l" href="#511">511: </a> }
</span><span id="512" class="l"><a class="l" href="#512">512: </a>
</span><span id="513" class="l"><a class="l" href="#513">513: </a> <span class="php-comment">/**
</span></span><span id="514" class="l"><a class="l" href="#514">514: </a><span class="php-comment"> * Check if the database structure is ok (with the good version)
</span></span><span id="515" class="l"><a class="l" href="#515">515: </a><span class="php-comment"> *
</span></span><span id="516" class="l"><a class="l" href="#516">516: </a><span class="php-comment"> * @return boolean True if ok
</span></span><span id="517" class="l"><a class="l" href="#517">517: </a><span class="php-comment"> */</span>
</span><span id="518" class="l"><a class="l" href="#518">518: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_verifierBddStructureVersion" href="#_verifierBddStructureVersion">verifierBddStructureVersion</a>() {
</span><span id="519" class="l"><a class="l" href="#519">519: </a> <span class="php-var">$version_ok</span> = <span class="php-keyword1">false</span>;
</span><span id="520" class="l"><a class="l" href="#520">520: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'SELECT num FROM version'</span>);
</span><span id="521" class="l"><a class="l" href="#521">521: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span>) {
</span><span id="522" class="l"><a class="l" href="#522">522: </a> <span class="php-var">$ligne</span> = @<span class="php-keyword2">sqlite_fetch_array</span>(<span class="php-var">$resultat</span>);
</span><span id="523" class="l"><a class="l" href="#523">523: </a> <span class="php-keyword1">if</span> (<span class="php-var">$ligne</span>) {
</span><span id="524" class="l"><a class="l" href="#524">524: </a> <span class="php-keyword1">if</span> (((int) <span class="php-var">$ligne</span>[<span class="php-quote">'num'</span>]) == <span class="php-num">1</span>) {
</span><span id="525" class="l"><a class="l" href="#525">525: </a> <span class="php-var">$version_ok</span> = <span class="php-keyword1">true</span>;
</span><span id="526" class="l"><a class="l" href="#526">526: </a> } <span class="php-keyword1">else</span> {
</span><span id="527" class="l"><a class="l" href="#527">527: </a> <span class="php-comment">// TODO : ajouter un log CacheSqlite::verifierBddStructureVersion() : vielle version de la structure de la base de données de cache détectée =&gt; le cache est entrain d'être supprimé</span>
</span><span id="528" class="l"><a class="l" href="#528">528: </a> }
</span><span id="529" class="l"><a class="l" href="#529">529: </a> }
</span><span id="530" class="l"><a class="l" href="#530">530: </a> }
</span><span id="531" class="l"><a class="l" href="#531">531: </a> <span class="php-keyword1">return</span> <span class="php-var">$version_ok</span>;
</span><span id="532" class="l"><a class="l" href="#532">532: </a> }
</span><span id="533" class="l"><a class="l" href="#533">533: </a>
</span><span id="534" class="l"><a class="l" href="#534">534: </a> <span class="php-comment">/**
</span></span><span id="535" class="l"><a class="l" href="#535">535: </a><span class="php-comment"> * Clean some cache records
</span></span><span id="536" class="l"><a class="l" href="#536">536: </a><span class="php-comment"> *
</span></span><span id="537" class="l"><a class="l" href="#537">537: </a><span class="php-comment"> * Available modes are :
</span></span><span id="538" class="l"><a class="l" href="#538">538: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_ALL (default) =&gt; remove all cache entries ($tags is not used)
</span></span><span id="539" class="l"><a class="l" href="#539">539: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_OLD =&gt; remove too old cache entries ($tags is not used)
</span></span><span id="540" class="l"><a class="l" href="#540">540: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_MATCHING_TAG =&gt; remove cache entries matching all given tags
</span></span><span id="541" class="l"><a class="l" href="#541">541: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="542" class="l"><a class="l" href="#542">542: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG =&gt; remove cache entries not {matching one of the given tags}
</span></span><span id="543" class="l"><a class="l" href="#543">543: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="544" class="l"><a class="l" href="#544">544: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG =&gt; remove cache entries matching any given tags
</span></span><span id="545" class="l"><a class="l" href="#545">545: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="546" class="l"><a class="l" href="#546">546: </a><span class="php-comment"> *
</span></span><span id="547" class="l"><a class="l" href="#547">547: </a><span class="php-comment"> * @param string $mode Clean mode
</span></span><span id="548" class="l"><a class="l" href="#548">548: </a><span class="php-comment"> * @param array $tags Array of tags
</span></span><span id="549" class="l"><a class="l" href="#549">549: </a><span class="php-comment"> * @return boolean True if no problem
</span></span><span id="550" class="l"><a class="l" href="#550">550: </a><span class="php-comment"> */</span>
</span><span id="551" class="l"><a class="l" href="#551">551: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_nettoyerSqlite" href="#_nettoyerSqlite">nettoyerSqlite</a>(<span class="php-var">$mode</span> = Cache::NETTOYAGE_MODE_TOUS, <span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="552" class="l"><a class="l" href="#552">552: </a> <span class="php-var">$nettoyage_ok</span> = <span class="php-keyword1">false</span>;
</span><span id="553" class="l"><a class="l" href="#553">553: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$mode</span>) {
</span><span id="554" class="l"><a class="l" href="#554">554: </a> <span class="php-keyword1">case</span> Cache::NETTOYAGE_MODE_TOUS:
</span><span id="555" class="l"><a class="l" href="#555">555: </a> <span class="php-var">$suppression_cache</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'DELETE FROM cache'</span>);
</span><span id="556" class="l"><a class="l" href="#556">556: </a> <span class="php-var">$suppression_tag</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">'DELETE FROM tag'</span>);
</span><span id="557" class="l"><a class="l" href="#557">557: </a> <span class="php-var">$nettoyage_ok</span> = <span class="php-var">$suppression_cache</span> &amp;&amp; <span class="php-var">$suppression_tag</span>;
</span><span id="558" class="l"><a class="l" href="#558">558: </a> <span class="php-keyword1">break</span>;
</span><span id="559" class="l"><a class="l" href="#559">559: </a> <span class="php-keyword1">case</span> Cache::NETTOYAGE_MODE_EXPIRATION:
</span><span id="560" class="l"><a class="l" href="#560">560: </a> <span class="php-var">$mktime</span> = <span class="php-keyword2">time</span>();
</span><span id="561" class="l"><a class="l" href="#561">561: </a> <span class="php-var">$suppression_tag</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;DELETE FROM tag WHERE id IN (SELECT id FROM cache WHERE expire &gt; 0 AND expire &lt;= </span><span class="php-var">$mktime</span><span class="php-quote">)&quot;</span>);
</span><span id="562" class="l"><a class="l" href="#562">562: </a> <span class="php-var">$suppression_cache</span> = <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;DELETE FROM cache WHERE expire &gt; 0 AND expire &lt;= </span><span class="php-var">$mktime</span><span class="php-quote">&quot;</span>);
</span><span id="563" class="l"><a class="l" href="#563">563: </a> <span class="php-keyword1">return</span> <span class="php-var">$suppression_tag</span> &amp;&amp; <span class="php-var">$suppression_cache</span>;
</span><span id="564" class="l"><a class="l" href="#564">564: </a> <span class="php-keyword1">break</span>;
</span><span id="565" class="l"><a class="l" href="#565">565: </a> <span class="php-keyword1">case</span> Cache::NETTOYAGE_MODE_AVEC_LES_TAGS:
</span><span id="566" class="l"><a class="l" href="#566">566: </a> <span class="php-var">$ids</span> = <span class="php-var">$this</span>-&gt;getIdsAvecLesTags(<span class="php-var">$tags</span>);
</span><span id="567" class="l"><a class="l" href="#567">567: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="568" class="l"><a class="l" href="#568">568: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$ids</span> <span class="php-keyword1">as</span> <span class="php-var">$id</span>) {
</span><span id="569" class="l"><a class="l" href="#569">569: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;supprimer(<span class="php-var">$id</span>) &amp;&amp; <span class="php-var">$resultat</span>;
</span><span id="570" class="l"><a class="l" href="#570">570: </a> }
</span><span id="571" class="l"><a class="l" href="#571">571: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="572" class="l"><a class="l" href="#572">572: </a> <span class="php-keyword1">break</span>;
</span><span id="573" class="l"><a class="l" href="#573">573: </a> <span class="php-keyword1">case</span> Cache::NETTOYAGE_MODE_SANS_LES_TAGS:
</span><span id="574" class="l"><a class="l" href="#574">574: </a> <span class="php-var">$ids</span> = <span class="php-var">$this</span>-&gt;getIdsSansLesTags(<span class="php-var">$tags</span>);
</span><span id="575" class="l"><a class="l" href="#575">575: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="576" class="l"><a class="l" href="#576">576: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$ids</span> <span class="php-keyword1">as</span> <span class="php-var">$id</span>) {
</span><span id="577" class="l"><a class="l" href="#577">577: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;supprimer(<span class="php-var">$id</span>) &amp;&amp; <span class="php-var">$resultat</span>;
</span><span id="578" class="l"><a class="l" href="#578">578: </a> }
</span><span id="579" class="l"><a class="l" href="#579">579: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="580" class="l"><a class="l" href="#580">580: </a> <span class="php-keyword1">break</span>;
</span><span id="581" class="l"><a class="l" href="#581">581: </a> <span class="php-keyword1">case</span> Cache::NETTOYAGE_MODE_AVEC_UN_TAG:
</span><span id="582" class="l"><a class="l" href="#582">582: </a> <span class="php-var">$ids</span> = <span class="php-var">$this</span>-&gt;getIdsAvecUnTag(<span class="php-var">$tags</span>);
</span><span id="583" class="l"><a class="l" href="#583">583: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="584" class="l"><a class="l" href="#584">584: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$ids</span> <span class="php-keyword1">as</span> <span class="php-var">$id</span>) {
</span><span id="585" class="l"><a class="l" href="#585">585: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;supprimer(<span class="php-var">$id</span>) &amp;&amp; <span class="php-var">$resultat</span>;
</span><span id="586" class="l"><a class="l" href="#586">586: </a> }
</span><span id="587" class="l"><a class="l" href="#587">587: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="588" class="l"><a class="l" href="#588">588: </a> <span class="php-keyword1">break</span>;
</span><span id="589" class="l"><a class="l" href="#589">589: </a> <span class="php-keyword1">default</span>:
</span><span id="590" class="l"><a class="l" href="#590">590: </a> <span class="php-keyword1">break</span>;
</span><span id="591" class="l"><a class="l" href="#591">591: </a> }
</span><span id="592" class="l"><a class="l" href="#592">592: </a> <span class="php-keyword1">return</span> <span class="php-var">$nettoyage_ok</span>;
</span><span id="593" class="l"><a class="l" href="#593">593: </a> }
</span><span id="594" class="l"><a class="l" href="#594">594: </a>
</span><span id="595" class="l"><a class="l" href="#595">595: </a> <span class="php-comment">/**
</span></span><span id="596" class="l"><a class="l" href="#596">596: </a><span class="php-comment"> * Check if the database structure is ok (with the good version), if no : build it
</span></span><span id="597" class="l"><a class="l" href="#597">597: </a><span class="php-comment"> *
</span></span><span id="598" class="l"><a class="l" href="#598">598: </a><span class="php-comment"> * @throws Zend_Cache_Exception
</span></span><span id="599" class="l"><a class="l" href="#599">599: </a><span class="php-comment"> * @return boolean True if ok
</span></span><span id="600" class="l"><a class="l" href="#600">600: </a><span class="php-comment"> */</span>
</span><span id="601" class="l"><a class="l" href="#601">601: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_verifierEtCreerStructureBdd" href="#_verifierEtCreerStructureBdd">verifierEtCreerStructureBdd</a>() {
</span><span id="602" class="l"><a class="l" href="#602">602: </a> <span class="php-keyword1">if</span> (! <span class="php-var">$this</span>-&gt;structure_ok) {
</span><span id="603" class="l"><a class="l" href="#603">603: </a> <span class="php-keyword1">if</span> (! <span class="php-var">$this</span>-&gt;verifierBddStructureVersion()) {
</span><span id="604" class="l"><a class="l" href="#604">604: </a> <span class="php-var">$this</span>-&gt;creerStructure();
</span><span id="605" class="l"><a class="l" href="#605">605: </a> <span class="php-keyword1">if</span> (! <span class="php-var">$this</span>-&gt;verifierBddStructureVersion()) {
</span><span id="606" class="l"><a class="l" href="#606">606: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Impossible de construire la base de données de cache dans &quot;</span>.<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>];
</span><span id="607" class="l"><a class="l" href="#607">607: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_WARNING);
</span><span id="608" class="l"><a class="l" href="#608">608: </a> <span class="php-var">$this</span>-&gt;structure_ok = <span class="php-keyword1">false</span>;
</span><span id="609" class="l"><a class="l" href="#609">609: </a> }
</span><span id="610" class="l"><a class="l" href="#610">610: </a> }
</span><span id="611" class="l"><a class="l" href="#611">611: </a> <span class="php-var">$this</span>-&gt;structure_ok = <span class="php-keyword1">true</span>;
</span><span id="612" class="l"><a class="l" href="#612">612: </a> }
</span><span id="613" class="l"><a class="l" href="#613">613: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;structure_ok;
</span><span id="614" class="l"><a class="l" href="#614">614: </a> }
</span><span id="615" class="l"><a class="l" href="#615">615: </a>
</span><span id="616" class="l"><a class="l" href="#616">616: </a>}
</span><span id="617" class="l"><a class="l" href="#617">617: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Debug.html
New file
0,0 → 1,542
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Debug | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li class="active"><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Debug</h1>
 
 
<div class="description">
<p>Classe fournissant des fonctions de débogage équivalante à var_dump et
print_r. L'affichage et l'utilisation de ces fonctions sont améliorés via
cette classe. Cette classe est inspirée de la classe Zend_Debug.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2009, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL-v3</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL-v2</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Debug.php 366 2011-09-30 08:20:45Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Debug.html#3-191" title="Go to source code">Debug.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="getMode" id="_getMode">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getMode">#</a>
<code><a href="source-class-Debug.html#40-49" title="Go to source code">getMode</a>( )</code>
 
<div class="description short">
<p>Accesseur pour le mode</p>
 
</div>
 
<div class="description detailed hidden">
<p>Accesseur pour le mode</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>le mode de php<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="dump" id="_dump">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_dump">#</a>
<code><a href="source-class-Debug.html#51-69" title="Go to source code">dump</a>( <span>mixed <var>$variable</var></span>, <span>string <var>$mot_cle</var> = <span class="php-keyword1">null</span></span>, <span>boolean <var>$echo</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Equivalent de var_dump</p>
 
</div>
 
<div class="description detailed hidden">
<p>Equivalent de var_dump</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$variable</var></dt>
<dd><code>mixed</code><br>$variable la variable à dumper</dd>
<dt><var>$mot_cle</var></dt>
<dd><code>string</code><br>$mot_cle le mot cle à associer à la variable</dd>
<dt><var>$echo</var></dt>
<dd><code>boolean</code><br>$echo si true on affiche le résultat, si false on ne renvoie que la chaine sans
l'afficher</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>la chaine à afficher representant le dump ou null si echo<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="printr" id="_printr">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_printr">#</a>
<code><a href="source-class-Debug.html#71-84" title="Go to source code">printr</a>( <span>mixed <var>$variable</var></span>, <span>string <var>$mot_cle</var> = <span class="php-keyword1">null</span></span>, <span>boolean <var>$echo</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Equivalent de print_r.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Equivalent de print_r.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$variable</var></dt>
<dd><code>mixed</code><br>$variable la variable à afficher</dd>
<dt><var>$mot_cle</var></dt>
<dd><code>string</code><br>$mot_cle le mot cle à associer</dd>
<dt><var>$echo</var></dt>
<dd><code>boolean</code><br>$echo faire un echo ou non</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>la chaine contenant la variable printée ou null si echo<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="tailleMemoireVar" id="_tailleMemoireVar">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_tailleMemoireVar">#</a>
<code><a href="source-class-Debug.html#86-104" title="Go to source code">tailleMemoireVar</a>( <span>mixed <var>$var</var></span>, <span>string <var>$mot_cle</var> = <span class="php-keyword1">null</span></span>, <span>boolean <var>$echo</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Affichage d'informations sur l'espace mémoire occupé par une variable</p>
 
</div>
 
<div class="description detailed hidden">
<p>Affichage d'informations sur l'espace mémoire occupé par une variable</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$var</var></dt>
<dd><code>mixed</code><br>$var la variable dont on veut connaître l'empreinte mémoire.</dd>
<dt><var>$mot_cle</var></dt>
<dd><code>string</code><br>$mot_cle le mot cle à associer</dd>
<dt><var>$echo</var></dt>
<dd><code>boolean</code><br>$echo faire un echo ou non</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>la chaine d'information sur l'espace mémoire occupé ou bien null si echo<br>
</div>
 
 
<h4>Since</h4>
<div class="list">
0.3<br>
</div>
<h4>Link</h4>
<div class="list">
<a href="http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html">http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html</a><br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="tailleMemoireScript" id="_tailleMemoireScript">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_tailleMemoireScript">#</a>
<code><a href="source-class-Debug.html#106-130" title="Go to source code">tailleMemoireScript</a>( <span>string <var>$mot_cle</var> = <span class="php-keyword1">null</span></span>, <span>boolean <var>$echo</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Affichage d'informations sur l'espace mémoire occupé par le script PHP</p>
 
</div>
 
<div class="description detailed hidden">
<p>Affichage d'informations sur l'espace mémoire occupé par le script PHP</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$mot_cle</var></dt>
<dd><code>string</code><br>$mot_cle le mot cle à associer</dd>
<dt><var>$echo</var></dt>
<dd><code>boolean</code><br>$echo faire un echo ou non</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>la chaine d'information sur l'espace mémoire occupé ou bien null si echo<br>
</div>
 
 
<h4>Since</h4>
<div class="list">
0.3<br>
</div>
<h4>Link</h4>
<div class="list">
<a href="http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html">http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html</a><br>
</div>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
<table class="summary" id="constants">
<caption>Constants summary</caption>
<tr data-order="MODE_ECHO" id="MODE_ECHO">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Debug.html#19-21" title="Go to source code"><b>MODE_ECHO</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'echo'</span></code></td>
<td class="description"><div>
<a href="#MODE_ECHO" class="anchor">#</a>
 
<div class="description short">
<p>Paramètrer le fichier de config avec "php:Debug::MODE_ECHO" : les messages
sont affichés en utilisant echo au moment où ils sont déclenchés dans le
code.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Paramètrer le fichier de config avec "php:Debug::MODE_ECHO" : les messages
sont affichés en utilisant echo au moment où ils sont déclenchés dans le
code.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="MODE_NOTICE" id="MODE_NOTICE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Debug.html#23-26" title="Go to source code"><b>MODE_NOTICE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'e_user_notice'</span></code></td>
<td class="description"><div>
<a href="#MODE_NOTICE" class="anchor">#</a>
 
<div class="description short">
<p>Paramètrer le fichier de config avec "php:Debug::MODE_NOTICE" : les message
sont stockés par le gestionnaire d'exception sous forme d'erreur de type
E_USER_NOTICE et sont renvoyés sur la sortie standard à la fin de l'execution
du programme (via echo).</p>
 
</div>
 
<div class="description detailed hidden">
<p>Paramètrer le fichier de config avec "php:Debug::MODE_NOTICE" : les message
sont stockés par le gestionnaire d'exception sous forme d'erreur de type
E_USER_NOTICE et sont renvoyés sur la sortie standard à la fin de l'execution
du programme (via echo).</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="MODE_ENTETE_HTTP" id="MODE_ENTETE_HTTP">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Debug.html#28-32" title="Go to source code"><b>MODE_ENTETE_HTTP</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'entete_http'</span></code></td>
<td class="description"><div>
<a href="#MODE_ENTETE_HTTP" class="anchor">#</a>
 
<div class="description short">
<p>Paramètrer le fichier de config avec "php:Debug::MODE_ENTETE_HTTP" : les
message sont stockés par le gestionnaire d'exception sous forme d'erreur de
type E_USER_NOTICE et sont renvoyés dans un entête HTTP
(X_REST_DEBOGAGE_MESSAGES) à la fin de l'execution du programme. Surtout utile
pour le Serveur REST.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Paramètrer le fichier de config avec "php:Debug::MODE_ENTETE_HTTP" : les
message sont stockés par le gestionnaire d'exception sous forme d'erreur de
type E_USER_NOTICE et sont renvoyés dans un entête HTTP
(X_REST_DEBOGAGE_MESSAGES) à la fin de l'execution du programme. Surtout utile
pour le Serveur REST.</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="mode" id="$mode">
<td class="attributes"><code>
protected static
mixed
</code></td>
 
<td class="name">
<a href="source-class-Debug.html#34-35" title="Go to source code"><var>$mode</var></a>
</td>
<td class="value"><code><span class="php-keyword1">null</span></code></td>
<td class="description"><div>
<a href="#$mode" class="anchor">#</a>
 
<div class="description short">
<p>Mode de php (cli ou sapi)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Mode de php (cli ou sapi)</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Bdd.html
New file
0,0 → 1,599
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Bdd.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li class="active"><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Bdd.html" title="Summary of Bdd"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe Bdd, d'accés au base de données.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * Elle fait office d'abstraction légère de base de données en utilisant diverses possibilités d'accès aux
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * bases de données (PDO, mysql, mysqli, SQLite3).
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * Les valeurs pour le paramètre 'bdd_abstraction' du fichier config.ini sont : pdo, mysql, mysqli, sqlite3
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * Vous pouvez aussi utiliser : &quot;php:Bdd::ABSTRACTION_PDO&quot;,&quot;php:Bdd::ABSTRACTION_MYSQL&quot;, &quot;php:Bdd::ABSTRACTION_MYSQLI&quot;,
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * &quot;php:Bdd::ABSTRACTION_SQLITE3&quot;.
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * Elle peut être étendue, pour ajouter le support d'autres bases de données où prendre en compte des méthodes spécifique à
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * un type d'abstraction.
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> *
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @category php 5.2
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @package Framework
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @author Aurélien PERONNET &lt;aurelien@tela-botanica.org&gt;
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
</span></span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
</span></span><span id="20" class="l"><a class="l" href="#20"> 20: </a><span class="php-comment"> */</span>
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a><span class="php-keyword1">class</span> <a id="Bdd" href="#Bdd">Bdd</a> {
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a> <span class="php-comment">/** Constante stockant le squelette du message en cas d'erreur de requête sql. */</span>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> <span class="php-keyword1">const</span> <a id="ERREUR_REQUETE_TPL" href="#ERREUR_REQUETE_TPL">ERREUR_REQUETE_TPL</a> = <span class="php-quote">'Requête echec.\nFichier : %s.\nLigne : %s.\nMessage : %s.\nRequête : %s'</span>;
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a>
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a> <span class="php-comment">/** Constante stockant le squelette du message en cas d'erreur de connexion à la base de données. */</span>
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-keyword1">const</span> <a id="ERREUR_CONNEXION_TPL" href="#ERREUR_CONNEXION_TPL">ERREUR_CONNEXION_TPL</a> = <span class="php-quote">'Erreur de connexion à la base de données, vérifiez les paramètres du fichier de configuration.\nMessage : %S.'</span>;
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a>
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-comment">/** Constante stockant le squelette du message en cas d'erreur de sélection de la base de données. */</span>
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-keyword1">const</span> <a id="ERREUR_SELECTION_BDD_TPL" href="#ERREUR_SELECTION_BDD_TPL">ERREUR_SELECTION_BDD_TPL</a> = <span class="php-quote">'Erreur de sélection de la base de données, vérifiez les paramètres du fichier de configuration.\nMessage : %S.'</span>;
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a>
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> <span class="php-comment">/** Constante stockant le code pour l'abstraction de PDO. */</span>
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-keyword1">const</span> <a id="ABSTRACTION_PDO" href="#ABSTRACTION_PDO">ABSTRACTION_PDO</a> = <span class="php-quote">'pdo'</span>;
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a>
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> <span class="php-comment">/** Constante stockant le code pour l'abstraction de mysql. */</span>
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-keyword1">const</span> <a id="ABSTRACTION_MYSQL" href="#ABSTRACTION_MYSQL">ABSTRACTION_MYSQL</a> = <span class="php-quote">'mysql'</span>;
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a>
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> <span class="php-comment">/** Constante stockant le code pour l'abstraction de mysqli. */</span>
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a> <span class="php-keyword1">const</span> <a id="ABSTRACTION_MYSQLI" href="#ABSTRACTION_MYSQLI">ABSTRACTION_MYSQLI</a> = <span class="php-quote">'mysqli'</span>;
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a>
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> <span class="php-comment">/** Constante stockant le code pour l'abstraction de SQLite3. */</span>
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a> <span class="php-keyword1">const</span> ABSTRACTION_SQLITE3 = <span class="php-quote">'sqlite3'</span>;
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a>
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a> <span class="php-comment">/** Constante stockant le code pour le mode tableau associatif des résultats des requêtes. */</span>
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a> <span class="php-keyword1">const</span> <a id="MODE_ASSOC" href="#MODE_ASSOC">MODE_ASSOC</a> = <span class="php-quote">'ASSOC'</span>;
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a>
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> <span class="php-comment">/** Constante stockant le code pour le mode objet des résultats des requêtes. */</span>
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a> <span class="php-keyword1">const</span> <a id="MODE_OBJET" href="#MODE_OBJET">MODE_OBJET</a> = <span class="php-quote">'OBJECT'</span>;
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a>
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-comment">/** Mode de fetch associatif */</span>
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$ASSOC" href="#$ASSOC">$ASSOC</a></span> = <span class="php-quote">''</span>;
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a>
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> <span class="php-comment">/** Mode de fetch objet */</span>
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$OBJECT" href="#$OBJECT">$OBJECT</a></span> = <span class="php-quote">''</span>;
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a>
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> <span class="php-comment">/** abstraction de base de données utilisée */</span>
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$abstraction" href="#$abstraction">$abstraction</a></span>;
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a>
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> <span class="php-comment">/** DSN pour accéder à la base de données */</span>
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$dsn" href="#$dsn">$dsn</a></span>;
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a>
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> <span class="php-comment">/** Type de base de données (mysql, mysqli, etc ...) */</span>
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$type" href="#$type">$type</a></span>;
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a>
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-comment">/** Hote herbergeant la base de données */</span>
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$hote" href="#$hote">$hote</a></span>;
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a>
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> <span class="php-comment">/** Nom de la base de données à laquelle le modèle doit se connecter */</span>
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$bdd_nom" href="#$bdd_nom">$bdd_nom</a></span>;
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a>
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a> <span class="php-comment">/** Nom d'utilisateur */</span>
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$utilisateur" href="#$utilisateur">$utilisateur</a></span>;
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a>
</span><span id="73" class="l"><a class="l" href="#73"> 73: </a> <span class="php-comment">/** Mot de passe */</span>
</span><span id="74" class="l"><a class="l" href="#74"> 74: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$pass" href="#$pass">$pass</a></span>;
</span><span id="75" class="l"><a class="l" href="#75"> 75: </a>
</span><span id="76" class="l"><a class="l" href="#76"> 76: </a> <span class="php-comment">/** Encodage de la base de données */</span>
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$encodage" href="#$encodage">$encodage</a></span> = <span class="php-keyword1">null</span>;
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a>
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> <span class="php-comment">/** Connexion à la base de données */</span>
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$connexion" href="#$connexion">$connexion</a></span> = <span class="php-keyword1">null</span>;
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a>
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> <span class="php-comment">/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/</span>
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$parametres_obligatoires" href="#$parametres_obligatoires">$parametres_obligatoires</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'bdd_abstraction'</span>, <span class="php-quote">'bdd_protocole'</span>, <span class="php-quote">'bdd_serveur'</span>, <span class="php-quote">'bdd_nom'</span>,
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> <span class="php-quote">'bdd_utilisateur'</span>, <span class="php-quote">'bdd_mot_de_passe'</span>, <span class="php-quote">'bdd_encodage'</span>);
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a>
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a> <span class="php-comment">/** Constructeur par défaut, appelé à l'initialisation. */</span>
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>() {
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a> Config::verifierPresenceParametres(<span class="php-var">$this</span>-&gt;parametres_obligatoires);
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a> <span class="php-var">$this</span>-&gt;abstraction = <span class="php-keyword2">strtolower</span>(Config::get(<span class="php-quote">'bdd_abstraction'</span>));
</span><span id="90" class="l"><a class="l" href="#90"> 90: </a> <span class="php-var">$this</span>-&gt;type = Config::get(<span class="php-quote">'bdd_protocole'</span>);
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> <span class="php-var">$this</span>-&gt;hote = Config::get(<span class="php-quote">'bdd_serveur'</span>);
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> <span class="php-var">$this</span>-&gt;bdd_nom = Config::get(<span class="php-quote">'bdd_nom'</span>);
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-var">$this</span>-&gt;utilisateur = Config::get(<span class="php-quote">'bdd_utilisateur'</span>);
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> <span class="php-var">$this</span>-&gt;pass = Config::get(<span class="php-quote">'bdd_mot_de_passe'</span>);
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> <span class="php-var">$this</span>-&gt;encodage = Config::get(<span class="php-quote">'bdd_encodage'</span>);
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a>
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;type == <span class="php-quote">'sqlite'</span> || <span class="php-var">$this</span>-&gt;type == <span class="php-quote">'sqlite2'</span>) {
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-var">$this</span>-&gt;dsn = <span class="php-var">$this</span>-&gt;type.<span class="php-quote">':'</span>.<span class="php-var">$this</span>-&gt;hote;
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> } <span class="php-keyword1">else</span> {
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-var">$this</span>-&gt;dsn = <span class="php-var">$this</span>-&gt;type.<span class="php-quote">':dbname='</span>.<span class="php-var">$this</span>-&gt;bdd_nom.<span class="php-quote">';host='</span>.<span class="php-var">$this</span>-&gt;hote;
</span><span id="101" class="l"><a class="l" href="#101">101: </a> }
</span><span id="102" class="l"><a class="l" href="#102">102: </a> <span class="php-var">$this</span>-&gt;initialiserProtocole();
</span><span id="103" class="l"><a class="l" href="#103">103: </a> }
</span><span id="104" class="l"><a class="l" href="#104">104: </a>
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-comment">/** Initialise les constantes de classe à leur bonne valeur et déclenche une erreur si le protocole n'est pas bien défini. */</span>
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_initialiserProtocole" href="#_initialiserProtocole">initialiserProtocole</a>() {
</span><span id="107" class="l"><a class="l" href="#107">107: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$this</span>-&gt;abstraction) {
</span><span id="108" class="l"><a class="l" href="#108">108: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_PDO :
</span><span id="109" class="l"><a class="l" href="#109">109: </a> <span class="php-var">$this</span>-&gt;ASSOC = PDO::FETCH_ASSOC;
</span><span id="110" class="l"><a class="l" href="#110">110: </a> <span class="php-var">$this</span>-&gt;OBJECT = PDO::FETCH_OBJ;
</span><span id="111" class="l"><a class="l" href="#111">111: </a> <span class="php-keyword1">break</span>;
</span><span id="112" class="l"><a class="l" href="#112">112: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQL :
</span><span id="113" class="l"><a class="l" href="#113">113: </a> <span class="php-var">$this</span>-&gt;ASSOC = <span class="php-quote">'mysql_fetch_assoc'</span>;
</span><span id="114" class="l"><a class="l" href="#114">114: </a> <span class="php-var">$this</span>-&gt;OBJECT = <span class="php-quote">'mysql_fetch_object'</span>;
</span><span id="115" class="l"><a class="l" href="#115">115: </a> <span class="php-keyword1">break</span>;
</span><span id="116" class="l"><a class="l" href="#116">116: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQLI :
</span><span id="117" class="l"><a class="l" href="#117">117: </a> <span class="php-var">$this</span>-&gt;ASSOC = <span class="php-quote">'fetch_assoc'</span>;
</span><span id="118" class="l"><a class="l" href="#118">118: </a> <span class="php-var">$this</span>-&gt;OBJECT = <span class="php-quote">'fetch_object'</span>;
</span><span id="119" class="l"><a class="l" href="#119">119: </a> <span class="php-keyword1">break</span>;
</span><span id="120" class="l"><a class="l" href="#120">120: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_SQLITE3 :
</span><span id="121" class="l"><a class="l" href="#121">121: </a> <span class="php-var">$this</span>-&gt;ASSOC = <span class="php-quote">'SQLITE3_ASSOC'</span>;
</span><span id="122" class="l"><a class="l" href="#122">122: </a> <span class="php-var">$this</span>-&gt;OBJECT = <span class="php-quote">'SQLITE3_OBJECT'</span>;
</span><span id="123" class="l"><a class="l" href="#123">123: </a> <span class="php-keyword1">break</span>;
</span><span id="124" class="l"><a class="l" href="#124">124: </a> <span class="php-keyword1">default</span>:
</span><span id="125" class="l"><a class="l" href="#125">125: </a> <span class="php-var">$m</span> = <span class="php-quote">&quot;Erreur : l'abstraction '</span><span class="php-var">{$this-&gt;abstraction}</span><span class="php-quote">' n'est pas prise en charge&quot;</span>;
</span><span id="126" class="l"><a class="l" href="#126">126: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$m</span>, E_USER_WARNING);
</span><span id="127" class="l"><a class="l" href="#127">127: </a> }
</span><span id="128" class="l"><a class="l" href="#128">128: </a> }
</span><span id="129" class="l"><a class="l" href="#129">129: </a>
</span><span id="130" class="l"><a class="l" href="#130">130: </a> <span class="php-comment">/**
</span></span><span id="131" class="l"><a class="l" href="#131">131: </a><span class="php-comment"> * Connection à la base de données en utilisant les informations fournies par
</span></span><span id="132" class="l"><a class="l" href="#132">132: </a><span class="php-comment"> * le fichier de configuration.
</span></span><span id="133" class="l"><a class="l" href="#133">133: </a><span class="php-comment"> * Cette méthode est private et final car elle n'a pas vocation a être appelée par l'utilisateur.
</span></span><span id="134" class="l"><a class="l" href="#134">134: </a><span class="php-comment"> * TODO : il est peut être nécessaire pour MYSQL, MYSQLi et SQLITE3 afin d'éviter les boucles infinis
</span></span><span id="135" class="l"><a class="l" href="#135">135: </a><span class="php-comment"> * d'erreur quand la bdd n'est pas configuré d'utiliser : $this-&gt;connexion-&gt;query (comme pour PDO)
</span></span><span id="136" class="l"><a class="l" href="#136">136: </a><span class="php-comment"> */</span>
</span><span id="137" class="l"><a class="l" href="#137">137: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_connecter" href="#_connecter">connecter</a>() {
</span><span id="138" class="l"><a class="l" href="#138">138: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;connexion == <span class="php-keyword1">null</span>) {
</span><span id="139" class="l"><a class="l" href="#139">139: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$this</span>-&gt;abstraction) {
</span><span id="140" class="l"><a class="l" href="#140">140: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_PDO :
</span><span id="141" class="l"><a class="l" href="#141">141: </a> <span class="php-keyword1">try</span> {
</span><span id="142" class="l"><a class="l" href="#142">142: </a> <span class="php-var">$this</span>-&gt;connexion = <span class="php-keyword1">new</span> PDO(<span class="php-var">$this</span>-&gt;dsn, <span class="php-var">$this</span>-&gt;utilisateur, <span class="php-var">$this</span>-&gt;pass);
</span><span id="143" class="l"><a class="l" href="#143">143: </a> <span class="php-var">$this</span>-&gt;connexion-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
</span><span id="144" class="l"><a class="l" href="#144">144: </a> } <span class="php-keyword1">catch</span> (PDOException <span class="php-var">$e</span>) {
</span><span id="145" class="l"><a class="l" href="#145">145: </a> <span class="php-var">$e</span> = <span class="php-keyword2">sprintf</span>(self::ERREUR_CONNEXION_TPL, <span class="php-var">$e</span>-&gt;getMessage());
</span><span id="146" class="l"><a class="l" href="#146">146: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_WARNING);
</span><span id="147" class="l"><a class="l" href="#147">147: </a> }
</span><span id="148" class="l"><a class="l" href="#148">148: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;encodage != <span class="php-keyword1">null</span> &amp;&amp; <span class="php-var">$this</span>-&gt;type == <span class="php-quote">'mysql'</span>) {
</span><span id="149" class="l"><a class="l" href="#149">149: </a> <span class="php-var">$this</span>-&gt;connexion-&gt;query(<span class="php-quote">&quot;SET names '&quot;</span>.<span class="php-var">$this</span>-&gt;encodage.<span class="php-quote">&quot;'&quot;</span>);
</span><span id="150" class="l"><a class="l" href="#150">150: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;type == <span class="php-quote">'sqlite'</span>) {
</span><span id="151" class="l"><a class="l" href="#151">151: </a> <span class="php-var">$this</span>-&gt;connexion-&gt;query(<span class="php-quote">&quot;PRAGMA case_sensitive_like = false&quot;</span>);
</span><span id="152" class="l"><a class="l" href="#152">152: </a> }
</span><span id="153" class="l"><a class="l" href="#153">153: </a> <span class="php-keyword1">break</span>;
</span><span id="154" class="l"><a class="l" href="#154">154: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQL :
</span><span id="155" class="l"><a class="l" href="#155">155: </a> <span class="php-var">$this</span>-&gt;connexion = <span class="php-keyword2">mysql_connect</span>(<span class="php-var">$this</span>-&gt;hote, <span class="php-var">$this</span>-&gt;utilisateur, <span class="php-var">$this</span>-&gt;pass);
</span><span id="156" class="l"><a class="l" href="#156">156: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;connexion !== <span class="php-keyword1">false</span>) {
</span><span id="157" class="l"><a class="l" href="#157">157: </a> <span class="php-var">$selection</span> = <span class="php-keyword2">mysql_select_db</span>(<span class="php-var">$this</span>-&gt;bdd_nom, <span class="php-var">$this</span>-&gt;connexion);
</span><span id="158" class="l"><a class="l" href="#158">158: </a> <span class="php-keyword1">if</span> (<span class="php-var">$selection</span> === <span class="php-keyword1">false</span>) {
</span><span id="159" class="l"><a class="l" href="#159">159: </a> <span class="php-var">$e</span> = <span class="php-keyword2">sprintf</span>(self::ERREUR_SELECTION_BDD_TPL, <span class="php-keyword2">mysql_error</span>());
</span><span id="160" class="l"><a class="l" href="#160">160: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_WARNING);
</span><span id="161" class="l"><a class="l" href="#161">161: </a> }
</span><span id="162" class="l"><a class="l" href="#162">162: </a> } <span class="php-keyword1">else</span> {
</span><span id="163" class="l"><a class="l" href="#163">163: </a> <span class="php-var">$e</span> = <span class="php-keyword2">sprintf</span>(self::ERREUR_CONNEXION_TPL, <span class="php-keyword2">mysql_error</span>());
</span><span id="164" class="l"><a class="l" href="#164">164: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_WARNING);
</span><span id="165" class="l"><a class="l" href="#165">165: </a> }
</span><span id="166" class="l"><a class="l" href="#166">166: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;encodage != <span class="php-keyword1">null</span>) {
</span><span id="167" class="l"><a class="l" href="#167">167: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;SET names '&quot;</span>.<span class="php-var">$this</span>-&gt;encodage.<span class="php-quote">&quot;'&quot;</span>);
</span><span id="168" class="l"><a class="l" href="#168">168: </a> }
</span><span id="169" class="l"><a class="l" href="#169">169: </a> <span class="php-keyword1">break</span>;
</span><span id="170" class="l"><a class="l" href="#170">170: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQLI :
</span><span id="171" class="l"><a class="l" href="#171">171: </a> <span class="php-var">$this</span>-&gt;connexion = @<span class="php-keyword1">new</span> mysqli(<span class="php-var">$this</span>-&gt;hote, <span class="php-var">$this</span>-&gt;utilisateur, <span class="php-var">$this</span>-&gt;pass, <span class="php-var">$this</span>-&gt;bdd_nom);
</span><span id="172" class="l"><a class="l" href="#172">172: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;connexion-&gt;connect_errno) {
</span><span id="173" class="l"><a class="l" href="#173">173: </a> <span class="php-var">$e</span> = <span class="php-keyword2">sprintf</span>(self::ERREUR_CONNEXION_TPL, <span class="php-var">$this</span>-&gt;connexion-&gt;connect_error);
</span><span id="174" class="l"><a class="l" href="#174">174: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_WARNING);
</span><span id="175" class="l"><a class="l" href="#175">175: </a> }
</span><span id="176" class="l"><a class="l" href="#176">176: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;encodage != <span class="php-keyword1">null</span>) {
</span><span id="177" class="l"><a class="l" href="#177">177: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;SET names '&quot;</span>.<span class="php-var">$this</span>-&gt;encodage.<span class="php-quote">&quot;'&quot;</span>);
</span><span id="178" class="l"><a class="l" href="#178">178: </a> }
</span><span id="179" class="l"><a class="l" href="#179">179: </a> <span class="php-keyword1">break</span>;
</span><span id="180" class="l"><a class="l" href="#180">180: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_SQLITE3 :
</span><span id="181" class="l"><a class="l" href="#181">181: </a> <span class="php-comment">// cas particulier de sqllite, on considère que le nom de la base de données correspond au fichier à ouvrir</span>
</span><span id="182" class="l"><a class="l" href="#182">182: </a> <span class="php-var">$this</span>-&gt;connexion = <span class="php-keyword1">new</span> SQLite3(<span class="php-var">$this</span>-&gt;bdd_nom);
</span><span id="183" class="l"><a class="l" href="#183">183: </a> <span class="php-keyword1">if</span> (!<span class="php-var">$this</span>-&gt;connexion) {
</span><span id="184" class="l"><a class="l" href="#184">184: </a> <span class="php-var">$e</span> = <span class="php-keyword2">sprintf</span>(self::ERREUR_CONNEXION_TPL, <span class="php-quote">''</span>);
</span><span id="185" class="l"><a class="l" href="#185">185: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_WARNING);
</span><span id="186" class="l"><a class="l" href="#186">186: </a> }
</span><span id="187" class="l"><a class="l" href="#187">187: </a> <span class="php-var">$this</span>-&gt;requeter(<span class="php-quote">&quot;PRAGMA case_sensitive_like = false&quot;</span>);
</span><span id="188" class="l"><a class="l" href="#188">188: </a> <span class="php-keyword1">break</span>;
</span><span id="189" class="l"><a class="l" href="#189">189: </a> <span class="php-keyword1">default</span>:
</span><span id="190" class="l"><a class="l" href="#190">190: </a> <span class="php-var">$this</span>-&gt;connexion = <span class="php-keyword1">null</span>;
</span><span id="191" class="l"><a class="l" href="#191">191: </a> }
</span><span id="192" class="l"><a class="l" href="#192">192: </a> }
</span><span id="193" class="l"><a class="l" href="#193">193: </a> }
</span><span id="194" class="l"><a class="l" href="#194">194: </a>
</span><span id="195" class="l"><a class="l" href="#195">195: </a> <span class="php-comment">/**
</span></span><span id="196" class="l"><a class="l" href="#196">196: </a><span class="php-comment"> * Permet de tester, puis de reconnecter une connection au cas ou celle aurait été
</span></span><span id="197" class="l"><a class="l" href="#197">197: </a><span class="php-comment"> * perdue (utile dans le cas d'une connection ouverte depuis trop longtemps)
</span></span><span id="198" class="l"><a class="l" href="#198">198: </a><span class="php-comment"> * @return boolean
</span></span><span id="199" class="l"><a class="l" href="#199">199: </a><span class="php-comment"> */</span>
</span><span id="200" class="l"><a class="l" href="#200">200: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_ping" href="#_ping">ping</a>() {
</span><span id="201" class="l"><a class="l" href="#201">201: </a> <span class="php-keyword1">try</span> {
</span><span id="202" class="l"><a class="l" href="#202">202: </a> <span class="php-comment">// requête très simple qui ne teste que l'activité de la connection</span>
</span><span id="203" class="l"><a class="l" href="#203">203: </a> <span class="php-var">$requete</span> = <span class="php-quote">'SELECT 1'</span>;
</span><span id="204" class="l"><a class="l" href="#204">204: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$this</span>-&gt;abstraction) {
</span><span id="205" class="l"><a class="l" href="#205">205: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_PDO :
</span><span id="206" class="l"><a class="l" href="#206">206: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;query(<span class="php-var">$requete</span>);
</span><span id="207" class="l"><a class="l" href="#207">207: </a> <span class="php-keyword1">break</span>;
</span><span id="208" class="l"><a class="l" href="#208">208: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQL :
</span><span id="209" class="l"><a class="l" href="#209">209: </a> <span class="php-var">$retour</span> = <span class="php-keyword2">mysql_query</span>(<span class="php-var">$requete</span>, <span class="php-var">$this</span>-&gt;connexion);
</span><span id="210" class="l"><a class="l" href="#210">210: </a> <span class="php-keyword1">break</span>;
</span><span id="211" class="l"><a class="l" href="#211">211: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQLI :
</span><span id="212" class="l"><a class="l" href="#212">212: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;query(<span class="php-var">$requete</span>);
</span><span id="213" class="l"><a class="l" href="#213">213: </a> <span class="php-keyword1">break</span>;
</span><span id="214" class="l"><a class="l" href="#214">214: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_SQLITE3 :
</span><span id="215" class="l"><a class="l" href="#215">215: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;<span class="php-keyword2">exec</span>(<span class="php-var">$requete</span>);
</span><span id="216" class="l"><a class="l" href="#216">216: </a> <span class="php-keyword1">break</span>;
</span><span id="217" class="l"><a class="l" href="#217">217: </a> }
</span><span id="218" class="l"><a class="l" href="#218">218: </a> } <span class="php-keyword1">catch</span> (PDOException <span class="php-var">$e</span>) {
</span><span id="219" class="l"><a class="l" href="#219">219: </a> <span class="php-var">$this</span>-&gt;connecter();
</span><span id="220" class="l"><a class="l" href="#220">220: </a> }
</span><span id="221" class="l"><a class="l" href="#221">221: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">true</span>;
</span><span id="222" class="l"><a class="l" href="#222">222: </a> }
</span><span id="223" class="l"><a class="l" href="#223">223: </a>
</span><span id="224" class="l"><a class="l" href="#224">224: </a> <span class="php-comment">/**
</span></span><span id="225" class="l"><a class="l" href="#225">225: </a><span class="php-comment"> * @deprecated changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see requeter
</span></span><span id="226" class="l"><a class="l" href="#226">226: </a><span class="php-comment"> */</span>
</span><span id="227" class="l"><a class="l" href="#227">227: </a> <span class="php-keyword1">final</span> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_requete" href="#_requete">requete</a>(<span class="php-var">$requete</span>) {
</span><span id="228" class="l"><a class="l" href="#228">228: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;requeter(<span class="php-var">$requete</span>);
</span><span id="229" class="l"><a class="l" href="#229">229: </a> }
</span><span id="230" class="l"><a class="l" href="#230">230: </a>
</span><span id="231" class="l"><a class="l" href="#231">231: </a> <span class="php-comment">/**
</span></span><span id="232" class="l"><a class="l" href="#232">232: </a><span class="php-comment"> * Execute une requête et retourne le résultat tel que renvoyé par l'abstraction courante.
</span></span><span id="233" class="l"><a class="l" href="#233">233: </a><span class="php-comment"> *
</span></span><span id="234" class="l"><a class="l" href="#234">234: </a><span class="php-comment"> * @param string la requête à effectuer
</span></span><span id="235" class="l"><a class="l" href="#235">235: </a><span class="php-comment"> * @return mixed un objet contenant le résultat de la requête
</span></span><span id="236" class="l"><a class="l" href="#236">236: </a><span class="php-comment"> */</span>
</span><span id="237" class="l"><a class="l" href="#237">237: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_requeter" href="#_requeter">requeter</a>(<span class="php-var">$requete</span>) {
</span><span id="238" class="l"><a class="l" href="#238">238: </a> <span class="php-var">$this</span>-&gt;connecter();
</span><span id="239" class="l"><a class="l" href="#239">239: </a>
</span><span id="240" class="l"><a class="l" href="#240">240: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">null</span>;
</span><span id="241" class="l"><a class="l" href="#241">241: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$this</span>-&gt;abstraction) {
</span><span id="242" class="l"><a class="l" href="#242">242: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_PDO :
</span><span id="243" class="l"><a class="l" href="#243">243: </a> <span class="php-keyword1">try</span> {
</span><span id="244" class="l"><a class="l" href="#244">244: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;query(<span class="php-var">$requete</span>);
</span><span id="245" class="l"><a class="l" href="#245">245: </a> } <span class="php-keyword1">catch</span> (PDOException <span class="php-var">$e</span>) {
</span><span id="246" class="l"><a class="l" href="#246">246: </a> <span class="php-var">$m</span> = <span class="php-keyword2">sprintf</span>(self::ERREUR_REQUETE_TPL, <span class="php-var">$e</span>-&gt;getFile(), <span class="php-var">$e</span>-&gt;getLine(), <span class="php-var">$e</span>-&gt;getMessage(), <span class="php-var">$requete</span>);
</span><span id="247" class="l"><a class="l" href="#247">247: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$m</span>, E_USER_WARNING);
</span><span id="248" class="l"><a class="l" href="#248">248: </a> }
</span><span id="249" class="l"><a class="l" href="#249">249: </a> <span class="php-keyword1">break</span>;
</span><span id="250" class="l"><a class="l" href="#250">250: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQL :
</span><span id="251" class="l"><a class="l" href="#251">251: </a> <span class="php-var">$retour</span> = <span class="php-keyword2">mysql_query</span>(<span class="php-var">$requete</span>, <span class="php-var">$this</span>-&gt;connexion);
</span><span id="252" class="l"><a class="l" href="#252">252: </a> <span class="php-keyword1">break</span>;
</span><span id="253" class="l"><a class="l" href="#253">253: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQLI :
</span><span id="254" class="l"><a class="l" href="#254">254: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;query(<span class="php-var">$requete</span>);
</span><span id="255" class="l"><a class="l" href="#255">255: </a> <span class="php-keyword1">break</span>;
</span><span id="256" class="l"><a class="l" href="#256">256: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_SQLITE3 :
</span><span id="257" class="l"><a class="l" href="#257">257: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;<span class="php-keyword2">exec</span>(<span class="php-var">$requete</span>);
</span><span id="258" class="l"><a class="l" href="#258">258: </a> <span class="php-keyword1">break</span>;
</span><span id="259" class="l"><a class="l" href="#259">259: </a> }
</span><span id="260" class="l"><a class="l" href="#260">260: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="261" class="l"><a class="l" href="#261">261: </a> }
</span><span id="262" class="l"><a class="l" href="#262">262: </a>
</span><span id="263" class="l"><a class="l" href="#263">263: </a> <span class="php-comment">/**
</span></span><span id="264" class="l"><a class="l" href="#264">264: </a><span class="php-comment"> * @deprecated changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see recuperer
</span></span><span id="265" class="l"><a class="l" href="#265">265: </a><span class="php-comment"> */</span>
</span><span id="266" class="l"><a class="l" href="#266">266: </a> <span class="php-keyword1">final</span> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_requeteUn" href="#_requeteUn">requeteUn</a>(<span class="php-var">$requete</span>, <span class="php-var">$mode</span> = self::MODE_ASSOC) {
</span><span id="267" class="l"><a class="l" href="#267">267: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;recuperer(<span class="php-var">$requete</span>, <span class="php-var">$mode</span>);
</span><span id="268" class="l"><a class="l" href="#268">268: </a> }
</span><span id="269" class="l"><a class="l" href="#269">269: </a>
</span><span id="270" class="l"><a class="l" href="#270">270: </a> <span class="php-comment">/**
</span></span><span id="271" class="l"><a class="l" href="#271">271: </a><span class="php-comment"> * Execute une requête et retourne le premier résultat sous forme de tableau (par défaut) ou d'objet.
</span></span><span id="272" class="l"><a class="l" href="#272">272: </a><span class="php-comment"> * Les noms des champs de la base de données correspondent aux noms des clés du tableau ou aux noms des attributs de l'objet.
</span></span><span id="273" class="l"><a class="l" href="#273">273: </a><span class="php-comment"> *
</span></span><span id="274" class="l"><a class="l" href="#274">274: </a><span class="php-comment"> * @param string la requête à effectuer
</span></span><span id="275" class="l"><a class="l" href="#275">275: </a><span class="php-comment"> * @param string le mode de retour ASSOC (Bdd::MODE_ASSOC) pour un tableau ou OBJECT (Bdd::MODE_OBJET) pour un objet.
</span></span><span id="276" class="l"><a class="l" href="#276">276: </a><span class="php-comment"> * @return mixed un objet ou un tableau contenant le résultat de la requête
</span></span><span id="277" class="l"><a class="l" href="#277">277: </a><span class="php-comment"> */</span>
</span><span id="278" class="l"><a class="l" href="#278">278: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_recuperer" href="#_recuperer">recuperer</a>(<span class="php-var">$requete</span>, <span class="php-var">$mode</span> = self::MODE_ASSOC) {
</span><span id="279" class="l"><a class="l" href="#279">279: </a> <span class="php-var">$this</span>-&gt;connecter();
</span><span id="280" class="l"><a class="l" href="#280">280: </a>
</span><span id="281" class="l"><a class="l" href="#281">281: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">null</span>;
</span><span id="282" class="l"><a class="l" href="#282">282: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$this</span>-&gt;abstraction) {
</span><span id="283" class="l"><a class="l" href="#283">283: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_PDO :
</span><span id="284" class="l"><a class="l" href="#284">284: </a> <span class="php-keyword1">try</span> {
</span><span id="285" class="l"><a class="l" href="#285">285: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;query(<span class="php-var">$requete</span>);
</span><span id="286" class="l"><a class="l" href="#286">286: </a> <span class="php-var">$retour</span> = (<span class="php-var">$resultat</span> !== <span class="php-keyword1">false</span>) ? <span class="php-var">$resultat</span>-&gt;fetch(<span class="php-var">$this</span>-&gt;<span class="php-var">$mode</span>) : <span class="php-var">$resultat</span>;
</span><span id="287" class="l"><a class="l" href="#287">287: </a> } <span class="php-keyword1">catch</span> (PDOException <span class="php-var">$e</span>) {
</span><span id="288" class="l"><a class="l" href="#288">288: </a> <span class="php-var">$m</span> = <span class="php-keyword2">sprintf</span>(self::ERREUR_REQUETE_TPL, <span class="php-var">$e</span>-&gt;getFile(), <span class="php-var">$e</span>-&gt;getLine(), <span class="php-var">$e</span>-&gt;getMessage(), <span class="php-var">$requete</span>);
</span><span id="289" class="l"><a class="l" href="#289">289: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$m</span>, E_USER_WARNING);
</span><span id="290" class="l"><a class="l" href="#290">290: </a> }
</span><span id="291" class="l"><a class="l" href="#291">291: </a> <span class="php-keyword1">break</span>;
</span><span id="292" class="l"><a class="l" href="#292">292: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQL :
</span><span id="293" class="l"><a class="l" href="#293">293: </a> <span class="php-var">$res</span> = <span class="php-keyword2">mysql_query</span>(<span class="php-var">$requete</span>, <span class="php-var">$this</span>-&gt;connexion);
</span><span id="294" class="l"><a class="l" href="#294">294: </a> <span class="php-var">$fonction_fetch</span> = <span class="php-var">$this</span>-&gt;<span class="php-var">$mode</span>;
</span><span id="295" class="l"><a class="l" href="#295">295: </a> <span class="php-var">$retour</span> = <span class="php-var">$fonction_fetch</span>(<span class="php-var">$res</span>);
</span><span id="296" class="l"><a class="l" href="#296">296: </a> <span class="php-keyword1">break</span>;
</span><span id="297" class="l"><a class="l" href="#297">297: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQLI :
</span><span id="298" class="l"><a class="l" href="#298">298: </a> <span class="php-var">$res</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;query(<span class="php-var">$requete</span>);
</span><span id="299" class="l"><a class="l" href="#299">299: </a> <span class="php-var">$fonction_fetch</span> = <span class="php-var">$this</span>-&gt;<span class="php-var">$mode</span>;
</span><span id="300" class="l"><a class="l" href="#300">300: </a> <span class="php-var">$retour</span> = <span class="php-var">$res</span>-&gt;<span class="php-var">$fonction_fetch</span>();
</span><span id="301" class="l"><a class="l" href="#301">301: </a> <span class="php-keyword1">break</span>;
</span><span id="302" class="l"><a class="l" href="#302">302: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_SQLITE3 :
</span><span id="303" class="l"><a class="l" href="#303">303: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;querySingle(<span class="php-var">$requete</span>);
</span><span id="304" class="l"><a class="l" href="#304">304: </a> <span class="php-keyword1">break</span>;
</span><span id="305" class="l"><a class="l" href="#305">305: </a> }
</span><span id="306" class="l"><a class="l" href="#306">306: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="307" class="l"><a class="l" href="#307">307: </a> }
</span><span id="308" class="l"><a class="l" href="#308">308: </a>
</span><span id="309" class="l"><a class="l" href="#309">309: </a> <span class="php-comment">/**
</span></span><span id="310" class="l"><a class="l" href="#310">310: </a><span class="php-comment"> * @deprecated changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see recupererTous
</span></span><span id="311" class="l"><a class="l" href="#311">311: </a><span class="php-comment"> */</span>
</span><span id="312" class="l"><a class="l" href="#312">312: </a> <span class="php-keyword1">final</span> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_requeteTous" href="#_requeteTous">requeteTous</a>(<span class="php-var">$requete</span>, <span class="php-var">$mode</span> = self::MODE_ASSOC) {
</span><span id="313" class="l"><a class="l" href="#313">313: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;recupererTous(<span class="php-var">$requete</span>, <span class="php-var">$mode</span>);
</span><span id="314" class="l"><a class="l" href="#314">314: </a> }
</span><span id="315" class="l"><a class="l" href="#315">315: </a>
</span><span id="316" class="l"><a class="l" href="#316">316: </a> <span class="php-comment">/**
</span></span><span id="317" class="l"><a class="l" href="#317">317: </a><span class="php-comment"> * Execute une requête et retourne un tableau de résultats. Un résultat peut être présentés sous forme
</span></span><span id="318" class="l"><a class="l" href="#318">318: </a><span class="php-comment"> * de tableau (par défaut) ou d'objet.
</span></span><span id="319" class="l"><a class="l" href="#319">319: </a><span class="php-comment"> * Les noms des champs de la base de données correspondent aux noms des clés du tableau résultat ou
</span></span><span id="320" class="l"><a class="l" href="#320">320: </a><span class="php-comment"> * aux noms des attributs de l'objet résultat.
</span></span><span id="321" class="l"><a class="l" href="#321">321: </a><span class="php-comment"> *
</span></span><span id="322" class="l"><a class="l" href="#322">322: </a><span class="php-comment"> * @param string la requête à effectuer
</span></span><span id="323" class="l"><a class="l" href="#323">323: </a><span class="php-comment"> * @param string le mode de retour des résultats : ASSOC (Bdd::MODE_ASSOC) pour un tableau ou OBJECT (Bdd::MODE_OBJET) pour un objet.
</span></span><span id="324" class="l"><a class="l" href="#324">324: </a><span class="php-comment"> * @return array un tableau contenant les résultats sous forme d'objets ou de tableau (par défaut).
</span></span><span id="325" class="l"><a class="l" href="#325">325: </a><span class="php-comment"> */</span>
</span><span id="326" class="l"><a class="l" href="#326">326: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_recupererTous" href="#_recupererTous">recupererTous</a>(<span class="php-var">$requete</span>, <span class="php-var">$mode</span> = self::MODE_ASSOC) {
</span><span id="327" class="l"><a class="l" href="#327">327: </a> <span class="php-var">$this</span>-&gt;connecter();
</span><span id="328" class="l"><a class="l" href="#328">328: </a>
</span><span id="329" class="l"><a class="l" href="#329">329: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">null</span>;
</span><span id="330" class="l"><a class="l" href="#330">330: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$this</span>-&gt;abstraction) {
</span><span id="331" class="l"><a class="l" href="#331">331: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_PDO :
</span><span id="332" class="l"><a class="l" href="#332">332: </a> <span class="php-keyword1">try</span> {
</span><span id="333" class="l"><a class="l" href="#333">333: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;query(<span class="php-var">$requete</span>);
</span><span id="334" class="l"><a class="l" href="#334">334: </a> <span class="php-var">$retour</span> = (<span class="php-var">$resultat</span> !== <span class="php-keyword1">false</span>) ? <span class="php-var">$resultat</span>-&gt;fetchAll(<span class="php-var">$this</span>-&gt;<span class="php-var">$mode</span>) : <span class="php-var">$resultat</span>;
</span><span id="335" class="l"><a class="l" href="#335">335: </a> } <span class="php-keyword1">catch</span> (PDOException <span class="php-var">$e</span>) {
</span><span id="336" class="l"><a class="l" href="#336">336: </a> <span class="php-var">$m</span> = <span class="php-keyword2">sprintf</span>(self::ERREUR_REQUETE_TPL, <span class="php-var">$e</span>-&gt;getFile(), <span class="php-var">$e</span>-&gt;getLine(), <span class="php-var">$e</span>-&gt;getMessage(), <span class="php-var">$requete</span>);
</span><span id="337" class="l"><a class="l" href="#337">337: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$m</span>, E_USER_WARNING);
</span><span id="338" class="l"><a class="l" href="#338">338: </a> }
</span><span id="339" class="l"><a class="l" href="#339">339: </a> <span class="php-keyword1">break</span>;
</span><span id="340" class="l"><a class="l" href="#340">340: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQL :
</span><span id="341" class="l"><a class="l" href="#341">341: </a> <span class="php-var">$resultat</span> = <span class="php-keyword2">mysql_query</span>(<span class="php-var">$requete</span>, <span class="php-var">$this</span>-&gt;connexion);
</span><span id="342" class="l"><a class="l" href="#342">342: </a> <span class="php-var">$fonction_fetch</span> = <span class="php-var">$this</span>-&gt;<span class="php-var">$mode</span>;
</span><span id="343" class="l"><a class="l" href="#343">343: </a> <span class="php-keyword1">while</span> (<span class="php-var">$ligne</span> = <span class="php-var">$fonction_fetch</span>(<span class="php-var">$resultat</span>)) {
</span><span id="344" class="l"><a class="l" href="#344">344: </a> <span class="php-var">$retour</span>[] = <span class="php-var">$ligne</span>;
</span><span id="345" class="l"><a class="l" href="#345">345: </a> }
</span><span id="346" class="l"><a class="l" href="#346">346: </a> <span class="php-keyword1">break</span>;
</span><span id="347" class="l"><a class="l" href="#347">347: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQLI :
</span><span id="348" class="l"><a class="l" href="#348">348: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;query(<span class="php-var">$requete</span>);
</span><span id="349" class="l"><a class="l" href="#349">349: </a> <span class="php-var">$function_fetch</span> = <span class="php-var">$this</span>-&gt;<span class="php-var">$mode</span>;
</span><span id="350" class="l"><a class="l" href="#350">350: </a> <span class="php-keyword1">while</span> (<span class="php-var">$ligne</span> = <span class="php-var">$resultat</span>-&gt;<span class="php-var">$function_fetch</span>()) {
</span><span id="351" class="l"><a class="l" href="#351">351: </a> <span class="php-var">$retour</span>[] = <span class="php-var">$ligne</span>;
</span><span id="352" class="l"><a class="l" href="#352">352: </a> }
</span><span id="353" class="l"><a class="l" href="#353">353: </a> <span class="php-keyword1">break</span>;
</span><span id="354" class="l"><a class="l" href="#354">354: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_SQLITE3 :
</span><span id="355" class="l"><a class="l" href="#355">355: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;query(<span class="php-var">$requete</span>);
</span><span id="356" class="l"><a class="l" href="#356">356: </a> <span class="php-keyword1">while</span> (<span class="php-var">$ligne</span> = <span class="php-var">$resultat</span>-&gt;fetch_array(<span class="php-var">$this</span>-&gt;ASSOC)) {
</span><span id="357" class="l"><a class="l" href="#357">357: </a> <span class="php-keyword1">if</span> (<span class="php-var">$mode</span> == self::MODE_OBJET) {
</span><span id="358" class="l"><a class="l" href="#358">358: </a> <span class="php-comment">// Cas particulier de sqllite qui n'a pas de fonction fetch_object</span>
</span><span id="359" class="l"><a class="l" href="#359">359: </a> <span class="php-var">$ligneObjet</span> = <span class="php-keyword1">new</span> stdClass();
</span><span id="360" class="l"><a class="l" href="#360">360: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$ligne</span> <span class="php-keyword1">as</span> <span class="php-var">$colonne</span> =&gt; <span class="php-var">$valeur</span>) {
</span><span id="361" class="l"><a class="l" href="#361">361: </a> <span class="php-var">$ligneObjet</span>-&gt;<span class="php-var">$colonne</span> = <span class="php-var">$valeur</span>;
</span><span id="362" class="l"><a class="l" href="#362">362: </a> }
</span><span id="363" class="l"><a class="l" href="#363">363: </a> <span class="php-var">$ligne</span> = <span class="php-var">$ligneObjet</span>;
</span><span id="364" class="l"><a class="l" href="#364">364: </a> }
</span><span id="365" class="l"><a class="l" href="#365">365: </a> <span class="php-var">$retour</span>[] = <span class="php-var">$ligne</span>;
</span><span id="366" class="l"><a class="l" href="#366">366: </a> }
</span><span id="367" class="l"><a class="l" href="#367">367: </a> <span class="php-keyword1">break</span>;
</span><span id="368" class="l"><a class="l" href="#368">368: </a> }
</span><span id="369" class="l"><a class="l" href="#369">369: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="370" class="l"><a class="l" href="#370">370: </a> }
</span><span id="371" class="l"><a class="l" href="#371">371: </a>
</span><span id="372" class="l"><a class="l" href="#372">372: </a> <span class="php-comment">/**
</span></span><span id="373" class="l"><a class="l" href="#373">373: </a><span class="php-comment"> * Protège une chaine de caractères ou le contenu d'un tablea avant l'insertion dans la base de données
</span></span><span id="374" class="l"><a class="l" href="#374">374: </a><span class="php-comment"> * (ajout de quotes ou guillemets).
</span></span><span id="375" class="l"><a class="l" href="#375">375: </a><span class="php-comment"> * @param Mixed une chaine ou un tableau à protéger
</span></span><span id="376" class="l"><a class="l" href="#376">376: </a><span class="php-comment"> * @return mixed la chaine ou le tableau à protégé
</span></span><span id="377" class="l"><a class="l" href="#377">377: </a><span class="php-comment"> */</span>
</span><span id="378" class="l"><a class="l" href="#378">378: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_proteger" href="#_proteger">proteger</a>(<span class="php-var">$donnees</span>) {
</span><span id="379" class="l"><a class="l" href="#379">379: </a> <span class="php-var">$this</span>-&gt;connecter();
</span><span id="380" class="l"><a class="l" href="#380">380: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$donnees</span>)) {
</span><span id="381" class="l"><a class="l" href="#381">381: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;protegerTableau(<span class="php-var">$donnees</span>);
</span><span id="382" class="l"><a class="l" href="#382">382: </a> } <span class="php-keyword1">else</span> {
</span><span id="383" class="l"><a class="l" href="#383">383: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;protegerChaine(<span class="php-var">$donnees</span>);
</span><span id="384" class="l"><a class="l" href="#384">384: </a> }
</span><span id="385" class="l"><a class="l" href="#385">385: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="386" class="l"><a class="l" href="#386">386: </a> }
</span><span id="387" class="l"><a class="l" href="#387">387: </a>
</span><span id="388" class="l"><a class="l" href="#388">388: </a> <span class="php-comment">/**
</span></span><span id="389" class="l"><a class="l" href="#389">389: </a><span class="php-comment"> * Protège une chaine de caractères avant l'insertion dans la base de données (ajout de quotes ou guillemets).
</span></span><span id="390" class="l"><a class="l" href="#390">390: </a><span class="php-comment"> * @param string la chaine à protéger
</span></span><span id="391" class="l"><a class="l" href="#391">391: </a><span class="php-comment"> * @return string la chaine protégée
</span></span><span id="392" class="l"><a class="l" href="#392">392: </a><span class="php-comment"> */</span>
</span><span id="393" class="l"><a class="l" href="#393">393: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_protegerChaine" href="#_protegerChaine">protegerChaine</a>(<span class="php-var">$chaine</span>) {
</span><span id="394" class="l"><a class="l" href="#394">394: </a> <span class="php-var">$retour</span> = <span class="php-var">$chaine</span>;
</span><span id="395" class="l"><a class="l" href="#395">395: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$this</span>-&gt;abstraction) {
</span><span id="396" class="l"><a class="l" href="#396">396: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_PDO :
</span><span id="397" class="l"><a class="l" href="#397">397: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;quote(<span class="php-var">$chaine</span>);
</span><span id="398" class="l"><a class="l" href="#398">398: </a> <span class="php-keyword1">break</span>;
</span><span id="399" class="l"><a class="l" href="#399">399: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQL :
</span><span id="400" class="l"><a class="l" href="#400">400: </a> <span class="php-var">$retour</span> = <span class="php-quote">'&quot;'</span>.<span class="php-keyword2">mysql_real_escape_string</span>(<span class="php-var">$chaine</span>, <span class="php-var">$this</span>-&gt;connexion).<span class="php-quote">'&quot;'</span>;
</span><span id="401" class="l"><a class="l" href="#401">401: </a> <span class="php-keyword1">break</span>;
</span><span id="402" class="l"><a class="l" href="#402">402: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQLI :
</span><span id="403" class="l"><a class="l" href="#403">403: </a> <span class="php-var">$retour</span> = <span class="php-quote">'&quot;'</span>.<span class="php-var">$this</span>-&gt;connexion-&gt;real_escape_string(<span class="php-var">$chaine</span>).<span class="php-quote">'&quot;'</span>;
</span><span id="404" class="l"><a class="l" href="#404">404: </a> <span class="php-keyword1">break</span>;
</span><span id="405" class="l"><a class="l" href="#405">405: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_SQLITE3 :
</span><span id="406" class="l"><a class="l" href="#406">406: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;escapeString(<span class="php-var">$chaine</span>);
</span><span id="407" class="l"><a class="l" href="#407">407: </a> <span class="php-keyword1">break</span>;
</span><span id="408" class="l"><a class="l" href="#408">408: </a> }
</span><span id="409" class="l"><a class="l" href="#409">409: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="410" class="l"><a class="l" href="#410">410: </a> }
</span><span id="411" class="l"><a class="l" href="#411">411: </a>
</span><span id="412" class="l"><a class="l" href="#412">412: </a> <span class="php-comment">/**
</span></span><span id="413" class="l"><a class="l" href="#413">413: </a><span class="php-comment"> * @deprecated changement de nom. Deviendra &quot;private&quot; dans la version 0.5. Utiliser à la place : @see proteger
</span></span><span id="414" class="l"><a class="l" href="#414">414: </a><span class="php-comment"> */</span>
</span><span id="415" class="l"><a class="l" href="#415">415: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_protegerTableau" href="#_protegerTableau">protegerTableau</a>(<span class="php-keyword1">Array</span> <span class="php-var">$tableau</span>) {
</span><span id="416" class="l"><a class="l" href="#416">416: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tableau</span> <span class="php-keyword1">as</span> <span class="php-var">$id</span> =&gt; <span class="php-var">$val</span>) {
</span><span id="417" class="l"><a class="l" href="#417">417: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$val</span>)) {
</span><span id="418" class="l"><a class="l" href="#418">418: </a> <span class="php-var">$tableau</span>[<span class="php-var">$id</span>] = <span class="php-var">$this</span>-&gt;protegerTableau(<span class="php-var">$val</span>);
</span><span id="419" class="l"><a class="l" href="#419">419: </a> } <span class="php-keyword1">else</span> {
</span><span id="420" class="l"><a class="l" href="#420">420: </a> <span class="php-var">$tableau</span>[<span class="php-var">$id</span>] = <span class="php-var">$this</span>-&gt;protegerChaine(<span class="php-var">$val</span>);
</span><span id="421" class="l"><a class="l" href="#421">421: </a> }
</span><span id="422" class="l"><a class="l" href="#422">422: </a> }
</span><span id="423" class="l"><a class="l" href="#423">423: </a> <span class="php-keyword1">return</span> <span class="php-var">$tableau</span>;
</span><span id="424" class="l"><a class="l" href="#424">424: </a> }
</span><span id="425" class="l"><a class="l" href="#425">425: </a>
</span><span id="426" class="l"><a class="l" href="#426">426: </a> <span class="php-comment">/**
</span></span><span id="427" class="l"><a class="l" href="#427">427: </a><span class="php-comment"> * Retourne l'identifiant de la dernière ligne insérée, ou la dernière valeur d'une séquence d'objets, dépendamment, dans
</span></span><span id="428" class="l"><a class="l" href="#428">428: </a><span class="php-comment"> * le cas de PDO, du driver utilisé. Les méthodes utilisées pour retourner l'identifiant peuvent avoir des comportements
</span></span><span id="429" class="l"><a class="l" href="#429">429: </a><span class="php-comment"> * différent. Consulter la documentation PHP correspondant à l'abstraction choisie avant de l'utiliser :
</span></span><span id="430" class="l"><a class="l" href="#430">430: </a><span class="php-comment"> * @link(http://fr.php.net/manual/fr/pdo.lastinsertid.php, PDO::lastInsertId([ string $name = NULL ]))
</span></span><span id="431" class="l"><a class="l" href="#431">431: </a><span class="php-comment"> * @link(http://php.net/manual/en/mysqli.insert-id.php, mysqli-&gt;insert_id())
</span></span><span id="432" class="l"><a class="l" href="#432">432: </a><span class="php-comment"> * @link(http://fr.php.net/manual/fr/function.mysql-insert-id.php, mysql_insert_id())
</span></span><span id="433" class="l"><a class="l" href="#433">433: </a><span class="php-comment"> * @link(http://fr.php.net/manual/fr/sqlite3.lastinsertrowid.php, SQLite3::lastInsertRowID())
</span></span><span id="434" class="l"><a class="l" href="#434">434: </a><span class="php-comment"> * @param mixed un paramètre éventuel à transmettre (en fonction de l'abstraction de BDD utilisée).
</span></span><span id="435" class="l"><a class="l" href="#435">435: </a><span class="php-comment"> * @return mixed le dernier identifiant de clé primaire ajouté dans la base de données (string ou int).
</span></span><span id="436" class="l"><a class="l" href="#436">436: </a><span class="php-comment"> */</span>
</span><span id="437" class="l"><a class="l" href="#437">437: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_recupererIdDernierAjout" href="#_recupererIdDernierAjout">recupererIdDernierAjout</a>(<span class="php-var">$parametres</span> = <span class="php-keyword1">null</span>) {
</span><span id="438" class="l"><a class="l" href="#438">438: </a> <span class="php-var">$this</span>-&gt;connecter();
</span><span id="439" class="l"><a class="l" href="#439">439: </a>
</span><span id="440" class="l"><a class="l" href="#440">440: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">null</span>;
</span><span id="441" class="l"><a class="l" href="#441">441: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$this</span>-&gt;abstraction) {
</span><span id="442" class="l"><a class="l" href="#442">442: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_PDO :
</span><span id="443" class="l"><a class="l" href="#443">443: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;lastInsertId(<span class="php-var">$parametres</span>);
</span><span id="444" class="l"><a class="l" href="#444">444: </a> <span class="php-keyword1">break</span>;
</span><span id="445" class="l"><a class="l" href="#445">445: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQL :
</span><span id="446" class="l"><a class="l" href="#446">446: </a> <span class="php-var">$retour</span> = <span class="php-keyword2">mysql_insert_id</span>(<span class="php-var">$this</span>-&gt;connexion);
</span><span id="447" class="l"><a class="l" href="#447">447: </a> <span class="php-keyword1">break</span>;
</span><span id="448" class="l"><a class="l" href="#448">448: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQLI :
</span><span id="449" class="l"><a class="l" href="#449">449: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;insert_id();
</span><span id="450" class="l"><a class="l" href="#450">450: </a> <span class="php-keyword1">break</span>;
</span><span id="451" class="l"><a class="l" href="#451">451: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_SQLITE3 :
</span><span id="452" class="l"><a class="l" href="#452">452: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;connexion-&gt;lastInsertRowID();
</span><span id="453" class="l"><a class="l" href="#453">453: </a> <span class="php-keyword1">break</span>;
</span><span id="454" class="l"><a class="l" href="#454">454: </a> }
</span><span id="455" class="l"><a class="l" href="#455">455: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="456" class="l"><a class="l" href="#456">456: </a> }
</span><span id="457" class="l"><a class="l" href="#457">457: </a>
</span><span id="458" class="l"><a class="l" href="#458">458: </a> <span class="php-comment">/**
</span></span><span id="459" class="l"><a class="l" href="#459">459: </a><span class="php-comment"> * Destructeur de classe, se contente de fermer explicitement la connexion à la base de donnée.
</span></span><span id="460" class="l"><a class="l" href="#460">460: </a><span class="php-comment"> */</span>
</span><span id="461" class="l"><a class="l" href="#461">461: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___destruct" href="#___destruct">__destruct</a>() {
</span><span id="462" class="l"><a class="l" href="#462">462: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;connexion)) {
</span><span id="463" class="l"><a class="l" href="#463">463: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$this</span>-&gt;abstraction) {
</span><span id="464" class="l"><a class="l" href="#464">464: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_PDO :
</span><span id="465" class="l"><a class="l" href="#465">465: </a> <span class="php-var">$this</span>-&gt;connexion = <span class="php-keyword1">null</span>;
</span><span id="466" class="l"><a class="l" href="#466">466: </a> <span class="php-keyword1">break</span>;
</span><span id="467" class="l"><a class="l" href="#467">467: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQL :
</span><span id="468" class="l"><a class="l" href="#468">468: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;connexion)) {
</span><span id="469" class="l"><a class="l" href="#469">469: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">mysql_close</span>(<span class="php-var">$this</span>-&gt;connexion);
</span><span id="470" class="l"><a class="l" href="#470">470: </a> }
</span><span id="471" class="l"><a class="l" href="#471">471: </a> <span class="php-keyword1">break</span>;
</span><span id="472" class="l"><a class="l" href="#472">472: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_MYSQLI :
</span><span id="473" class="l"><a class="l" href="#473">473: </a> <span class="php-var">$this</span>-&gt;connexion-&gt;close();
</span><span id="474" class="l"><a class="l" href="#474">474: </a> <span class="php-keyword1">break</span>;
</span><span id="475" class="l"><a class="l" href="#475">475: </a> <span class="php-keyword1">case</span> self::ABSTRACTION_SQLITE3 :
</span><span id="476" class="l"><a class="l" href="#476">476: </a> <span class="php-var">$this</span>-&gt;connexion-&gt;close();
</span><span id="477" class="l"><a class="l" href="#477">477: </a> <span class="php-keyword1">break</span>;
</span><span id="478" class="l"><a class="l" href="#478">478: </a> }
</span><span id="479" class="l"><a class="l" href="#479">479: </a> }
</span><span id="480" class="l"><a class="l" href="#480">480: </a> }
</span><span id="481" class="l"><a class="l" href="#481">481: </a>}
</span><span id="482" class="l"><a class="l" href="#482">482: </a><span class="xlang">?&gt;</span>
</span><span id="483" class="l"><a class="l" href="#483">483: </a></span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-CacheFichier.html
New file
0,0 → 1,970
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File CacheFichier.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li class="active"><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li class="active"><a href="class-CacheFichier.html">CacheFichier</a></li>
<li><a href="class-CacheSqlite.html">CacheSqlite</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-None.html" title="Summary of None"><span>Package</span></a>
</li>
<li>
<a href="class-CacheFichier.html" title="Summary of CacheFichier"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-keyword1">class</span> <a id="CacheFichier" href="#CacheFichier">CacheFichier</a> {
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a> <span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Options disponibles
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> *
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * ====&gt; (string) stockage_chemin :
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * Chemin vers le dossier devant contenir l'arborescence du cache.
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> *
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * =====&gt; (boolean) fichier_verrou :
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * - Active / Désactive le verrouillage des fichiers
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * - Peut éviter la corruption du cache dans de mauvaises circonstances, mais cela ne fonctionne pas sur des serveur
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * multithread et sur les systèmes de fichiers NFS par exemple.
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> *
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * =====&gt; (boolean) controle_lecture :
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * - Activer / désactiver le contrôle de lecture
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * - S'il est activé, une clé de contrôle est ajoutée dans le fichier de cache et cette clé est comparée avec celle calculée
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> * après la lecture.
</span></span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-comment"> *
</span></span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-comment"> * =====&gt; (string) controle_lecture_type :
</span></span><span id="20" class="l"><a class="l" href="#20"> 20: </a><span class="php-comment"> * Type de contrôle de lecture (seulement si le contrôle de lecture est activé).
</span></span><span id="21" class="l"><a class="l" href="#21"> 21: </a><span class="php-comment"> * Les valeurs disponibles sont:
</span></span><span id="22" class="l"><a class="l" href="#22"> 22: </a><span class="php-comment"> * - «md5» pour un contrôle md5 (le meilleur mais le plus lent)
</span></span><span id="23" class="l"><a class="l" href="#23"> 23: </a><span class="php-comment"> * - «crc32» pour un contrôle de hachage crc32 (un peu moins sécurisé, mais plus rapide, un meilleur choix)
</span></span><span id="24" class="l"><a class="l" href="#24"> 24: </a><span class="php-comment"> * - «adler32» pour un contrôle de hachage adler32 (excellent choix aussi, plus rapide que crc32)
</span></span><span id="25" class="l"><a class="l" href="#25"> 25: </a><span class="php-comment"> * - «strlen» pour un test de longueur uniquement (le plus rapide)
</span></span><span id="26" class="l"><a class="l" href="#26"> 26: </a><span class="php-comment"> *
</span></span><span id="27" class="l"><a class="l" href="#27"> 27: </a><span class="php-comment"> * =====&gt; (int) dossier_niveau :
</span></span><span id="28" class="l"><a class="l" href="#28"> 28: </a><span class="php-comment"> * - Permet de réglez le nombre de niveau de sous-dossier que contiendra l'arborescence des dossiers du cache.
</span></span><span id="29" class="l"><a class="l" href="#29"> 29: </a><span class="php-comment"> * 0 signifie &quot;pas de sous-dossier pour le cache&quot;,
</span></span><span id="30" class="l"><a class="l" href="#30"> 30: </a><span class="php-comment"> * 1 signifie &quot;un niveau de sous-dossier&quot;,
</span></span><span id="31" class="l"><a class="l" href="#31"> 31: </a><span class="php-comment"> * 2 signifie &quot;deux niveaux&quot; ...
</span></span><span id="32" class="l"><a class="l" href="#32"> 32: </a><span class="php-comment"> * Cette option peut accélérer le cache seulement lorsque vous avez plusieurs centaines de fichiers de cache.
</span></span><span id="33" class="l"><a class="l" href="#33"> 33: </a><span class="php-comment"> * Seuls des tests spécifiques peuvent vous aider à choisir la meilleure valeur possible pour vous.
</span></span><span id="34" class="l"><a class="l" href="#34"> 34: </a><span class="php-comment"> * 1 ou 2 peut être est un bon début.
</span></span><span id="35" class="l"><a class="l" href="#35"> 35: </a><span class="php-comment"> *
</span></span><span id="36" class="l"><a class="l" href="#36"> 36: </a><span class="php-comment"> * =====&gt; (int) dossier_umask :
</span></span><span id="37" class="l"><a class="l" href="#37"> 37: </a><span class="php-comment"> * - Umask pour les sous-dossiers de l'arborescence du cache.
</span></span><span id="38" class="l"><a class="l" href="#38"> 38: </a><span class="php-comment"> *
</span></span><span id="39" class="l"><a class="l" href="#39"> 39: </a><span class="php-comment"> * =====&gt; (string) fichier_prefixe :
</span></span><span id="40" class="l"><a class="l" href="#40"> 40: </a><span class="php-comment"> * - préfixe pour les fichiers du cache
</span></span><span id="41" class="l"><a class="l" href="#41"> 41: </a><span class="php-comment"> * - ATTENTION : faite vraiment attention avec cette option, car une valeur trop générique dans le dossier cache du système
</span></span><span id="42" class="l"><a class="l" href="#42"> 42: </a><span class="php-comment"> * (comme /tmp) peut provoquer des catastrophes lors du nettoyage du cache.
</span></span><span id="43" class="l"><a class="l" href="#43"> 43: </a><span class="php-comment"> *
</span></span><span id="44" class="l"><a class="l" href="#44"> 44: </a><span class="php-comment"> * =====&gt; (int) fichier_umask :
</span></span><span id="45" class="l"><a class="l" href="#45"> 45: </a><span class="php-comment"> * - Umask pour les fichiers de cache
</span></span><span id="46" class="l"><a class="l" href="#46"> 46: </a><span class="php-comment"> *
</span></span><span id="47" class="l"><a class="l" href="#47"> 47: </a><span class="php-comment"> * =====&gt; (int) metadonnees_max_taille :
</span></span><span id="48" class="l"><a class="l" href="#48"> 48: </a><span class="php-comment"> * - taille maximum pour le tableau de métadonnées du cache (ne changer pas cette valeur sauf si vous savez ce que vous faite)
</span></span><span id="49" class="l"><a class="l" href="#49"> 49: </a><span class="php-comment"> *
</span></span><span id="50" class="l"><a class="l" href="#50"> 50: </a><span class="php-comment"> * @var array options disponibles
</span></span><span id="51" class="l"><a class="l" href="#51"> 51: </a><span class="php-comment"> */</span>
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$options" href="#$options">$options</a></span> = <span class="php-keyword1">array</span>(
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a> <span class="php-quote">'stockage_chemin'</span> =&gt; <span class="php-keyword1">null</span>,
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> <span class="php-quote">'fichier_verrou'</span> =&gt; <span class="php-keyword1">true</span>,
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> <span class="php-quote">'controle_lecture'</span> =&gt; <span class="php-keyword1">true</span>,
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> <span class="php-quote">'controle_lecture_type'</span> =&gt; <span class="php-quote">'crc32'</span>,
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> <span class="php-quote">'dossier_niveau'</span> =&gt; <span class="php-num">0</span>,
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> <span class="php-quote">'dossier_umask'</span> =&gt; <span class="php-num">0700</span>,
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-quote">'fichier_prefixe'</span> =&gt; <span class="php-quote">'tbf'</span>,
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> <span class="php-quote">'fichier_umask'</span> =&gt; <span class="php-num">0600</span>,
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> <span class="php-quote">'metadonnees_max_taille'</span> =&gt; <span class="php-num">100</span>
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> );
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a>
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-comment">/**
</span></span><span id="65" class="l"><a class="l" href="#65"> 65: </a><span class="php-comment"> * Array of metadatas (each item is an associative array)
</span></span><span id="66" class="l"><a class="l" href="#66"> 66: </a><span class="php-comment"> *
</span></span><span id="67" class="l"><a class="l" href="#67"> 67: </a><span class="php-comment"> * @var array
</span></span><span id="68" class="l"><a class="l" href="#68"> 68: </a><span class="php-comment"> */</span>
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$metadonnees" href="#$metadonnees">$metadonnees</a></span> = <span class="php-keyword1">array</span>();
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a>
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$Cache" href="#$Cache">$Cache</a></span> = <span class="php-keyword1">null</span>;
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a>
</span><span id="73" class="l"><a class="l" href="#73"> 73: </a> <span class="php-comment">/**
</span></span><span id="74" class="l"><a class="l" href="#74"> 74: </a><span class="php-comment"> * Constructor
</span></span><span id="75" class="l"><a class="l" href="#75"> 75: </a><span class="php-comment"> *
</span></span><span id="76" class="l"><a class="l" href="#76"> 76: </a><span class="php-comment"> * @param array $options associative array of options
</span></span><span id="77" class="l"><a class="l" href="#77"> 77: </a><span class="php-comment"> * @throws Zend_Cache_Exception
</span></span><span id="78" class="l"><a class="l" href="#78"> 78: </a><span class="php-comment"> * @return void
</span></span><span id="79" class="l"><a class="l" href="#79"> 79: </a><span class="php-comment"> */</span>
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>(<span class="php-keyword1">array</span> <span class="php-var">$options</span> = <span class="php-keyword1">array</span>(), Cache <span class="php-var">$cache</span>) {
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a> <span class="php-var">$this</span>-&gt;Cache = <span class="php-var">$cache</span>;
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> <span class="php-var">$this</span>-&gt;initialiserOptionsParConfig();
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a> <span class="php-var">$this</span>-&gt;setOptions(<span class="php-var">$options</span>);
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a>
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'prefixe_fichier'</span>])) {
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">preg_match</span>(<span class="php-quote">'~^[a-zA-Z0-9_]+$~D'</span>, <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'prefixe_fichier'</span>])) {
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Préfixe de nom de fichier invalide : doit contenir seulement [a-zA-Z0-9_]&quot;</span>, E_USER_WARNING);
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a> }
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a> }
</span><span id="90" class="l"><a class="l" href="#90"> 90: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'metadonnees_max_taille'</span>] &lt; <span class="php-num">10</span>) {
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Taille du tableau des méta-données invalide, elle doit être &gt; 10&quot;</span>, E_USER_WARNING);
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> }
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$options</span>[<span class="php-quote">'dossier_umask'</span>]) &amp;&amp; <span class="php-keyword2">is_string</span>(<span class="php-var">$options</span>[<span class="php-quote">'dossier_umask'</span>])) {
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> <span class="php-comment">// See #ZF-4422</span>
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'dossier_umask'</span>] = <span class="php-keyword2">octdec</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'dossier_umask'</span>]);
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> }
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$options</span>[<span class="php-quote">'fichier_umask'</span>]) &amp;&amp; <span class="php-keyword2">is_string</span>(<span class="php-var">$options</span>[<span class="php-quote">'fichier_umask'</span>])) {
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-comment">// See #ZF-4422</span>
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'fichier_umask'</span>] = <span class="php-keyword2">octdec</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'fichier_umask'</span>]);
</span><span id="100" class="l"><a class="l" href="#100">100: </a> }
</span><span id="101" class="l"><a class="l" href="#101">101: </a> }
</span><span id="102" class="l"><a class="l" href="#102">102: </a>
</span><span id="103" class="l"><a class="l" href="#103">103: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_initialiserOptionsParConfig" href="#_initialiserOptionsParConfig">initialiserOptionsParConfig</a>() {
</span><span id="104" class="l"><a class="l" href="#104">104: </a> <span class="php-keyword1">while</span> (<span class="php-keyword1">list</span>(<span class="php-var">$nom</span>, <span class="php-var">$valeur</span>) = <span class="php-keyword2">each</span>(<span class="php-var">$this</span>-&gt;options)) {
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-keyword1">if</span> (Config::existe(<span class="php-var">$nom</span>)) {
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-var">$this</span>-&gt;options[<span class="php-var">$nom</span>] = Config::get(<span class="php-var">$nom</span>);
</span><span id="107" class="l"><a class="l" href="#107">107: </a> }
</span><span id="108" class="l"><a class="l" href="#108">108: </a> }
</span><span id="109" class="l"><a class="l" href="#109">109: </a> }
</span><span id="110" class="l"><a class="l" href="#110">110: </a>
</span><span id="111" class="l"><a class="l" href="#111">111: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_setOptions" href="#_setOptions">setOptions</a>(<span class="php-var">$options</span>) {
</span><span id="112" class="l"><a class="l" href="#112">112: </a> <span class="php-keyword1">while</span> (<span class="php-keyword1">list</span>(<span class="php-var">$nom</span>, <span class="php-var">$valeur</span>) = <span class="php-keyword2">each</span>(<span class="php-var">$options</span>)) {
</span><span id="113" class="l"><a class="l" href="#113">113: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_string</span>(<span class="php-var">$nom</span>)) {
</span><span id="114" class="l"><a class="l" href="#114">114: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Nom d'option incorecte : </span><span class="php-var">$nom</span><span class="php-quote">&quot;</span>, E_USER_WARNING);
</span><span id="115" class="l"><a class="l" href="#115">115: </a> }
</span><span id="116" class="l"><a class="l" href="#116">116: </a> <span class="php-var">$nom</span> = <span class="php-keyword2">strtolower</span>(<span class="php-var">$nom</span>);
</span><span id="117" class="l"><a class="l" href="#117">117: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">array_key_exists</span>(<span class="php-var">$nom</span>, <span class="php-var">$this</span>-&gt;options)) {
</span><span id="118" class="l"><a class="l" href="#118">118: </a> <span class="php-var">$this</span>-&gt;options[<span class="php-var">$nom</span>] = <span class="php-var">$valeur</span>;
</span><span id="119" class="l"><a class="l" href="#119">119: </a> }
</span><span id="120" class="l"><a class="l" href="#120">120: </a> }
</span><span id="121" class="l"><a class="l" href="#121">121: </a> }
</span><span id="122" class="l"><a class="l" href="#122">122: </a>
</span><span id="123" class="l"><a class="l" href="#123">123: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_setEmplacement" href="#_setEmplacement">setEmplacement</a>(<span class="php-var">$emplacement</span>) {
</span><span id="124" class="l"><a class="l" href="#124">124: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_dir</span>(<span class="php-var">$emplacement</span>)) {
</span><span id="125" class="l"><a class="l" href="#125">125: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;L'emplacement doit être un dossier.&quot;</span>, E_USER_WARNING);
</span><span id="126" class="l"><a class="l" href="#126">126: </a> }
</span><span id="127" class="l"><a class="l" href="#127">127: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_writable</span>(<span class="php-var">$emplacement</span>)) {
</span><span id="128" class="l"><a class="l" href="#128">128: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Le dossier de stockage du cache n'est pas accessible en écriture&quot;</span>, E_USER_WARNING);
</span><span id="129" class="l"><a class="l" href="#129">129: </a> }
</span><span id="130" class="l"><a class="l" href="#130">130: </a> <span class="php-var">$emplacement</span> = <span class="php-keyword2">rtrim</span>(<span class="php-keyword2">realpath</span>(<span class="php-var">$emplacement</span>), <span class="php-quote">'\\/'</span>).DS;
</span><span id="131" class="l"><a class="l" href="#131">131: </a> <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>] = <span class="php-var">$emplacement</span>;
</span><span id="132" class="l"><a class="l" href="#132">132: </a> }
</span><span id="133" class="l"><a class="l" href="#133">133: </a>
</span><span id="134" class="l"><a class="l" href="#134">134: </a> <span class="php-comment">/**
</span></span><span id="135" class="l"><a class="l" href="#135">135: </a><span class="php-comment"> * Test if a cache is available for the given id and (if yes) return it (false else)
</span></span><span id="136" class="l"><a class="l" href="#136">136: </a><span class="php-comment"> *
</span></span><span id="137" class="l"><a class="l" href="#137">137: </a><span class="php-comment"> * @param string $id cache id
</span></span><span id="138" class="l"><a class="l" href="#138">138: </a><span class="php-comment"> * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested
</span></span><span id="139" class="l"><a class="l" href="#139">139: </a><span class="php-comment"> * @return string|false cached datas
</span></span><span id="140" class="l"><a class="l" href="#140">140: </a><span class="php-comment"> */</span>
</span><span id="141" class="l"><a class="l" href="#141">141: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_charger" href="#_charger">charger</a>(<span class="php-var">$id</span>, <span class="php-var">$ne_pas_tester_validiter_du_cache</span> = <span class="php-keyword1">false</span>) {
</span><span id="142" class="l"><a class="l" href="#142">142: </a> <span class="php-var">$donnees</span> = <span class="php-keyword1">false</span>;
</span><span id="143" class="l"><a class="l" href="#143">143: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;tester(<span class="php-var">$id</span>, <span class="php-var">$ne_pas_tester_validiter_du_cache</span>)) {
</span><span id="144" class="l"><a class="l" href="#144">144: </a> <span class="php-var">$metadonnees</span> = <span class="php-var">$this</span>-&gt;getMetadonneesFichier(<span class="php-var">$id</span>);
</span><span id="145" class="l"><a class="l" href="#145">145: </a> <span class="php-var">$fichier</span> = <span class="php-var">$this</span>-&gt;getFichierNom(<span class="php-var">$id</span>);
</span><span id="146" class="l"><a class="l" href="#146">146: </a> <span class="php-var">$donnees</span> = <span class="php-var">$this</span>-&gt;getContenuFichier(<span class="php-var">$fichier</span>);
</span><span id="147" class="l"><a class="l" href="#147">147: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'controle_lecture'</span>]) {
</span><span id="148" class="l"><a class="l" href="#148">148: </a> <span class="php-var">$cle_secu_donnees</span> = <span class="php-var">$this</span>-&gt;genererCleSecu(<span class="php-var">$donnees</span>, <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'controle_lecture_type'</span>]);
</span><span id="149" class="l"><a class="l" href="#149">149: </a> <span class="php-var">$cle_secu_controle</span> = <span class="php-var">$metadonnees</span>[<span class="php-quote">'hash'</span>];
</span><span id="150" class="l"><a class="l" href="#150">150: </a> <span class="php-keyword1">if</span> (<span class="php-var">$cle_secu_donnees</span> != <span class="php-var">$cle_secu_controle</span>) {
</span><span id="151" class="l"><a class="l" href="#151">151: </a> <span class="php-comment">// Probléme détecté par le contrôle de lecture !</span>
</span><span id="152" class="l"><a class="l" href="#152">152: </a> <span class="php-comment">// TODO : loguer le pb de sécu</span>
</span><span id="153" class="l"><a class="l" href="#153">153: </a> <span class="php-var">$this</span>-&gt;supprimer(<span class="php-var">$id</span>);
</span><span id="154" class="l"><a class="l" href="#154">154: </a> <span class="php-var">$donnees</span> = <span class="php-keyword1">false</span>;
</span><span id="155" class="l"><a class="l" href="#155">155: </a> }
</span><span id="156" class="l"><a class="l" href="#156">156: </a> }
</span><span id="157" class="l"><a class="l" href="#157">157: </a> }
</span><span id="158" class="l"><a class="l" href="#158">158: </a> <span class="php-keyword1">return</span> <span class="php-var">$donnees</span>;
</span><span id="159" class="l"><a class="l" href="#159">159: </a> }
</span><span id="160" class="l"><a class="l" href="#160">160: </a>
</span><span id="161" class="l"><a class="l" href="#161">161: </a> <span class="php-comment">/**
</span></span><span id="162" class="l"><a class="l" href="#162">162: </a><span class="php-comment"> * Teste si un enregistrement en cache est disponible ou pas (pour l'id passé en paramètre).
</span></span><span id="163" class="l"><a class="l" href="#163">163: </a><span class="php-comment"> *
</span></span><span id="164" class="l"><a class="l" href="#164">164: </a><span class="php-comment"> * @param string $id identifiant de cache.
</span></span><span id="165" class="l"><a class="l" href="#165">165: </a><span class="php-comment"> * @return mixed false (le cache n'est pas disponible) ou timestamp (int) &quot;de dernière modification&quot; de l'enregistrement en cache
</span></span><span id="166" class="l"><a class="l" href="#166">166: </a><span class="php-comment"> */</span>
</span><span id="167" class="l"><a class="l" href="#167">167: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_tester" href="#_tester">tester</a>(<span class="php-var">$id</span>) {
</span><span id="168" class="l"><a class="l" href="#168">168: </a> <span class="php-keyword2">clearstatcache</span>();
</span><span id="169" class="l"><a class="l" href="#169">169: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;testerExistenceCache(<span class="php-var">$id</span>, <span class="php-keyword1">false</span>);
</span><span id="170" class="l"><a class="l" href="#170">170: </a> }
</span><span id="171" class="l"><a class="l" href="#171">171: </a>
</span><span id="172" class="l"><a class="l" href="#172">172: </a> <span class="php-comment">/**
</span></span><span id="173" class="l"><a class="l" href="#173">173: </a><span class="php-comment"> * Save some string datas into a cache record
</span></span><span id="174" class="l"><a class="l" href="#174">174: </a><span class="php-comment"> *
</span></span><span id="175" class="l"><a class="l" href="#175">175: </a><span class="php-comment"> * Note : $data is always &quot;string&quot; (serialization is done by the
</span></span><span id="176" class="l"><a class="l" href="#176">176: </a><span class="php-comment"> * core not by the backend)
</span></span><span id="177" class="l"><a class="l" href="#177">177: </a><span class="php-comment"> *
</span></span><span id="178" class="l"><a class="l" href="#178">178: </a><span class="php-comment"> * @param string $data Datas to cache
</span></span><span id="179" class="l"><a class="l" href="#179">179: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="180" class="l"><a class="l" href="#180">180: </a><span class="php-comment"> * @param array $tags Array of strings, the cache record will be tagged by each string entry
</span></span><span id="181" class="l"><a class="l" href="#181">181: </a><span class="php-comment"> * @param int $specificLifetime If != false, set a specific lifetime for this cache record (null =&gt; infinite lifetime)
</span></span><span id="182" class="l"><a class="l" href="#182">182: </a><span class="php-comment"> * @return boolean true if no problem
</span></span><span id="183" class="l"><a class="l" href="#183">183: </a><span class="php-comment"> */</span>
</span><span id="184" class="l"><a class="l" href="#184">184: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_sauver" href="#_sauver">sauver</a>(<span class="php-var">$donnees</span>, <span class="php-var">$id</span>, <span class="php-var">$tags</span> = <span class="php-keyword1">array</span>(), <span class="php-var">$duree_vie_specifique</span> = <span class="php-keyword1">false</span>) {
</span><span id="185" class="l"><a class="l" href="#185">185: </a> <span class="php-keyword2">clearstatcache</span>();
</span><span id="186" class="l"><a class="l" href="#186">186: </a> <span class="php-var">$fichier</span> = <span class="php-var">$this</span>-&gt;getFichierNom(<span class="php-var">$id</span>);
</span><span id="187" class="l"><a class="l" href="#187">187: </a> <span class="php-var">$chemin</span> = <span class="php-var">$this</span>-&gt;getChemin(<span class="php-var">$id</span>);
</span><span id="188" class="l"><a class="l" href="#188">188: </a>
</span><span id="189" class="l"><a class="l" href="#189">189: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="190" class="l"><a class="l" href="#190">190: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'dossier_niveau'</span>] &gt; <span class="php-num">0</span>) {
</span><span id="191" class="l"><a class="l" href="#191">191: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_writable</span>(<span class="php-var">$chemin</span>)) {
</span><span id="192" class="l"><a class="l" href="#192">192: </a> <span class="php-comment">// maybe, we just have to build the directory structure</span>
</span><span id="193" class="l"><a class="l" href="#193">193: </a> <span class="php-var">$this</span>-&gt;lancerMkdirEtChmodRecursif(<span class="php-var">$id</span>);
</span><span id="194" class="l"><a class="l" href="#194">194: </a> }
</span><span id="195" class="l"><a class="l" href="#195">195: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_writable</span>(<span class="php-var">$chemin</span>)) {
</span><span id="196" class="l"><a class="l" href="#196">196: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">false</span>;
</span><span id="197" class="l"><a class="l" href="#197">197: </a> }
</span><span id="198" class="l"><a class="l" href="#198">198: </a> }
</span><span id="199" class="l"><a class="l" href="#199">199: </a>
</span><span id="200" class="l"><a class="l" href="#200">200: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span> === <span class="php-keyword1">true</span>) {
</span><span id="201" class="l"><a class="l" href="#201">201: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'controle_lecture'</span>]) {
</span><span id="202" class="l"><a class="l" href="#202">202: </a> <span class="php-var">$cle_secu</span> = <span class="php-var">$this</span>-&gt;genererCleSecu(<span class="php-var">$donnees</span>, <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'controle_lecture_type'</span>]);
</span><span id="203" class="l"><a class="l" href="#203">203: </a> } <span class="php-keyword1">else</span> {
</span><span id="204" class="l"><a class="l" href="#204">204: </a> <span class="php-var">$cle_secu</span> = <span class="php-quote">''</span>;
</span><span id="205" class="l"><a class="l" href="#205">205: </a> }
</span><span id="206" class="l"><a class="l" href="#206">206: </a>
</span><span id="207" class="l"><a class="l" href="#207">207: </a> <span class="php-var">$metadonnees</span> = <span class="php-keyword1">array</span>(
</span><span id="208" class="l"><a class="l" href="#208">208: </a> <span class="php-quote">'hash'</span> =&gt; <span class="php-var">$cle_secu</span>,
</span><span id="209" class="l"><a class="l" href="#209">209: </a> <span class="php-quote">'mtime'</span> =&gt; <span class="php-keyword2">time</span>(),
</span><span id="210" class="l"><a class="l" href="#210">210: </a> <span class="php-quote">'expiration'</span> =&gt; <span class="php-var">$this</span>-&gt;Cache-&gt;getTimestampExpiration(<span class="php-var">$duree_vie_specifique</span>),
</span><span id="211" class="l"><a class="l" href="#211">211: </a> <span class="php-quote">'tags'</span> =&gt; <span class="php-var">$tags</span>
</span><span id="212" class="l"><a class="l" href="#212">212: </a> );
</span><span id="213" class="l"><a class="l" href="#213">213: </a>
</span><span id="214" class="l"><a class="l" href="#214">214: </a> <span class="php-keyword1">if</span> (! <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;setMetadonnees(<span class="php-var">$id</span>, <span class="php-var">$metadonnees</span>)) {
</span><span id="215" class="l"><a class="l" href="#215">215: </a> <span class="php-comment">// TODO : ajouter un log</span>
</span><span id="216" class="l"><a class="l" href="#216">216: </a> } <span class="php-keyword1">else</span> {
</span><span id="217" class="l"><a class="l" href="#217">217: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;setContenuFichier(<span class="php-var">$fichier</span>, <span class="php-var">$donnees</span>);
</span><span id="218" class="l"><a class="l" href="#218">218: </a> }
</span><span id="219" class="l"><a class="l" href="#219">219: </a> }
</span><span id="220" class="l"><a class="l" href="#220">220: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="221" class="l"><a class="l" href="#221">221: </a> }
</span><span id="222" class="l"><a class="l" href="#222">222: </a>
</span><span id="223" class="l"><a class="l" href="#223">223: </a> <span class="php-comment">/**
</span></span><span id="224" class="l"><a class="l" href="#224">224: </a><span class="php-comment"> * Remove a cache record
</span></span><span id="225" class="l"><a class="l" href="#225">225: </a><span class="php-comment"> *
</span></span><span id="226" class="l"><a class="l" href="#226">226: </a><span class="php-comment"> * @param string $id cache id
</span></span><span id="227" class="l"><a class="l" href="#227">227: </a><span class="php-comment"> * @return boolean true if no problem
</span></span><span id="228" class="l"><a class="l" href="#228">228: </a><span class="php-comment"> */</span>
</span><span id="229" class="l"><a class="l" href="#229">229: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_supprimer" href="#_supprimer">supprimer</a>(<span class="php-var">$id</span>) {
</span><span id="230" class="l"><a class="l" href="#230">230: </a> <span class="php-var">$fichier</span> = <span class="php-var">$this</span>-&gt;getFichierNom(<span class="php-var">$id</span>);
</span><span id="231" class="l"><a class="l" href="#231">231: </a> <span class="php-var">$suppression_fichier</span> = <span class="php-var">$this</span>-&gt;supprimerFichier(<span class="php-var">$fichier</span>);
</span><span id="232" class="l"><a class="l" href="#232">232: </a> <span class="php-var">$suppression_metadonnees</span> = <span class="php-var">$this</span>-&gt;supprimerMetadonnees(<span class="php-var">$id</span>);
</span><span id="233" class="l"><a class="l" href="#233">233: </a> <span class="php-keyword1">return</span> <span class="php-var">$suppression_metadonnees</span> &amp;&amp; <span class="php-var">$suppression_fichier</span>;
</span><span id="234" class="l"><a class="l" href="#234">234: </a> }
</span><span id="235" class="l"><a class="l" href="#235">235: </a>
</span><span id="236" class="l"><a class="l" href="#236">236: </a> <span class="php-comment">/**
</span></span><span id="237" class="l"><a class="l" href="#237">237: </a><span class="php-comment"> * Clean some cache records
</span></span><span id="238" class="l"><a class="l" href="#238">238: </a><span class="php-comment"> *
</span></span><span id="239" class="l"><a class="l" href="#239">239: </a><span class="php-comment"> * Available modes are :
</span></span><span id="240" class="l"><a class="l" href="#240">240: </a><span class="php-comment"> * 'all' (default) =&gt; remove all cache entries ($tags is not used)
</span></span><span id="241" class="l"><a class="l" href="#241">241: </a><span class="php-comment"> * 'old' =&gt; remove too old cache entries ($tags is not used)
</span></span><span id="242" class="l"><a class="l" href="#242">242: </a><span class="php-comment"> * 'matchingTag' =&gt; remove cache entries matching all given tags
</span></span><span id="243" class="l"><a class="l" href="#243">243: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="244" class="l"><a class="l" href="#244">244: </a><span class="php-comment"> * 'notMatchingTag' =&gt; remove cache entries not matching one of the given tags
</span></span><span id="245" class="l"><a class="l" href="#245">245: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="246" class="l"><a class="l" href="#246">246: </a><span class="php-comment"> * 'matchingAnyTag' =&gt; remove cache entries matching any given tags
</span></span><span id="247" class="l"><a class="l" href="#247">247: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="248" class="l"><a class="l" href="#248">248: </a><span class="php-comment"> *
</span></span><span id="249" class="l"><a class="l" href="#249">249: </a><span class="php-comment"> * @param string $mode clean mode
</span></span><span id="250" class="l"><a class="l" href="#250">250: </a><span class="php-comment"> * @param tags array $tags array of tags
</span></span><span id="251" class="l"><a class="l" href="#251">251: </a><span class="php-comment"> * @return boolean true if no problem
</span></span><span id="252" class="l"><a class="l" href="#252">252: </a><span class="php-comment"> */</span>
</span><span id="253" class="l"><a class="l" href="#253">253: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_nettoyer" href="#_nettoyer">nettoyer</a>(<span class="php-var">$mode</span> = Cache::NETTOYAGE_MODE_TOUS, <span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="254" class="l"><a class="l" href="#254">254: </a> <span class="php-comment">// We use this protected method to hide the recursive stuff</span>
</span><span id="255" class="l"><a class="l" href="#255">255: </a> <span class="php-keyword2">clearstatcache</span>();
</span><span id="256" class="l"><a class="l" href="#256">256: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;nettoyerFichiers(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>], <span class="php-var">$mode</span>, <span class="php-var">$tags</span>);
</span><span id="257" class="l"><a class="l" href="#257">257: </a> }
</span><span id="258" class="l"><a class="l" href="#258">258: </a>
</span><span id="259" class="l"><a class="l" href="#259">259: </a> <span class="php-comment">/**
</span></span><span id="260" class="l"><a class="l" href="#260">260: </a><span class="php-comment"> * Return an array of stored cache ids
</span></span><span id="261" class="l"><a class="l" href="#261">261: </a><span class="php-comment"> *
</span></span><span id="262" class="l"><a class="l" href="#262">262: </a><span class="php-comment"> * @return array array of stored cache ids (string)
</span></span><span id="263" class="l"><a class="l" href="#263">263: </a><span class="php-comment"> */</span>
</span><span id="264" class="l"><a class="l" href="#264">264: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIds" href="#_getIds">getIds</a>() {
</span><span id="265" class="l"><a class="l" href="#265">265: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;analyserCache(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>], <span class="php-quote">'ids'</span>, <span class="php-keyword1">array</span>());
</span><span id="266" class="l"><a class="l" href="#266">266: </a> }
</span><span id="267" class="l"><a class="l" href="#267">267: </a>
</span><span id="268" class="l"><a class="l" href="#268">268: </a> <span class="php-comment">/**
</span></span><span id="269" class="l"><a class="l" href="#269">269: </a><span class="php-comment"> * Return an array of stored tags
</span></span><span id="270" class="l"><a class="l" href="#270">270: </a><span class="php-comment"> *
</span></span><span id="271" class="l"><a class="l" href="#271">271: </a><span class="php-comment"> * @return array array of stored tags (string)
</span></span><span id="272" class="l"><a class="l" href="#272">272: </a><span class="php-comment"> */</span>
</span><span id="273" class="l"><a class="l" href="#273">273: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getTags" href="#_getTags">getTags</a>() {
</span><span id="274" class="l"><a class="l" href="#274">274: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;analyserCache(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>], <span class="php-quote">'tags'</span>, <span class="php-keyword1">array</span>());
</span><span id="275" class="l"><a class="l" href="#275">275: </a> }
</span><span id="276" class="l"><a class="l" href="#276">276: </a>
</span><span id="277" class="l"><a class="l" href="#277">277: </a> <span class="php-comment">/**
</span></span><span id="278" class="l"><a class="l" href="#278">278: </a><span class="php-comment"> * Return an array of stored cache ids which match given tags
</span></span><span id="279" class="l"><a class="l" href="#279">279: </a><span class="php-comment"> *
</span></span><span id="280" class="l"><a class="l" href="#280">280: </a><span class="php-comment"> * In case of multiple tags, a logical AND is made between tags
</span></span><span id="281" class="l"><a class="l" href="#281">281: </a><span class="php-comment"> *
</span></span><span id="282" class="l"><a class="l" href="#282">282: </a><span class="php-comment"> * @param array $tags array of tags
</span></span><span id="283" class="l"><a class="l" href="#283">283: </a><span class="php-comment"> * @return array array of matching cache ids (string)
</span></span><span id="284" class="l"><a class="l" href="#284">284: </a><span class="php-comment"> */</span>
</span><span id="285" class="l"><a class="l" href="#285">285: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIdsAvecLesTags" href="#_getIdsAvecLesTags">getIdsAvecLesTags</a>(<span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="286" class="l"><a class="l" href="#286">286: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;analyserCache(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>], <span class="php-quote">'matching'</span>, <span class="php-var">$tags</span>);
</span><span id="287" class="l"><a class="l" href="#287">287: </a> }
</span><span id="288" class="l"><a class="l" href="#288">288: </a>
</span><span id="289" class="l"><a class="l" href="#289">289: </a> <span class="php-comment">/**
</span></span><span id="290" class="l"><a class="l" href="#290">290: </a><span class="php-comment"> * Return an array of stored cache ids which don't match given tags
</span></span><span id="291" class="l"><a class="l" href="#291">291: </a><span class="php-comment"> *
</span></span><span id="292" class="l"><a class="l" href="#292">292: </a><span class="php-comment"> * In case of multiple tags, a logical OR is made between tags
</span></span><span id="293" class="l"><a class="l" href="#293">293: </a><span class="php-comment"> *
</span></span><span id="294" class="l"><a class="l" href="#294">294: </a><span class="php-comment"> * @param array $tags array of tags
</span></span><span id="295" class="l"><a class="l" href="#295">295: </a><span class="php-comment"> * @return array array of not matching cache ids (string)
</span></span><span id="296" class="l"><a class="l" href="#296">296: </a><span class="php-comment"> */</span>
</span><span id="297" class="l"><a class="l" href="#297">297: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIdsSansLesTags" href="#_getIdsSansLesTags">getIdsSansLesTags</a>(<span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="298" class="l"><a class="l" href="#298">298: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;analyserCache(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>], <span class="php-quote">'notMatching'</span>, <span class="php-var">$tags</span>);
</span><span id="299" class="l"><a class="l" href="#299">299: </a> }
</span><span id="300" class="l"><a class="l" href="#300">300: </a>
</span><span id="301" class="l"><a class="l" href="#301">301: </a> <span class="php-comment">/**
</span></span><span id="302" class="l"><a class="l" href="#302">302: </a><span class="php-comment"> * Return an array of stored cache ids which match any given tags
</span></span><span id="303" class="l"><a class="l" href="#303">303: </a><span class="php-comment"> *
</span></span><span id="304" class="l"><a class="l" href="#304">304: </a><span class="php-comment"> * In case of multiple tags, a logical AND is made between tags
</span></span><span id="305" class="l"><a class="l" href="#305">305: </a><span class="php-comment"> *
</span></span><span id="306" class="l"><a class="l" href="#306">306: </a><span class="php-comment"> * @param array $tags array of tags
</span></span><span id="307" class="l"><a class="l" href="#307">307: </a><span class="php-comment"> * @return array array of any matching cache ids (string)
</span></span><span id="308" class="l"><a class="l" href="#308">308: </a><span class="php-comment"> */</span>
</span><span id="309" class="l"><a class="l" href="#309">309: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getIdsAvecUnTag" href="#_getIdsAvecUnTag">getIdsAvecUnTag</a>(<span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="310" class="l"><a class="l" href="#310">310: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;analyserCache(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>], <span class="php-quote">'matchingAny'</span>, <span class="php-var">$tags</span>);
</span><span id="311" class="l"><a class="l" href="#311">311: </a> }
</span><span id="312" class="l"><a class="l" href="#312">312: </a>
</span><span id="313" class="l"><a class="l" href="#313">313: </a> <span class="php-comment">/**
</span></span><span id="314" class="l"><a class="l" href="#314">314: </a><span class="php-comment"> * Return the filling percentage of the backend storage
</span></span><span id="315" class="l"><a class="l" href="#315">315: </a><span class="php-comment"> *
</span></span><span id="316" class="l"><a class="l" href="#316">316: </a><span class="php-comment"> * @throws Zend_Cache_Exception
</span></span><span id="317" class="l"><a class="l" href="#317">317: </a><span class="php-comment"> * @return int integer between 0 and 100
</span></span><span id="318" class="l"><a class="l" href="#318">318: </a><span class="php-comment"> */</span>
</span><span id="319" class="l"><a class="l" href="#319">319: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getPourcentageRemplissage" href="#_getPourcentageRemplissage">getPourcentageRemplissage</a>() {
</span><span id="320" class="l"><a class="l" href="#320">320: </a> <span class="php-var">$libre</span> = <span class="php-keyword2">disk_free_space</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>]);
</span><span id="321" class="l"><a class="l" href="#321">321: </a> <span class="php-var">$total</span> = <span class="php-keyword2">disk_total_space</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>]);
</span><span id="322" class="l"><a class="l" href="#322">322: </a>
</span><span id="323" class="l"><a class="l" href="#323">323: </a> <span class="php-var">$pourcentage</span> = <span class="php-num">0</span>;
</span><span id="324" class="l"><a class="l" href="#324">324: </a> <span class="php-keyword1">if</span> (<span class="php-var">$total</span> == <span class="php-num">0</span>) {
</span><span id="325" class="l"><a class="l" href="#325">325: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Impossible d'utiliser la fonction disk_total_space&quot;</span>, E_USER_WARNING);
</span><span id="326" class="l"><a class="l" href="#326">326: </a> } <span class="php-keyword1">else</span> {
</span><span id="327" class="l"><a class="l" href="#327">327: </a> <span class="php-var">$pourcentage</span> = (<span class="php-var">$libre</span> &gt;= <span class="php-var">$total</span>) ? <span class="php-num">100</span> : ((int) (<span class="php-num">100</span>. * (<span class="php-var">$total</span> - <span class="php-var">$libre</span>) / <span class="php-var">$total</span>));
</span><span id="328" class="l"><a class="l" href="#328">328: </a> }
</span><span id="329" class="l"><a class="l" href="#329">329: </a> <span class="php-keyword1">return</span> <span class="php-var">$pourcentage</span>;
</span><span id="330" class="l"><a class="l" href="#330">330: </a> }
</span><span id="331" class="l"><a class="l" href="#331">331: </a>
</span><span id="332" class="l"><a class="l" href="#332">332: </a> <span class="php-comment">/**
</span></span><span id="333" class="l"><a class="l" href="#333">333: </a><span class="php-comment"> * Return an array of metadatas for the given cache id
</span></span><span id="334" class="l"><a class="l" href="#334">334: </a><span class="php-comment"> *
</span></span><span id="335" class="l"><a class="l" href="#335">335: </a><span class="php-comment"> * The array must include these keys :
</span></span><span id="336" class="l"><a class="l" href="#336">336: </a><span class="php-comment"> * - expire : the expire timestamp
</span></span><span id="337" class="l"><a class="l" href="#337">337: </a><span class="php-comment"> * - tags : a string array of tags
</span></span><span id="338" class="l"><a class="l" href="#338">338: </a><span class="php-comment"> * - mtime : timestamp of last modification time
</span></span><span id="339" class="l"><a class="l" href="#339">339: </a><span class="php-comment"> *
</span></span><span id="340" class="l"><a class="l" href="#340">340: </a><span class="php-comment"> * @param string $id cache id
</span></span><span id="341" class="l"><a class="l" href="#341">341: </a><span class="php-comment"> * @return array array of metadatas (false if the cache id is not found)
</span></span><span id="342" class="l"><a class="l" href="#342">342: </a><span class="php-comment"> */</span>
</span><span id="343" class="l"><a class="l" href="#343">343: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getMetadonnees" href="#_getMetadonnees">getMetadonnees</a>(<span class="php-var">$id</span>) {
</span><span id="344" class="l"><a class="l" href="#344">344: </a> <span class="php-keyword1">if</span> (<span class="php-var">$metadonnees</span> = <span class="php-var">$this</span>-&gt;getMetadonneesFichier(<span class="php-var">$id</span>)) {
</span><span id="345" class="l"><a class="l" href="#345">345: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">time</span>() &gt; <span class="php-var">$metadonnees</span>[<span class="php-quote">'expiration'</span>]) {
</span><span id="346" class="l"><a class="l" href="#346">346: </a> <span class="php-var">$metadonnees</span> = <span class="php-keyword1">false</span>;
</span><span id="347" class="l"><a class="l" href="#347">347: </a> } <span class="php-keyword1">else</span> {
</span><span id="348" class="l"><a class="l" href="#348">348: </a> <span class="php-var">$metadonnees</span> = <span class="php-keyword1">array</span>(
</span><span id="349" class="l"><a class="l" href="#349">349: </a> <span class="php-quote">'expiration'</span> =&gt; <span class="php-var">$metadonnees</span>[<span class="php-quote">'expiration'</span>],
</span><span id="350" class="l"><a class="l" href="#350">350: </a> <span class="php-quote">'tags'</span> =&gt; <span class="php-var">$metadonnees</span>[<span class="php-quote">'tags'</span>],
</span><span id="351" class="l"><a class="l" href="#351">351: </a> <span class="php-quote">'mtime'</span> =&gt; <span class="php-var">$metadonnees</span>[<span class="php-quote">'mtime'</span>]
</span><span id="352" class="l"><a class="l" href="#352">352: </a> );
</span><span id="353" class="l"><a class="l" href="#353">353: </a> }
</span><span id="354" class="l"><a class="l" href="#354">354: </a> }
</span><span id="355" class="l"><a class="l" href="#355">355: </a>
</span><span id="356" class="l"><a class="l" href="#356">356: </a> <span class="php-keyword1">return</span> <span class="php-var">$metadonnees</span>;
</span><span id="357" class="l"><a class="l" href="#357">357: </a> }
</span><span id="358" class="l"><a class="l" href="#358">358: </a>
</span><span id="359" class="l"><a class="l" href="#359">359: </a> <span class="php-comment">/**
</span></span><span id="360" class="l"><a class="l" href="#360">360: </a><span class="php-comment"> * Give (if possible) an extra lifetime to the given cache id
</span></span><span id="361" class="l"><a class="l" href="#361">361: </a><span class="php-comment"> *
</span></span><span id="362" class="l"><a class="l" href="#362">362: </a><span class="php-comment"> * @param string $id cache id
</span></span><span id="363" class="l"><a class="l" href="#363">363: </a><span class="php-comment"> * @param int $extraLifetime
</span></span><span id="364" class="l"><a class="l" href="#364">364: </a><span class="php-comment"> * @return boolean true if ok
</span></span><span id="365" class="l"><a class="l" href="#365">365: </a><span class="php-comment"> */</span>
</span><span id="366" class="l"><a class="l" href="#366">366: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_ajouterSupplementDureeDeVie" href="#_ajouterSupplementDureeDeVie">ajouterSupplementDureeDeVie</a>(<span class="php-var">$id</span>, <span class="php-var">$supplement_duree_de_vie</span>) {
</span><span id="367" class="l"><a class="l" href="#367">367: </a> <span class="php-var">$augmentation</span> = <span class="php-keyword1">true</span>;
</span><span id="368" class="l"><a class="l" href="#368">368: </a> <span class="php-keyword1">if</span> (<span class="php-var">$metadonnees</span> = <span class="php-var">$this</span>-&gt;getMetadonneesFichier(<span class="php-var">$id</span>)) {
</span><span id="369" class="l"><a class="l" href="#369">369: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">time</span>() &gt; <span class="php-var">$metadonnees</span>[<span class="php-quote">'expiration'</span>]) {
</span><span id="370" class="l"><a class="l" href="#370">370: </a> <span class="php-var">$augmentation</span> = <span class="php-keyword1">false</span>;
</span><span id="371" class="l"><a class="l" href="#371">371: </a> } <span class="php-keyword1">else</span> {
</span><span id="372" class="l"><a class="l" href="#372">372: </a> <span class="php-var">$metadonnees_nouvelle</span> = <span class="php-keyword1">array</span>(
</span><span id="373" class="l"><a class="l" href="#373">373: </a> <span class="php-quote">'hash'</span> =&gt; <span class="php-var">$metadonnees</span>[<span class="php-quote">'hash'</span>],
</span><span id="374" class="l"><a class="l" href="#374">374: </a> <span class="php-quote">'mtime'</span> =&gt; <span class="php-keyword2">time</span>(),
</span><span id="375" class="l"><a class="l" href="#375">375: </a> <span class="php-quote">'expiration'</span> =&gt; <span class="php-var">$metadonnees</span>[<span class="php-quote">'expiration'</span>] + <span class="php-var">$supplement_duree_de_vie</span>,
</span><span id="376" class="l"><a class="l" href="#376">376: </a> <span class="php-quote">'tags'</span> =&gt; <span class="php-var">$metadonnees</span>[<span class="php-quote">'tags'</span>]
</span><span id="377" class="l"><a class="l" href="#377">377: </a> );
</span><span id="378" class="l"><a class="l" href="#378">378: </a> <span class="php-var">$augmentation</span> = <span class="php-var">$this</span>-&gt;setMetadonnees(<span class="php-var">$id</span>, <span class="php-var">$metadonnees_nouvelle</span>);
</span><span id="379" class="l"><a class="l" href="#379">379: </a> }
</span><span id="380" class="l"><a class="l" href="#380">380: </a> }
</span><span id="381" class="l"><a class="l" href="#381">381: </a> <span class="php-keyword1">return</span> <span class="php-var">$augmentation</span>;
</span><span id="382" class="l"><a class="l" href="#382">382: </a> }
</span><span id="383" class="l"><a class="l" href="#383">383: </a>
</span><span id="384" class="l"><a class="l" href="#384">384: </a> <span class="php-comment">/**
</span></span><span id="385" class="l"><a class="l" href="#385">385: </a><span class="php-comment"> * Get a metadatas record
</span></span><span id="386" class="l"><a class="l" href="#386">386: </a><span class="php-comment"> *
</span></span><span id="387" class="l"><a class="l" href="#387">387: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="388" class="l"><a class="l" href="#388">388: </a><span class="php-comment"> * @return array|false Associative array of metadatas
</span></span><span id="389" class="l"><a class="l" href="#389">389: </a><span class="php-comment"> */</span>
</span><span id="390" class="l"><a class="l" href="#390">390: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getMetadonneesFichier" href="#_getMetadonneesFichier">getMetadonneesFichier</a>(<span class="php-var">$id</span>) {
</span><span id="391" class="l"><a class="l" href="#391">391: </a> <span class="php-var">$metadonnees</span> = <span class="php-keyword1">false</span>;
</span><span id="392" class="l"><a class="l" href="#392">392: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;metadonnees[<span class="php-var">$id</span>])) {
</span><span id="393" class="l"><a class="l" href="#393">393: </a> <span class="php-var">$metadonnees</span> = <span class="php-var">$this</span>-&gt;metadonnees[<span class="php-var">$id</span>];
</span><span id="394" class="l"><a class="l" href="#394">394: </a> } <span class="php-keyword1">else</span> {
</span><span id="395" class="l"><a class="l" href="#395">395: </a> <span class="php-keyword1">if</span> (<span class="php-var">$metadonnees</span> = <span class="php-var">$this</span>-&gt;chargerMetadonnees(<span class="php-var">$id</span>)) {
</span><span id="396" class="l"><a class="l" href="#396">396: </a> <span class="php-var">$this</span>-&gt;setMetadonnees(<span class="php-var">$id</span>, <span class="php-var">$metadonnees</span>, <span class="php-keyword1">false</span>);
</span><span id="397" class="l"><a class="l" href="#397">397: </a> }
</span><span id="398" class="l"><a class="l" href="#398">398: </a> }
</span><span id="399" class="l"><a class="l" href="#399">399: </a> <span class="php-keyword1">return</span> <span class="php-var">$metadonnees</span>;
</span><span id="400" class="l"><a class="l" href="#400">400: </a> }
</span><span id="401" class="l"><a class="l" href="#401">401: </a>
</span><span id="402" class="l"><a class="l" href="#402">402: </a> <span class="php-comment">/**
</span></span><span id="403" class="l"><a class="l" href="#403">403: </a><span class="php-comment"> * Set a metadatas record
</span></span><span id="404" class="l"><a class="l" href="#404">404: </a><span class="php-comment"> *
</span></span><span id="405" class="l"><a class="l" href="#405">405: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="406" class="l"><a class="l" href="#406">406: </a><span class="php-comment"> * @param array $metadatas Associative array of metadatas
</span></span><span id="407" class="l"><a class="l" href="#407">407: </a><span class="php-comment"> * @param boolean $save optional pass false to disable saving to file
</span></span><span id="408" class="l"><a class="l" href="#408">408: </a><span class="php-comment"> * @return boolean True if no problem
</span></span><span id="409" class="l"><a class="l" href="#409">409: </a><span class="php-comment"> */</span>
</span><span id="410" class="l"><a class="l" href="#410">410: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_setMetadonnees" href="#_setMetadonnees">setMetadonnees</a>(<span class="php-var">$id</span>, <span class="php-var">$metadonnees</span>, <span class="php-var">$sauvegarde</span> = <span class="php-keyword1">true</span>) {
</span><span id="411" class="l"><a class="l" href="#411">411: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(<span class="php-var">$this</span>-&gt;metadonnees) &gt;= <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'metadonnees_max_taille'</span>]) {
</span><span id="412" class="l"><a class="l" href="#412">412: </a> <span class="php-var">$n</span> = (int) (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'metadonnees_max_taille'</span>] / <span class="php-num">10</span>);
</span><span id="413" class="l"><a class="l" href="#413">413: </a> <span class="php-var">$this</span>-&gt;metadonnees = <span class="php-keyword2">array_slice</span>(<span class="php-var">$this</span>-&gt;metadonnees, <span class="php-var">$n</span>);
</span><span id="414" class="l"><a class="l" href="#414">414: </a> }
</span><span id="415" class="l"><a class="l" href="#415">415: </a>
</span><span id="416" class="l"><a class="l" href="#416">416: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="417" class="l"><a class="l" href="#417">417: </a> <span class="php-keyword1">if</span> (<span class="php-var">$sauvegarde</span>) {
</span><span id="418" class="l"><a class="l" href="#418">418: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;sauverMetadonnees(<span class="php-var">$id</span>, <span class="php-var">$metadonnees</span>);
</span><span id="419" class="l"><a class="l" href="#419">419: </a> }
</span><span id="420" class="l"><a class="l" href="#420">420: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span> == <span class="php-keyword1">true</span>) {
</span><span id="421" class="l"><a class="l" href="#421">421: </a> <span class="php-var">$this</span>-&gt;metadonnees[<span class="php-var">$id</span>] = <span class="php-var">$metadonnees</span>;
</span><span id="422" class="l"><a class="l" href="#422">422: </a> }
</span><span id="423" class="l"><a class="l" href="#423">423: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="424" class="l"><a class="l" href="#424">424: </a> }
</span><span id="425" class="l"><a class="l" href="#425">425: </a>
</span><span id="426" class="l"><a class="l" href="#426">426: </a> <span class="php-comment">/**
</span></span><span id="427" class="l"><a class="l" href="#427">427: </a><span class="php-comment"> * Drop a metadata record
</span></span><span id="428" class="l"><a class="l" href="#428">428: </a><span class="php-comment"> *
</span></span><span id="429" class="l"><a class="l" href="#429">429: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="430" class="l"><a class="l" href="#430">430: </a><span class="php-comment"> * @return boolean True if no problem
</span></span><span id="431" class="l"><a class="l" href="#431">431: </a><span class="php-comment"> */</span>
</span><span id="432" class="l"><a class="l" href="#432">432: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_supprimerMetadonnees" href="#_supprimerMetadonnees">supprimerMetadonnees</a>(<span class="php-var">$id</span>) {
</span><span id="433" class="l"><a class="l" href="#433">433: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;metadonnees[<span class="php-var">$id</span>])) {
</span><span id="434" class="l"><a class="l" href="#434">434: </a> <span class="php-keyword1">unset</span>(<span class="php-var">$this</span>-&gt;metadonnees[<span class="php-var">$id</span>]);
</span><span id="435" class="l"><a class="l" href="#435">435: </a> }
</span><span id="436" class="l"><a class="l" href="#436">436: </a> <span class="php-var">$fichier_meta</span> = <span class="php-var">$this</span>-&gt;getNomFichierMeta(<span class="php-var">$id</span>);
</span><span id="437" class="l"><a class="l" href="#437">437: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;supprimerFichier(<span class="php-var">$fichier_meta</span>);
</span><span id="438" class="l"><a class="l" href="#438">438: </a> }
</span><span id="439" class="l"><a class="l" href="#439">439: </a>
</span><span id="440" class="l"><a class="l" href="#440">440: </a> <span class="php-comment">/**
</span></span><span id="441" class="l"><a class="l" href="#441">441: </a><span class="php-comment"> * Clear the metadatas array
</span></span><span id="442" class="l"><a class="l" href="#442">442: </a><span class="php-comment"> *
</span></span><span id="443" class="l"><a class="l" href="#443">443: </a><span class="php-comment"> * @return void
</span></span><span id="444" class="l"><a class="l" href="#444">444: </a><span class="php-comment"> */</span>
</span><span id="445" class="l"><a class="l" href="#445">445: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_nettoyerMetadonnees" href="#_nettoyerMetadonnees">nettoyerMetadonnees</a>() {
</span><span id="446" class="l"><a class="l" href="#446">446: </a> <span class="php-var">$this</span>-&gt;metadonnees = <span class="php-keyword1">array</span>();
</span><span id="447" class="l"><a class="l" href="#447">447: </a> }
</span><span id="448" class="l"><a class="l" href="#448">448: </a>
</span><span id="449" class="l"><a class="l" href="#449">449: </a> <span class="php-comment">/**
</span></span><span id="450" class="l"><a class="l" href="#450">450: </a><span class="php-comment"> * Load metadatas from disk
</span></span><span id="451" class="l"><a class="l" href="#451">451: </a><span class="php-comment"> *
</span></span><span id="452" class="l"><a class="l" href="#452">452: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="453" class="l"><a class="l" href="#453">453: </a><span class="php-comment"> * @return array|false Metadatas associative array
</span></span><span id="454" class="l"><a class="l" href="#454">454: </a><span class="php-comment"> */</span>
</span><span id="455" class="l"><a class="l" href="#455">455: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_chargerMetadonnees" href="#_chargerMetadonnees">chargerMetadonnees</a>(<span class="php-var">$id</span>) {
</span><span id="456" class="l"><a class="l" href="#456">456: </a> <span class="php-var">$fichier</span> = <span class="php-var">$this</span>-&gt;getNomFichierMeta(<span class="php-var">$id</span>);
</span><span id="457" class="l"><a class="l" href="#457">457: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;getContenuFichier(<span class="php-var">$fichier</span>)) {
</span><span id="458" class="l"><a class="l" href="#458">458: </a> <span class="php-var">$resultat</span> = @<span class="php-keyword2">unserialize</span>(<span class="php-var">$resultat</span>);
</span><span id="459" class="l"><a class="l" href="#459">459: </a> }
</span><span id="460" class="l"><a class="l" href="#460">460: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="461" class="l"><a class="l" href="#461">461: </a> }
</span><span id="462" class="l"><a class="l" href="#462">462: </a>
</span><span id="463" class="l"><a class="l" href="#463">463: </a> <span class="php-comment">/**
</span></span><span id="464" class="l"><a class="l" href="#464">464: </a><span class="php-comment"> * Save metadatas to disk
</span></span><span id="465" class="l"><a class="l" href="#465">465: </a><span class="php-comment"> *
</span></span><span id="466" class="l"><a class="l" href="#466">466: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="467" class="l"><a class="l" href="#467">467: </a><span class="php-comment"> * @param array $metadatas Associative array
</span></span><span id="468" class="l"><a class="l" href="#468">468: </a><span class="php-comment"> * @return boolean True if no problem
</span></span><span id="469" class="l"><a class="l" href="#469">469: </a><span class="php-comment"> */</span>
</span><span id="470" class="l"><a class="l" href="#470">470: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_sauverMetadonnees" href="#_sauverMetadonnees">sauverMetadonnees</a>(<span class="php-var">$id</span>, <span class="php-var">$metadonnees</span>) {
</span><span id="471" class="l"><a class="l" href="#471">471: </a> <span class="php-var">$fichier</span> = <span class="php-var">$this</span>-&gt;getNomFichierMeta(<span class="php-var">$id</span>);
</span><span id="472" class="l"><a class="l" href="#472">472: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;setContenuFichier(<span class="php-var">$fichier</span>, <span class="php-keyword2">serialize</span>(<span class="php-var">$metadonnees</span>));
</span><span id="473" class="l"><a class="l" href="#473">473: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="474" class="l"><a class="l" href="#474">474: </a> }
</span><span id="475" class="l"><a class="l" href="#475">475: </a>
</span><span id="476" class="l"><a class="l" href="#476">476: </a> <span class="php-comment">/**
</span></span><span id="477" class="l"><a class="l" href="#477">477: </a><span class="php-comment"> * Make and return a file name (with path) for metadatas
</span></span><span id="478" class="l"><a class="l" href="#478">478: </a><span class="php-comment"> *
</span></span><span id="479" class="l"><a class="l" href="#479">479: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="480" class="l"><a class="l" href="#480">480: </a><span class="php-comment"> * @return string Metadatas file name (with path)
</span></span><span id="481" class="l"><a class="l" href="#481">481: </a><span class="php-comment"> */</span>
</span><span id="482" class="l"><a class="l" href="#482">482: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getNomFichierMeta" href="#_getNomFichierMeta">getNomFichierMeta</a>(<span class="php-var">$id</span>) {
</span><span id="483" class="l"><a class="l" href="#483">483: </a> <span class="php-var">$chemin</span> = <span class="php-var">$this</span>-&gt;getChemin(<span class="php-var">$id</span>);
</span><span id="484" class="l"><a class="l" href="#484">484: </a> <span class="php-var">$fichier_nom</span> = <span class="php-var">$this</span>-&gt;transformaterIdEnNomFichier(<span class="php-quote">'interne-meta---'</span>.<span class="php-var">$id</span>);
</span><span id="485" class="l"><a class="l" href="#485">485: </a> <span class="php-keyword1">return</span> <span class="php-var">$chemin</span>.<span class="php-var">$fichier_nom</span>;
</span><span id="486" class="l"><a class="l" href="#486">486: </a> }
</span><span id="487" class="l"><a class="l" href="#487">487: </a>
</span><span id="488" class="l"><a class="l" href="#488">488: </a> <span class="php-comment">/**
</span></span><span id="489" class="l"><a class="l" href="#489">489: </a><span class="php-comment"> * Check if the given filename is a metadatas one
</span></span><span id="490" class="l"><a class="l" href="#490">490: </a><span class="php-comment"> *
</span></span><span id="491" class="l"><a class="l" href="#491">491: </a><span class="php-comment"> * @param string $fileName File name
</span></span><span id="492" class="l"><a class="l" href="#492">492: </a><span class="php-comment"> * @return boolean True if it's a metadatas one
</span></span><span id="493" class="l"><a class="l" href="#493">493: </a><span class="php-comment"> */</span>
</span><span id="494" class="l"><a class="l" href="#494">494: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_etreFichierMeta" href="#_etreFichierMeta">etreFichierMeta</a>(<span class="php-var">$fichier_nom</span>) {
</span><span id="495" class="l"><a class="l" href="#495">495: </a> <span class="php-var">$id</span> = <span class="php-var">$this</span>-&gt;transformerNomFichierEnId(<span class="php-var">$fichier_nom</span>);
</span><span id="496" class="l"><a class="l" href="#496">496: </a> <span class="php-keyword1">return</span> (<span class="php-keyword2">substr</span>(<span class="php-var">$id</span>, <span class="php-num">0</span>, <span class="php-num">21</span>) == <span class="php-quote">'interne-meta---'</span>) ? <span class="php-keyword1">true</span> : <span class="php-keyword1">false</span>;
</span><span id="497" class="l"><a class="l" href="#497">497: </a> }
</span><span id="498" class="l"><a class="l" href="#498">498: </a>
</span><span id="499" class="l"><a class="l" href="#499">499: </a> <span class="php-comment">/**
</span></span><span id="500" class="l"><a class="l" href="#500">500: </a><span class="php-comment"> * Remove a file
</span></span><span id="501" class="l"><a class="l" href="#501">501: </a><span class="php-comment"> *
</span></span><span id="502" class="l"><a class="l" href="#502">502: </a><span class="php-comment"> * If we can't remove the file (because of locks or any problem), we will touch
</span></span><span id="503" class="l"><a class="l" href="#503">503: </a><span class="php-comment"> * the file to invalidate it
</span></span><span id="504" class="l"><a class="l" href="#504">504: </a><span class="php-comment"> *
</span></span><span id="505" class="l"><a class="l" href="#505">505: </a><span class="php-comment"> * @param string $file Complete file path
</span></span><span id="506" class="l"><a class="l" href="#506">506: </a><span class="php-comment"> * @return boolean True if ok
</span></span><span id="507" class="l"><a class="l" href="#507">507: </a><span class="php-comment"> */</span>
</span><span id="508" class="l"><a class="l" href="#508">508: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_supprimerFichier" href="#_supprimerFichier">supprimerFichier</a>(<span class="php-var">$fichier</span>) {
</span><span id="509" class="l"><a class="l" href="#509">509: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">false</span>;
</span><span id="510" class="l"><a class="l" href="#510">510: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_file</span>(<span class="php-var">$fichier</span>)) {
</span><span id="511" class="l"><a class="l" href="#511">511: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat</span> = @<span class="php-keyword2">unlink</span>(<span class="php-var">$fichier</span>)) {
</span><span id="512" class="l"><a class="l" href="#512">512: </a> <span class="php-comment">// TODO : ajouter un log</span>
</span><span id="513" class="l"><a class="l" href="#513">513: </a> }
</span><span id="514" class="l"><a class="l" href="#514">514: </a> }
</span><span id="515" class="l"><a class="l" href="#515">515: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="516" class="l"><a class="l" href="#516">516: </a> }
</span><span id="517" class="l"><a class="l" href="#517">517: </a>
</span><span id="518" class="l"><a class="l" href="#518">518: </a> <span class="php-comment">/**
</span></span><span id="519" class="l"><a class="l" href="#519">519: </a><span class="php-comment"> * Clean some cache records (protected method used for recursive stuff)
</span></span><span id="520" class="l"><a class="l" href="#520">520: </a><span class="php-comment"> *
</span></span><span id="521" class="l"><a class="l" href="#521">521: </a><span class="php-comment"> * Available modes are :
</span></span><span id="522" class="l"><a class="l" href="#522">522: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_ALL (default) =&gt; remove all cache entries ($tags is not used)
</span></span><span id="523" class="l"><a class="l" href="#523">523: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_OLD =&gt; remove too old cache entries ($tags is not used)
</span></span><span id="524" class="l"><a class="l" href="#524">524: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_MATCHING_TAG =&gt; remove cache entries matching all given tags
</span></span><span id="525" class="l"><a class="l" href="#525">525: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="526" class="l"><a class="l" href="#526">526: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG =&gt; remove cache entries not {matching one of the given tags}
</span></span><span id="527" class="l"><a class="l" href="#527">527: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="528" class="l"><a class="l" href="#528">528: </a><span class="php-comment"> * Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG =&gt; remove cache entries matching any given tags
</span></span><span id="529" class="l"><a class="l" href="#529">529: </a><span class="php-comment"> * ($tags can be an array of strings or a single string)
</span></span><span id="530" class="l"><a class="l" href="#530">530: </a><span class="php-comment"> *
</span></span><span id="531" class="l"><a class="l" href="#531">531: </a><span class="php-comment"> * @param string $dir Directory to clean
</span></span><span id="532" class="l"><a class="l" href="#532">532: </a><span class="php-comment"> * @param string $mode Clean mode
</span></span><span id="533" class="l"><a class="l" href="#533">533: </a><span class="php-comment"> * @param array $tags Array of tags
</span></span><span id="534" class="l"><a class="l" href="#534">534: </a><span class="php-comment"> * @throws Zend_Cache_Exception
</span></span><span id="535" class="l"><a class="l" href="#535">535: </a><span class="php-comment"> * @return boolean True if no problem
</span></span><span id="536" class="l"><a class="l" href="#536">536: </a><span class="php-comment"> */</span>
</span><span id="537" class="l"><a class="l" href="#537">537: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_nettoyerFichiers" href="#_nettoyerFichiers">nettoyerFichiers</a>(<span class="php-var">$dossier</span>, <span class="php-var">$mode</span> = Cache::NETTOYAGE_MODE_TOUS, <span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="538" class="l"><a class="l" href="#538">538: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_dir</span>(<span class="php-var">$dossier</span>)) {
</span><span id="539" class="l"><a class="l" href="#539">539: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="540" class="l"><a class="l" href="#540">540: </a> }
</span><span id="541" class="l"><a class="l" href="#541">541: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="542" class="l"><a class="l" href="#542">542: </a> <span class="php-var">$prefixe</span> = <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'fichier_prefixe'</span>];
</span><span id="543" class="l"><a class="l" href="#543">543: </a> <span class="php-var">$glob</span> = @<span class="php-keyword2">glob</span>(<span class="php-var">$dossier</span>.<span class="php-var">$prefixe</span>.<span class="php-quote">'--*'</span>);
</span><span id="544" class="l"><a class="l" href="#544">544: </a> <span class="php-keyword1">if</span> (<span class="php-var">$glob</span> === <span class="php-keyword1">false</span>) {
</span><span id="545" class="l"><a class="l" href="#545">545: </a> <span class="php-comment">// On some systems it is impossible to distinguish between empty match and an error.</span>
</span><span id="546" class="l"><a class="l" href="#546">546: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">true</span>;
</span><span id="547" class="l"><a class="l" href="#547">547: </a> }
</span><span id="548" class="l"><a class="l" href="#548">548: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$glob</span> <span class="php-keyword1">as</span> <span class="php-var">$fichier</span>) {
</span><span id="549" class="l"><a class="l" href="#549">549: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_file</span>(<span class="php-var">$fichier</span>)) {
</span><span id="550" class="l"><a class="l" href="#550">550: </a> <span class="php-var">$fichier_nom</span> = <span class="php-keyword2">basename</span>(<span class="php-var">$fichier</span>);
</span><span id="551" class="l"><a class="l" href="#551">551: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;etreFichierMeta(<span class="php-var">$fichier_nom</span>)) {
</span><span id="552" class="l"><a class="l" href="#552">552: </a> <span class="php-comment">// Pour le mode Cache::NETTOYAGE_MODE_TOUS, nous essayons de tous supprimer même les vieux fichiers méta</span>
</span><span id="553" class="l"><a class="l" href="#553">553: </a> <span class="php-keyword1">if</span> (<span class="php-var">$mode</span> != Cache::NETTOYAGE_MODE_TOUS) {
</span><span id="554" class="l"><a class="l" href="#554">554: </a> <span class="php-keyword1">continue</span>;
</span><span id="555" class="l"><a class="l" href="#555">555: </a> }
</span><span id="556" class="l"><a class="l" href="#556">556: </a> }
</span><span id="557" class="l"><a class="l" href="#557">557: </a> <span class="php-var">$id</span> = <span class="php-var">$this</span>-&gt;transformerNomFichierEnId(<span class="php-var">$fichier_nom</span>);
</span><span id="558" class="l"><a class="l" href="#558">558: </a> <span class="php-var">$metadonnees</span> = <span class="php-var">$this</span>-&gt;getMetadonneesFichier(<span class="php-var">$id</span>);
</span><span id="559" class="l"><a class="l" href="#559">559: </a> <span class="php-keyword1">if</span> (<span class="php-var">$metadonnees</span> === <span class="php-keyword1">FALSE</span>) {
</span><span id="560" class="l"><a class="l" href="#560">560: </a> <span class="php-var">$metadonnees</span> = <span class="php-keyword1">array</span>(<span class="php-quote">'expiration'</span> =&gt; <span class="php-num">1</span>, <span class="php-quote">'tags'</span> =&gt; <span class="php-keyword1">array</span>());
</span><span id="561" class="l"><a class="l" href="#561">561: </a> }
</span><span id="562" class="l"><a class="l" href="#562">562: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$mode</span>) {
</span><span id="563" class="l"><a class="l" href="#563">563: </a> <span class="php-keyword1">case</span> Cache::NETTOYAGE_MODE_TOUS :
</span><span id="564" class="l"><a class="l" href="#564">564: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat_suppression</span> = <span class="php-var">$this</span>-&gt;supprimer(<span class="php-var">$id</span>)) {
</span><span id="565" class="l"><a class="l" href="#565">565: </a> <span class="php-comment">// Dans ce cas seulement, nous acception qu'il y ait un problème avec la suppresssion du fichier meta</span>
</span><span id="566" class="l"><a class="l" href="#566">566: </a> <span class="php-var">$resultat_suppression</span> = <span class="php-var">$this</span>-&gt;supprimerFichier(<span class="php-var">$fichier</span>);
</span><span id="567" class="l"><a class="l" href="#567">567: </a> }
</span><span id="568" class="l"><a class="l" href="#568">568: </a> <span class="php-var">$resultat</span> = <span class="php-var">$resultat</span> &amp;&amp; <span class="php-var">$resultat_suppression</span>;
</span><span id="569" class="l"><a class="l" href="#569">569: </a> <span class="php-keyword1">break</span>;
</span><span id="570" class="l"><a class="l" href="#570">570: </a> <span class="php-keyword1">case</span> Cache::NETTOYAGE_MODE_EXPIRATION :
</span><span id="571" class="l"><a class="l" href="#571">571: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">time</span>() &gt; <span class="php-var">$metadonnees</span>[<span class="php-quote">'expiration'</span>]) {
</span><span id="572" class="l"><a class="l" href="#572">572: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;supprimer(<span class="php-var">$id</span>) &amp;&amp; <span class="php-var">$resultat</span>;
</span><span id="573" class="l"><a class="l" href="#573">573: </a> }
</span><span id="574" class="l"><a class="l" href="#574">574: </a> <span class="php-keyword1">break</span>;
</span><span id="575" class="l"><a class="l" href="#575">575: </a> <span class="php-keyword1">case</span> Cache::NETTOYAGE_MODE_AVEC_LES_TAGS :
</span><span id="576" class="l"><a class="l" href="#576">576: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">true</span>;
</span><span id="577" class="l"><a class="l" href="#577">577: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tags</span> <span class="php-keyword1">as</span> <span class="php-var">$tag</span>) {
</span><span id="578" class="l"><a class="l" href="#578">578: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">in_array</span>(<span class="php-var">$tag</span>, <span class="php-var">$metadonnees</span>[<span class="php-quote">'tags'</span>])) {
</span><span id="579" class="l"><a class="l" href="#579">579: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">false</span>;
</span><span id="580" class="l"><a class="l" href="#580">580: </a> <span class="php-keyword1">break</span>;
</span><span id="581" class="l"><a class="l" href="#581">581: </a> }
</span><span id="582" class="l"><a class="l" href="#582">582: </a> }
</span><span id="583" class="l"><a class="l" href="#583">583: </a> <span class="php-keyword1">if</span> (<span class="php-var">$correspondance</span>) {
</span><span id="584" class="l"><a class="l" href="#584">584: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;supprimer(<span class="php-var">$id</span>) &amp;&amp; <span class="php-var">$resultat</span>;
</span><span id="585" class="l"><a class="l" href="#585">585: </a> }
</span><span id="586" class="l"><a class="l" href="#586">586: </a> <span class="php-keyword1">break</span>;
</span><span id="587" class="l"><a class="l" href="#587">587: </a> <span class="php-keyword1">case</span> Cache::NETTOYAGE_MODE_SANS_LES_TAGS :
</span><span id="588" class="l"><a class="l" href="#588">588: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">false</span>;
</span><span id="589" class="l"><a class="l" href="#589">589: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tags</span> <span class="php-keyword1">as</span> <span class="php-var">$tag</span>) {
</span><span id="590" class="l"><a class="l" href="#590">590: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">in_array</span>(<span class="php-var">$tag</span>, <span class="php-var">$metadonnees</span>[<span class="php-quote">'tags'</span>])) {
</span><span id="591" class="l"><a class="l" href="#591">591: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">true</span>;
</span><span id="592" class="l"><a class="l" href="#592">592: </a> <span class="php-keyword1">break</span>;
</span><span id="593" class="l"><a class="l" href="#593">593: </a> }
</span><span id="594" class="l"><a class="l" href="#594">594: </a> }
</span><span id="595" class="l"><a class="l" href="#595">595: </a> <span class="php-keyword1">if</span> (!<span class="php-var">$correspondance</span>) {
</span><span id="596" class="l"><a class="l" href="#596">596: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;supprimer(<span class="php-var">$id</span>) &amp;&amp; <span class="php-var">$resultat</span>;
</span><span id="597" class="l"><a class="l" href="#597">597: </a> }
</span><span id="598" class="l"><a class="l" href="#598">598: </a> <span class="php-keyword1">break</span>;
</span><span id="599" class="l"><a class="l" href="#599">599: </a> <span class="php-keyword1">case</span> Cache::NETTOYAGE_MODE_AVEC_UN_TAG :
</span><span id="600" class="l"><a class="l" href="#600">600: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">false</span>;
</span><span id="601" class="l"><a class="l" href="#601">601: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tags</span> <span class="php-keyword1">as</span> <span class="php-var">$tag</span>) {
</span><span id="602" class="l"><a class="l" href="#602">602: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">in_array</span>(<span class="php-var">$tag</span>, <span class="php-var">$metadonnees</span>[<span class="php-quote">'tags'</span>])) {
</span><span id="603" class="l"><a class="l" href="#603">603: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">true</span>;
</span><span id="604" class="l"><a class="l" href="#604">604: </a> <span class="php-keyword1">break</span>;
</span><span id="605" class="l"><a class="l" href="#605">605: </a> }
</span><span id="606" class="l"><a class="l" href="#606">606: </a> }
</span><span id="607" class="l"><a class="l" href="#607">607: </a> <span class="php-keyword1">if</span> (<span class="php-var">$correspondance</span>) {
</span><span id="608" class="l"><a class="l" href="#608">608: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;supprimer(<span class="php-var">$id</span>) &amp;&amp; <span class="php-var">$resultat</span>;
</span><span id="609" class="l"><a class="l" href="#609">609: </a> }
</span><span id="610" class="l"><a class="l" href="#610">610: </a> <span class="php-keyword1">break</span>;
</span><span id="611" class="l"><a class="l" href="#611">611: </a> <span class="php-keyword1">default</span>:
</span><span id="612" class="l"><a class="l" href="#612">612: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Mode de nettoyage invalide pour la méthode nettoyer()&quot;</span>, E_USER_WARNING);
</span><span id="613" class="l"><a class="l" href="#613">613: </a> <span class="php-keyword1">break</span>;
</span><span id="614" class="l"><a class="l" href="#614">614: </a> }
</span><span id="615" class="l"><a class="l" href="#615">615: </a> }
</span><span id="616" class="l"><a class="l" href="#616">616: </a> <span class="php-keyword1">if</span> ((<span class="php-keyword2">is_dir</span>(<span class="php-var">$fichier</span>)) <span class="php-keyword1">and</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'dossier_niveau'</span>] &gt; <span class="php-num">0</span>)) {
</span><span id="617" class="l"><a class="l" href="#617">617: </a> <span class="php-comment">// Appel récursif</span>
</span><span id="618" class="l"><a class="l" href="#618">618: </a> <span class="php-var">$resultat</span> = <span class="php-var">$this</span>-&gt;nettoyerFichiers(<span class="php-var">$fichier</span>.DS, <span class="php-var">$mode</span>, <span class="php-var">$tags</span>) &amp;&amp; <span class="php-var">$resultat</span>;
</span><span id="619" class="l"><a class="l" href="#619">619: </a> <span class="php-keyword1">if</span> (<span class="php-var">$mode</span> == Cache::NETTOYAGE_MODE_TOUS) {
</span><span id="620" class="l"><a class="l" href="#620">620: </a> <span class="php-comment">// Si mode == Cache::NETTOYAGE_MODE_TOUS, nous essayons de supprimer la structure aussi</span>
</span><span id="621" class="l"><a class="l" href="#621">621: </a> @<span class="php-keyword2">rmdir</span>(<span class="php-var">$fichier</span>);
</span><span id="622" class="l"><a class="l" href="#622">622: </a> }
</span><span id="623" class="l"><a class="l" href="#623">623: </a> }
</span><span id="624" class="l"><a class="l" href="#624">624: </a> }
</span><span id="625" class="l"><a class="l" href="#625">625: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="626" class="l"><a class="l" href="#626">626: </a> }
</span><span id="627" class="l"><a class="l" href="#627">627: </a>
</span><span id="628" class="l"><a class="l" href="#628">628: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_analyserCache" href="#_analyserCache">analyserCache</a>(<span class="php-var">$dossier</span>, <span class="php-var">$mode</span>, <span class="php-var">$tags</span> = <span class="php-keyword1">array</span>()) {
</span><span id="629" class="l"><a class="l" href="#629">629: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_dir</span>(<span class="php-var">$dossier</span>)) {
</span><span id="630" class="l"><a class="l" href="#630">630: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="631" class="l"><a class="l" href="#631">631: </a> }
</span><span id="632" class="l"><a class="l" href="#632">632: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">array</span>();
</span><span id="633" class="l"><a class="l" href="#633">633: </a> <span class="php-var">$prefixe</span> = <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'fichier_prefixe'</span>];
</span><span id="634" class="l"><a class="l" href="#634">634: </a> <span class="php-var">$glob</span> = @<span class="php-keyword2">glob</span>(<span class="php-var">$dossier</span>.<span class="php-var">$prefixe</span>.<span class="php-quote">'--*'</span>);
</span><span id="635" class="l"><a class="l" href="#635">635: </a> <span class="php-keyword1">if</span> (<span class="php-var">$glob</span> === <span class="php-keyword1">false</span>) {
</span><span id="636" class="l"><a class="l" href="#636">636: </a> <span class="php-comment">// On some systems it is impossible to distinguish between empty match and an error.</span>
</span><span id="637" class="l"><a class="l" href="#637">637: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">array</span>();
</span><span id="638" class="l"><a class="l" href="#638">638: </a> }
</span><span id="639" class="l"><a class="l" href="#639">639: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$glob</span> <span class="php-keyword1">as</span> <span class="php-var">$fichier</span>) {
</span><span id="640" class="l"><a class="l" href="#640">640: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_file</span>(<span class="php-var">$fichier</span>)) {
</span><span id="641" class="l"><a class="l" href="#641">641: </a> <span class="php-var">$nom_fichier</span> = <span class="php-keyword2">basename</span>(<span class="php-var">$fichier</span>);
</span><span id="642" class="l"><a class="l" href="#642">642: </a> <span class="php-var">$id</span> = <span class="php-var">$this</span>-&gt;transformerNomFichierEnId(<span class="php-var">$nom_fichier</span>);
</span><span id="643" class="l"><a class="l" href="#643">643: </a> <span class="php-var">$metadonnees</span> = <span class="php-var">$this</span>-&gt;getMetadonneesFichier(<span class="php-var">$id</span>);
</span><span id="644" class="l"><a class="l" href="#644">644: </a> <span class="php-keyword1">if</span> (<span class="php-var">$metadonnees</span> === <span class="php-keyword1">FALSE</span>) {
</span><span id="645" class="l"><a class="l" href="#645">645: </a> <span class="php-keyword1">continue</span>;
</span><span id="646" class="l"><a class="l" href="#646">646: </a> }
</span><span id="647" class="l"><a class="l" href="#647">647: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">time</span>() &gt; <span class="php-var">$metadonnees</span>[<span class="php-quote">'expiration'</span>]) {
</span><span id="648" class="l"><a class="l" href="#648">648: </a> <span class="php-keyword1">continue</span>;
</span><span id="649" class="l"><a class="l" href="#649">649: </a> }
</span><span id="650" class="l"><a class="l" href="#650">650: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$mode</span>) {
</span><span id="651" class="l"><a class="l" href="#651">651: </a> <span class="php-keyword1">case</span> <span class="php-quote">'ids'</span>:
</span><span id="652" class="l"><a class="l" href="#652">652: </a> <span class="php-var">$resultat</span>[] = <span class="php-var">$id</span>;
</span><span id="653" class="l"><a class="l" href="#653">653: </a> <span class="php-keyword1">break</span>;
</span><span id="654" class="l"><a class="l" href="#654">654: </a> <span class="php-keyword1">case</span> <span class="php-quote">'tags'</span>:
</span><span id="655" class="l"><a class="l" href="#655">655: </a> <span class="php-var">$resultat</span> = <span class="php-keyword2">array_unique</span>(<span class="php-keyword2">array_merge</span>(<span class="php-var">$resultat</span>, <span class="php-var">$metadonnees</span>[<span class="php-quote">'tags'</span>]));
</span><span id="656" class="l"><a class="l" href="#656">656: </a> <span class="php-keyword1">break</span>;
</span><span id="657" class="l"><a class="l" href="#657">657: </a> <span class="php-keyword1">case</span> <span class="php-quote">'matching'</span>:
</span><span id="658" class="l"><a class="l" href="#658">658: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">true</span>;
</span><span id="659" class="l"><a class="l" href="#659">659: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tags</span> <span class="php-keyword1">as</span> <span class="php-var">$tag</span>) {
</span><span id="660" class="l"><a class="l" href="#660">660: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">in_array</span>(<span class="php-var">$tag</span>, <span class="php-var">$metadonnees</span>[<span class="php-quote">'tags'</span>])) {
</span><span id="661" class="l"><a class="l" href="#661">661: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">false</span>;
</span><span id="662" class="l"><a class="l" href="#662">662: </a> <span class="php-keyword1">break</span>;
</span><span id="663" class="l"><a class="l" href="#663">663: </a> }
</span><span id="664" class="l"><a class="l" href="#664">664: </a> }
</span><span id="665" class="l"><a class="l" href="#665">665: </a> <span class="php-keyword1">if</span> (<span class="php-var">$correspondance</span>) {
</span><span id="666" class="l"><a class="l" href="#666">666: </a> <span class="php-var">$resultat</span>[] = <span class="php-var">$id</span>;
</span><span id="667" class="l"><a class="l" href="#667">667: </a> }
</span><span id="668" class="l"><a class="l" href="#668">668: </a> <span class="php-keyword1">break</span>;
</span><span id="669" class="l"><a class="l" href="#669">669: </a> <span class="php-keyword1">case</span> <span class="php-quote">'notMatching'</span>:
</span><span id="670" class="l"><a class="l" href="#670">670: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">false</span>;
</span><span id="671" class="l"><a class="l" href="#671">671: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tags</span> <span class="php-keyword1">as</span> <span class="php-var">$tag</span>) {
</span><span id="672" class="l"><a class="l" href="#672">672: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">in_array</span>(<span class="php-var">$tag</span>, <span class="php-var">$metadonnees</span>[<span class="php-quote">'tags'</span>])) {
</span><span id="673" class="l"><a class="l" href="#673">673: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">true</span>;
</span><span id="674" class="l"><a class="l" href="#674">674: </a> <span class="php-keyword1">break</span>;
</span><span id="675" class="l"><a class="l" href="#675">675: </a> }
</span><span id="676" class="l"><a class="l" href="#676">676: </a> }
</span><span id="677" class="l"><a class="l" href="#677">677: </a> <span class="php-keyword1">if</span> (!<span class="php-var">$correspondance</span>) {
</span><span id="678" class="l"><a class="l" href="#678">678: </a> <span class="php-var">$resultat</span>[] = <span class="php-var">$id</span>;
</span><span id="679" class="l"><a class="l" href="#679">679: </a> }
</span><span id="680" class="l"><a class="l" href="#680">680: </a> <span class="php-keyword1">break</span>;
</span><span id="681" class="l"><a class="l" href="#681">681: </a> <span class="php-keyword1">case</span> <span class="php-quote">'matchingAny'</span>:
</span><span id="682" class="l"><a class="l" href="#682">682: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">false</span>;
</span><span id="683" class="l"><a class="l" href="#683">683: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tags</span> <span class="php-keyword1">as</span> <span class="php-var">$tag</span>) {
</span><span id="684" class="l"><a class="l" href="#684">684: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">in_array</span>(<span class="php-var">$tag</span>, <span class="php-var">$metadonnees</span>[<span class="php-quote">'tags'</span>])) {
</span><span id="685" class="l"><a class="l" href="#685">685: </a> <span class="php-var">$correspondance</span> = <span class="php-keyword1">true</span>;
</span><span id="686" class="l"><a class="l" href="#686">686: </a> <span class="php-keyword1">break</span>;
</span><span id="687" class="l"><a class="l" href="#687">687: </a> }
</span><span id="688" class="l"><a class="l" href="#688">688: </a> }
</span><span id="689" class="l"><a class="l" href="#689">689: </a> <span class="php-keyword1">if</span> (<span class="php-var">$correspondance</span>) {
</span><span id="690" class="l"><a class="l" href="#690">690: </a> <span class="php-var">$resultat</span>[] = <span class="php-var">$id</span>;
</span><span id="691" class="l"><a class="l" href="#691">691: </a> }
</span><span id="692" class="l"><a class="l" href="#692">692: </a> <span class="php-keyword1">break</span>;
</span><span id="693" class="l"><a class="l" href="#693">693: </a> <span class="php-keyword1">default</span>:
</span><span id="694" class="l"><a class="l" href="#694">694: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Mode invalide pour la méthode analyserCache()&quot;</span>, E_USER_WARNING);
</span><span id="695" class="l"><a class="l" href="#695">695: </a> <span class="php-keyword1">break</span>;
</span><span id="696" class="l"><a class="l" href="#696">696: </a> }
</span><span id="697" class="l"><a class="l" href="#697">697: </a> }
</span><span id="698" class="l"><a class="l" href="#698">698: </a> <span class="php-keyword1">if</span> ((<span class="php-keyword2">is_dir</span>(<span class="php-var">$fichier</span>)) <span class="php-keyword1">and</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'dossier_niveau'</span>] &gt; <span class="php-num">0</span>)) {
</span><span id="699" class="l"><a class="l" href="#699">699: </a> <span class="php-comment">// Appel récursif</span>
</span><span id="700" class="l"><a class="l" href="#700">700: </a> <span class="php-var">$resultat_analyse_recursive</span> = <span class="php-var">$this</span>-&gt;analyserCache(<span class="php-var">$fichier</span>.DS, <span class="php-var">$mode</span>, <span class="php-var">$tags</span>);
</span><span id="701" class="l"><a class="l" href="#701">701: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resultat_analyse_recursive</span> === <span class="php-keyword1">false</span>) {
</span><span id="702" class="l"><a class="l" href="#702">702: </a> <span class="php-comment">// TODO : ajoute un log</span>
</span><span id="703" class="l"><a class="l" href="#703">703: </a> } <span class="php-keyword1">else</span> {
</span><span id="704" class="l"><a class="l" href="#704">704: </a> <span class="php-var">$resultat</span> = <span class="php-keyword2">array_unique</span>(<span class="php-keyword2">array_merge</span>(<span class="php-var">$resultat</span>, <span class="php-var">$resultat_analyse_recursive</span>));
</span><span id="705" class="l"><a class="l" href="#705">705: </a> }
</span><span id="706" class="l"><a class="l" href="#706">706: </a> }
</span><span id="707" class="l"><a class="l" href="#707">707: </a> }
</span><span id="708" class="l"><a class="l" href="#708">708: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">array_unique</span>(<span class="php-var">$resultat</span>);
</span><span id="709" class="l"><a class="l" href="#709">709: </a> }
</span><span id="710" class="l"><a class="l" href="#710">710: </a>
</span><span id="711" class="l"><a class="l" href="#711">711: </a> <span class="php-comment">/**
</span></span><span id="712" class="l"><a class="l" href="#712">712: </a><span class="php-comment"> * Make a control key with the string containing datas
</span></span><span id="713" class="l"><a class="l" href="#713">713: </a><span class="php-comment"> *
</span></span><span id="714" class="l"><a class="l" href="#714">714: </a><span class="php-comment"> * @param string $data Data
</span></span><span id="715" class="l"><a class="l" href="#715">715: </a><span class="php-comment"> * @param string $controlType Type of control 'md5', 'crc32' or 'strlen'
</span></span><span id="716" class="l"><a class="l" href="#716">716: </a><span class="php-comment"> * @throws Zend_Cache_Exception
</span></span><span id="717" class="l"><a class="l" href="#717">717: </a><span class="php-comment"> * @return string Control key
</span></span><span id="718" class="l"><a class="l" href="#718">718: </a><span class="php-comment"> */</span>
</span><span id="719" class="l"><a class="l" href="#719">719: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_genererCleSecu" href="#_genererCleSecu">genererCleSecu</a>(<span class="php-var">$donnees</span>, <span class="php-var">$type_de_controle</span>) {
</span><span id="720" class="l"><a class="l" href="#720">720: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$type_de_controle</span>) {
</span><span id="721" class="l"><a class="l" href="#721">721: </a> <span class="php-keyword1">case</span> <span class="php-quote">'md5'</span>:
</span><span id="722" class="l"><a class="l" href="#722">722: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">md5</span>(<span class="php-var">$donnees</span>);
</span><span id="723" class="l"><a class="l" href="#723">723: </a> <span class="php-keyword1">case</span> <span class="php-quote">'crc32'</span>:
</span><span id="724" class="l"><a class="l" href="#724">724: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">crc32</span>(<span class="php-var">$donnees</span>);
</span><span id="725" class="l"><a class="l" href="#725">725: </a> <span class="php-keyword1">case</span> <span class="php-quote">'strlen'</span>:
</span><span id="726" class="l"><a class="l" href="#726">726: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">strlen</span>(<span class="php-var">$donnees</span>);
</span><span id="727" class="l"><a class="l" href="#727">727: </a> <span class="php-keyword1">case</span> <span class="php-quote">'adler32'</span>:
</span><span id="728" class="l"><a class="l" href="#728">728: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">hash</span>(<span class="php-quote">'adler32'</span>, <span class="php-var">$donnees</span>);
</span><span id="729" class="l"><a class="l" href="#729">729: </a> <span class="php-keyword1">default</span>:
</span><span id="730" class="l"><a class="l" href="#730">730: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Fonction de génération de clé de sécurité introuvable : </span><span class="php-var">$type_de_controle</span><span class="php-quote">&quot;</span>, E_USER_WARNING);
</span><span id="731" class="l"><a class="l" href="#731">731: </a> }
</span><span id="732" class="l"><a class="l" href="#732">732: </a> }
</span><span id="733" class="l"><a class="l" href="#733">733: </a>
</span><span id="734" class="l"><a class="l" href="#734">734: </a> <span class="php-comment">/**
</span></span><span id="735" class="l"><a class="l" href="#735">735: </a><span class="php-comment"> * Transform a cache id into a file name and return it
</span></span><span id="736" class="l"><a class="l" href="#736">736: </a><span class="php-comment"> *
</span></span><span id="737" class="l"><a class="l" href="#737">737: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="738" class="l"><a class="l" href="#738">738: </a><span class="php-comment"> * @return string File name
</span></span><span id="739" class="l"><a class="l" href="#739">739: </a><span class="php-comment"> */</span>
</span><span id="740" class="l"><a class="l" href="#740">740: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_transformaterIdEnNomFichier" href="#_transformaterIdEnNomFichier">transformaterIdEnNomFichier</a>(<span class="php-var">$id</span>) {
</span><span id="741" class="l"><a class="l" href="#741">741: </a> <span class="php-var">$prefixe</span> = <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'fichier_prefixe'</span>];
</span><span id="742" class="l"><a class="l" href="#742">742: </a> <span class="php-var">$resultat</span> = <span class="php-var">$prefixe</span>.<span class="php-quote">'---'</span>.<span class="php-var">$id</span>;
</span><span id="743" class="l"><a class="l" href="#743">743: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="744" class="l"><a class="l" href="#744">744: </a> }
</span><span id="745" class="l"><a class="l" href="#745">745: </a>
</span><span id="746" class="l"><a class="l" href="#746">746: </a> <span class="php-comment">/**
</span></span><span id="747" class="l"><a class="l" href="#747">747: </a><span class="php-comment"> * Make and return a file name (with path)
</span></span><span id="748" class="l"><a class="l" href="#748">748: </a><span class="php-comment"> *
</span></span><span id="749" class="l"><a class="l" href="#749">749: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="750" class="l"><a class="l" href="#750">750: </a><span class="php-comment"> * @return string File name (with path)
</span></span><span id="751" class="l"><a class="l" href="#751">751: </a><span class="php-comment"> */</span>
</span><span id="752" class="l"><a class="l" href="#752">752: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getFichierNom" href="#_getFichierNom">getFichierNom</a>(<span class="php-var">$id</span>) {
</span><span id="753" class="l"><a class="l" href="#753">753: </a> <span class="php-var">$path</span> = <span class="php-var">$this</span>-&gt;getChemin(<span class="php-var">$id</span>);
</span><span id="754" class="l"><a class="l" href="#754">754: </a> <span class="php-var">$fileName</span> = <span class="php-var">$this</span>-&gt;transformaterIdEnNomFichier(<span class="php-var">$id</span>);
</span><span id="755" class="l"><a class="l" href="#755">755: </a> <span class="php-keyword1">return</span> <span class="php-var">$path</span> . <span class="php-var">$fileName</span>;
</span><span id="756" class="l"><a class="l" href="#756">756: </a> }
</span><span id="757" class="l"><a class="l" href="#757">757: </a>
</span><span id="758" class="l"><a class="l" href="#758">758: </a> <span class="php-comment">/**
</span></span><span id="759" class="l"><a class="l" href="#759">759: </a><span class="php-comment"> * Return the complete directory path of a filename (including hashedDirectoryStructure)
</span></span><span id="760" class="l"><a class="l" href="#760">760: </a><span class="php-comment"> *
</span></span><span id="761" class="l"><a class="l" href="#761">761: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="762" class="l"><a class="l" href="#762">762: </a><span class="php-comment"> * @param boolean $decoupage if true, returns array of directory parts instead of single string
</span></span><span id="763" class="l"><a class="l" href="#763">763: </a><span class="php-comment"> * @return string Complete directory path
</span></span><span id="764" class="l"><a class="l" href="#764">764: </a><span class="php-comment"> */</span>
</span><span id="765" class="l"><a class="l" href="#765">765: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getChemin" href="#_getChemin">getChemin</a>(<span class="php-var">$id</span>, <span class="php-var">$decoupage</span> = <span class="php-keyword1">false</span>) {
</span><span id="766" class="l"><a class="l" href="#766">766: </a> <span class="php-var">$morceaux</span> = <span class="php-keyword1">array</span>();
</span><span id="767" class="l"><a class="l" href="#767">767: </a> <span class="php-var">$chemin</span> = <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'stockage_chemin'</span>];
</span><span id="768" class="l"><a class="l" href="#768">768: </a> <span class="php-var">$prefixe</span> = <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'fichier_prefixe'</span>];
</span><span id="769" class="l"><a class="l" href="#769">769: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'dossier_niveau'</span>] &gt; <span class="php-num">0</span>) {
</span><span id="770" class="l"><a class="l" href="#770">770: </a> <span class="php-var">$hash</span> = <span class="php-keyword2">hash</span>(<span class="php-quote">'adler32'</span>, <span class="php-var">$id</span>);
</span><span id="771" class="l"><a class="l" href="#771">771: </a> <span class="php-keyword1">for</span> (<span class="php-var">$i</span> = <span class="php-num">0</span> ; <span class="php-var">$i</span> &lt; <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'dossier_niveau'</span>] ; <span class="php-var">$i</span>++) {
</span><span id="772" class="l"><a class="l" href="#772">772: </a> <span class="php-var">$chemin</span> .= <span class="php-var">$prefixe</span>.<span class="php-quote">'--'</span>.<span class="php-keyword2">substr</span>(<span class="php-var">$hash</span>, <span class="php-num">0</span>, <span class="php-var">$i</span> + <span class="php-num">1</span>).DS;
</span><span id="773" class="l"><a class="l" href="#773">773: </a> <span class="php-var">$morceaux</span>[] = <span class="php-var">$chemin</span>;
</span><span id="774" class="l"><a class="l" href="#774">774: </a> }
</span><span id="775" class="l"><a class="l" href="#775">775: </a> }
</span><span id="776" class="l"><a class="l" href="#776">776: </a> <span class="php-keyword1">return</span> (<span class="php-var">$decoupage</span>) ? <span class="php-var">$morceaux</span> : <span class="php-var">$chemin</span>;
</span><span id="777" class="l"><a class="l" href="#777">777: </a> }
</span><span id="778" class="l"><a class="l" href="#778">778: </a>
</span><span id="779" class="l"><a class="l" href="#779">779: </a> <span class="php-comment">/**
</span></span><span id="780" class="l"><a class="l" href="#780">780: </a><span class="php-comment"> * Make the directory strucuture for the given id
</span></span><span id="781" class="l"><a class="l" href="#781">781: </a><span class="php-comment"> *
</span></span><span id="782" class="l"><a class="l" href="#782">782: </a><span class="php-comment"> * @param string $id cache id
</span></span><span id="783" class="l"><a class="l" href="#783">783: </a><span class="php-comment"> * @return boolean true
</span></span><span id="784" class="l"><a class="l" href="#784">784: </a><span class="php-comment"> */</span>
</span><span id="785" class="l"><a class="l" href="#785">785: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_lancerMkdirEtChmodRecursif" href="#_lancerMkdirEtChmodRecursif">lancerMkdirEtChmodRecursif</a>(<span class="php-var">$id</span>) {
</span><span id="786" class="l"><a class="l" href="#786">786: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="787" class="l"><a class="l" href="#787">787: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'dossier_niveau'</span>] &gt; <span class="php-num">0</span>) {
</span><span id="788" class="l"><a class="l" href="#788">788: </a> <span class="php-var">$chemins</span> = <span class="php-var">$this</span>-&gt;getChemin(<span class="php-var">$id</span>, <span class="php-keyword1">true</span>);
</span><span id="789" class="l"><a class="l" href="#789">789: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$chemins</span> <span class="php-keyword1">as</span> <span class="php-var">$chemin</span>) {
</span><span id="790" class="l"><a class="l" href="#790">790: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_dir</span>(<span class="php-var">$chemin</span>)) {
</span><span id="791" class="l"><a class="l" href="#791">791: </a> @<span class="php-keyword2">mkdir</span>(<span class="php-var">$chemin</span>, <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'dossier_umask'</span>]);
</span><span id="792" class="l"><a class="l" href="#792">792: </a> @<span class="php-keyword2">chmod</span>(<span class="php-var">$chemin</span>, <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'dossier_umask'</span>]); <span class="php-comment">// see #ZF-320 (this line is required in some configurations)</span>
</span><span id="793" class="l"><a class="l" href="#793">793: </a> }
</span><span id="794" class="l"><a class="l" href="#794">794: </a> }
</span><span id="795" class="l"><a class="l" href="#795">795: </a> }
</span><span id="796" class="l"><a class="l" href="#796">796: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="797" class="l"><a class="l" href="#797">797: </a> }
</span><span id="798" class="l"><a class="l" href="#798">798: </a>
</span><span id="799" class="l"><a class="l" href="#799">799: </a> <span class="php-comment">/**
</span></span><span id="800" class="l"><a class="l" href="#800">800: </a><span class="php-comment"> * Test if the given cache id is available (and still valid as a cache record)
</span></span><span id="801" class="l"><a class="l" href="#801">801: </a><span class="php-comment"> *
</span></span><span id="802" class="l"><a class="l" href="#802">802: </a><span class="php-comment"> * @param string $id Cache id
</span></span><span id="803" class="l"><a class="l" href="#803">803: </a><span class="php-comment"> * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested
</span></span><span id="804" class="l"><a class="l" href="#804">804: </a><span class="php-comment"> * @return boolean|mixed false (a cache is not available) or &quot;last modified&quot; timestamp (int) of the available cache record
</span></span><span id="805" class="l"><a class="l" href="#805">805: </a><span class="php-comment"> */</span>
</span><span id="806" class="l"><a class="l" href="#806">806: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_testerExistenceCache" href="#_testerExistenceCache">testerExistenceCache</a>(<span class="php-var">$id</span>, <span class="php-var">$ne_pas_tester_validiter_du_cache</span>) {
</span><span id="807" class="l"><a class="l" href="#807">807: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">false</span>;
</span><span id="808" class="l"><a class="l" href="#808">808: </a> <span class="php-keyword1">if</span> (<span class="php-var">$metadonnees</span> = <span class="php-var">$this</span>-&gt;getMetadonnees(<span class="php-var">$id</span>)) {
</span><span id="809" class="l"><a class="l" href="#809">809: </a> <span class="php-keyword1">if</span> (<span class="php-var">$ne_pas_tester_validiter_du_cache</span> || (<span class="php-keyword2">time</span>() &lt;= <span class="php-var">$metadonnees</span>[<span class="php-quote">'expiration'</span>])) {
</span><span id="810" class="l"><a class="l" href="#810">810: </a> <span class="php-var">$resultat</span> = <span class="php-var">$metadonnees</span>[<span class="php-quote">'mtime'</span>];
</span><span id="811" class="l"><a class="l" href="#811">811: </a> }
</span><span id="812" class="l"><a class="l" href="#812">812: </a> }
</span><span id="813" class="l"><a class="l" href="#813">813: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="814" class="l"><a class="l" href="#814">814: </a> }
</span><span id="815" class="l"><a class="l" href="#815">815: </a>
</span><span id="816" class="l"><a class="l" href="#816">816: </a> <span class="php-comment">/**
</span></span><span id="817" class="l"><a class="l" href="#817">817: </a><span class="php-comment"> * Return the file content of the given file
</span></span><span id="818" class="l"><a class="l" href="#818">818: </a><span class="php-comment"> *
</span></span><span id="819" class="l"><a class="l" href="#819">819: </a><span class="php-comment"> * @param string $file File complete path
</span></span><span id="820" class="l"><a class="l" href="#820">820: </a><span class="php-comment"> * @return string File content (or false if problem)
</span></span><span id="821" class="l"><a class="l" href="#821">821: </a><span class="php-comment"> */</span>
</span><span id="822" class="l"><a class="l" href="#822">822: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getContenuFichier" href="#_getContenuFichier">getContenuFichier</a>(<span class="php-var">$fichier</span>) {
</span><span id="823" class="l"><a class="l" href="#823">823: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">false</span>;
</span><span id="824" class="l"><a class="l" href="#824">824: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_file</span>(<span class="php-var">$fichier</span>)) {
</span><span id="825" class="l"><a class="l" href="#825">825: </a> <span class="php-var">$f</span> = @<span class="php-keyword2">fopen</span>(<span class="php-var">$fichier</span>, <span class="php-quote">'rb'</span>);
</span><span id="826" class="l"><a class="l" href="#826">826: </a> <span class="php-keyword1">if</span> (<span class="php-var">$f</span>) {
</span><span id="827" class="l"><a class="l" href="#827">827: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'fichier_verrou'</span>]) @<span class="php-keyword2">flock</span>(<span class="php-var">$f</span>, LOCK_SH);
</span><span id="828" class="l"><a class="l" href="#828">828: </a> <span class="php-var">$resultat</span> = <span class="php-keyword2">stream_get_contents</span>(<span class="php-var">$f</span>);
</span><span id="829" class="l"><a class="l" href="#829">829: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'fichier_verrou'</span>]) @<span class="php-keyword2">flock</span>(<span class="php-var">$f</span>, LOCK_UN);
</span><span id="830" class="l"><a class="l" href="#830">830: </a> @<span class="php-keyword2">fclose</span>(<span class="php-var">$f</span>);
</span><span id="831" class="l"><a class="l" href="#831">831: </a> }
</span><span id="832" class="l"><a class="l" href="#832">832: </a> }
</span><span id="833" class="l"><a class="l" href="#833">833: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="834" class="l"><a class="l" href="#834">834: </a> }
</span><span id="835" class="l"><a class="l" href="#835">835: </a>
</span><span id="836" class="l"><a class="l" href="#836">836: </a> <span class="php-comment">/**
</span></span><span id="837" class="l"><a class="l" href="#837">837: </a><span class="php-comment"> * Put the given string into the given file
</span></span><span id="838" class="l"><a class="l" href="#838">838: </a><span class="php-comment"> *
</span></span><span id="839" class="l"><a class="l" href="#839">839: </a><span class="php-comment"> * @param string $file File complete path
</span></span><span id="840" class="l"><a class="l" href="#840">840: </a><span class="php-comment"> * @param string $string String to put in file
</span></span><span id="841" class="l"><a class="l" href="#841">841: </a><span class="php-comment"> * @return boolean true if no problem
</span></span><span id="842" class="l"><a class="l" href="#842">842: </a><span class="php-comment"> */</span>
</span><span id="843" class="l"><a class="l" href="#843">843: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_setContenuFichier" href="#_setContenuFichier">setContenuFichier</a>(<span class="php-var">$fichier</span>, <span class="php-var">$chaine</span>) {
</span><span id="844" class="l"><a class="l" href="#844">844: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">false</span>;
</span><span id="845" class="l"><a class="l" href="#845">845: </a> <span class="php-var">$f</span> = @<span class="php-keyword2">fopen</span>(<span class="php-var">$fichier</span>, <span class="php-quote">'ab+'</span>);
</span><span id="846" class="l"><a class="l" href="#846">846: </a> <span class="php-keyword1">if</span> (<span class="php-var">$f</span>) {
</span><span id="847" class="l"><a class="l" href="#847">847: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;options[<span class="php-quote">'fichier_verrou'</span>]) @<span class="php-keyword2">flock</span>(<span class="php-var">$f</span>, LOCK_EX);
</span><span id="848" class="l"><a class="l" href="#848">848: </a> <span class="php-keyword2">fseek</span>(<span class="php-var">$f</span>, <span class="php-num">0</span>);
</span><span id="849" class="l"><a class="l" href="#849">849: </a> <span class="php-keyword2">ftruncate</span>(<span class="php-var">$f</span>, <span class="php-num">0</span>);
</span><span id="850" class="l"><a class="l" href="#850">850: </a> <span class="php-var">$tmp</span> = @<span class="php-keyword2">fwrite</span>(<span class="php-var">$f</span>, <span class="php-var">$chaine</span>);
</span><span id="851" class="l"><a class="l" href="#851">851: </a> <span class="php-keyword1">if</span> (!(<span class="php-var">$tmp</span> === <span class="php-keyword1">FALSE</span>)) {
</span><span id="852" class="l"><a class="l" href="#852">852: </a> <span class="php-var">$resultat</span> = <span class="php-keyword1">true</span>;
</span><span id="853" class="l"><a class="l" href="#853">853: </a> }
</span><span id="854" class="l"><a class="l" href="#854">854: </a> @<span class="php-keyword2">fclose</span>(<span class="php-var">$f</span>);
</span><span id="855" class="l"><a class="l" href="#855">855: </a> }
</span><span id="856" class="l"><a class="l" href="#856">856: </a> @<span class="php-keyword2">chmod</span>(<span class="php-var">$fichier</span>, <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'fichier_umask'</span>]);
</span><span id="857" class="l"><a class="l" href="#857">857: </a> <span class="php-keyword1">return</span> <span class="php-var">$resultat</span>;
</span><span id="858" class="l"><a class="l" href="#858">858: </a> }
</span><span id="859" class="l"><a class="l" href="#859">859: </a>
</span><span id="860" class="l"><a class="l" href="#860">860: </a> <span class="php-comment">/**
</span></span><span id="861" class="l"><a class="l" href="#861">861: </a><span class="php-comment"> * Transform a file name into cache id and return it
</span></span><span id="862" class="l"><a class="l" href="#862">862: </a><span class="php-comment"> *
</span></span><span id="863" class="l"><a class="l" href="#863">863: </a><span class="php-comment"> * @param string $fileName File name
</span></span><span id="864" class="l"><a class="l" href="#864">864: </a><span class="php-comment"> * @return string Cache id
</span></span><span id="865" class="l"><a class="l" href="#865">865: </a><span class="php-comment"> */</span>
</span><span id="866" class="l"><a class="l" href="#866">866: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_transformerNomFichierEnId" href="#_transformerNomFichierEnId">transformerNomFichierEnId</a>(<span class="php-var">$nom_de_fichier</span>) {
</span><span id="867" class="l"><a class="l" href="#867">867: </a> <span class="php-var">$prefixe</span> = <span class="php-var">$this</span>-&gt;options[<span class="php-quote">'fichier_prefixe'</span>];
</span><span id="868" class="l"><a class="l" href="#868">868: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">preg_replace</span>(<span class="php-quote">'~^'</span> . <span class="php-var">$prefixe</span> . <span class="php-quote">'---(.*)$~'</span>, <span class="php-quote">'$1'</span>, <span class="php-var">$nom_de_fichier</span>);
</span><span id="869" class="l"><a class="l" href="#869">869: </a> }
</span><span id="870" class="l"><a class="l" href="#870">870: </a>}
</span><span id="871" class="l"><a class="l" href="#871">871: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-CacheFichier.html
New file
0,0 → 1,1811
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class CacheFichier | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li class="active"><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li class="active"><a href="class-CacheFichier.html">CacheFichier</a></li>
<li><a href="class-CacheSqlite.html">CacheSqlite</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-None.html" title="Summary of None"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class CacheFichier</h1>
 
 
 
 
 
 
 
 
 
 
 
<div class="info">
 
<b>Located at</b> <a href="source-class-CacheFichier.html#2-870" title="Go to source code">CacheFichier.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-CacheFichier.html#73-101" title="Go to source code">__construct</a>( <span>array <var>$options</var> = <span class="php-keyword1">array</span>()</span>, <span><code><a href="class-Cache.html">Cache</a></code> <var>$cache</var></span> )</code>
 
<div class="description short">
<p>Constructor</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constructor</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$options</var></dt>
<dd><code>array</code><br>$options associative array of options</dd>
<dt><var>$cache</var></dt>
<dd></dd>
</dl></div>
 
 
<h4>Throws</h4>
<div class="list">
<code>Zend_Cache_Exception</code><br>
</div>
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setEmplacement" id="_setEmplacement">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setEmplacement">#</a>
<code><a href="source-class-CacheFichier.html#123-132" title="Go to source code">setEmplacement</a>( <span>mixed <var>$emplacement</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="charger" id="_charger">
 
<td class="attributes"><code>
public
string|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_charger">#</a>
<code><a href="source-class-CacheFichier.html#134-159" title="Go to source code">charger</a>( <span>string <var>$id</var></span>, <span>boolean <var>$ne_pas_tester_validiter_du_cache</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Test if a cache is available for the given id and (if yes) return it (false
else)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Test if a cache is available for the given id and (if yes) return it (false
else)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
<dt><var>$ne_pas_tester_validiter_du_cache</var></dt>
<dd><code>boolean</code><br>$doNotTestCacheValidity if set to true, the cache validity won't be tested</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string|false</code><br>cached datas<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="tester" id="_tester">
 
<td class="attributes"><code>
public
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_tester">#</a>
<code><a href="source-class-CacheFichier.html#161-170" title="Go to source code">tester</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Teste si un enregistrement en cache est disponible ou pas (pour l'id passé
en paramètre).</p>
 
</div>
 
<div class="description detailed hidden">
<p>Teste si un enregistrement en cache est disponible ou pas (pour l'id passé
en paramètre).</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id identifiant de cache.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>false (le cache n'est pas disponible) ou timestamp (int) "de dernière
modification" de l'enregistrement en cache<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="sauver" id="_sauver">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_sauver">#</a>
<code><a href="source-class-CacheFichier.html#172-221" title="Go to source code">sauver</a>( <span>string <var>$donnees</var></span>, <span>string <var>$id</var></span>, <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span>, <span>integer <var>$duree_vie_specifique</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Save some string datas into a cache record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Save some string datas into a cache record</p>
 
<p>Note : $data is always "string" (serialization is done by the core not by the
backend)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$donnees</var></dt>
<dd><code>string</code><br>$data Datas to cache</dd>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags Array of strings, the cache record will be tagged by each string entry</dd>
<dt><var>$duree_vie_specifique</var></dt>
<dd><code>integer</code><br>$specificLifetime If != false, set a specific lifetime for this cache record
(null =&gt; infinite lifetime)</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimer" id="_supprimer">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimer">#</a>
<code><a href="source-class-CacheFichier.html#223-234" title="Go to source code">supprimer</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Remove a cache record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Remove a cache record</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="nettoyer" id="_nettoyer">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_nettoyer">#</a>
<code><a href="source-class-CacheFichier.html#236-257" title="Go to source code">nettoyer</a>( <span>string <var>$mode</var> = <code><a href="class-Cache.html#NETTOYAGE_MODE_TOUS">Cache::<b>NETTOYAGE_MODE_TOUS</b></a></code></span>, <span>tags <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Clean some cache records</p>
 
</div>
 
<div class="description detailed hidden">
<p>Clean some cache records</p>
 
<p>Available modes are : 'all' (default) =&gt; remove all cache entries ($tags
is not used) 'old' =&gt; remove too old cache entries ($tags is not used)
'matchingTag' =&gt; remove cache entries matching all given tags ($tags can be
an array of strings or a single string) 'notMatchingTag' =&gt; remove cache
entries not matching one of the given tags ($tags can be an array of strings or
a single string) 'matchingAnyTag' =&gt; remove cache entries matching any given
tags ($tags can be an array of strings or a single string)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$mode</var></dt>
<dd><code>string</code><br>$mode clean mode</dd>
<dt><var>$tags</var></dt>
<dd><code>tags</code><br>array $tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIds" id="_getIds">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIds">#</a>
<code><a href="source-class-CacheFichier.html#259-266" title="Go to source code">getIds</a>( )</code>
 
<div class="description short">
<p>Return an array of stored cache ids</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of stored cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getTags" id="_getTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getTags">#</a>
<code><a href="source-class-CacheFichier.html#268-275" title="Go to source code">getTags</a>( )</code>
 
<div class="description short">
<p>Return an array of stored tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored tags</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of stored tags (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsAvecLesTags" id="_getIdsAvecLesTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsAvecLesTags">#</a>
<code><a href="source-class-CacheFichier.html#277-287" title="Go to source code">getIdsAvecLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which match given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which match given tags</p>
 
<p>In case of multiple tags, a logical AND is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of matching cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsSansLesTags" id="_getIdsSansLesTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsSansLesTags">#</a>
<code><a href="source-class-CacheFichier.html#289-299" title="Go to source code">getIdsSansLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which don't match given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which don't match given tags</p>
 
<p>In case of multiple tags, a logical OR is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of not matching cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsAvecUnTag" id="_getIdsAvecUnTag">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsAvecUnTag">#</a>
<code><a href="source-class-CacheFichier.html#301-311" title="Go to source code">getIdsAvecUnTag</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which match any given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which match any given tags</p>
 
<p>In case of multiple tags, a logical AND is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of any matching cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getPourcentageRemplissage" id="_getPourcentageRemplissage">
 
<td class="attributes"><code>
public
integer
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getPourcentageRemplissage">#</a>
<code><a href="source-class-CacheFichier.html#313-330" title="Go to source code">getPourcentageRemplissage</a>( )</code>
 
<div class="description short">
<p>Return the filling percentage of the backend storage</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return the filling percentage of the backend storage</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>integer</code><br>integer between 0 and 100<br>
</div>
 
<h4>Throws</h4>
<div class="list">
<code>Zend_Cache_Exception</code><br>
</div>
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getMetadonnees" id="_getMetadonnees">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#332-357" title="Go to source code">getMetadonnees</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Return an array of metadatas for the given cache id</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of metadatas for the given cache id</p>
 
<p>The array must include these keys :</p>
 
<ul>
<li>expire : the expire timestamp</li>
 
<li>tags : a string array of tags</li>
 
<li>mtime : timestamp of last modification time</li>
</ul>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of metadatas (false if the cache id is not found)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="ajouterSupplementDureeDeVie" id="_ajouterSupplementDureeDeVie">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_ajouterSupplementDureeDeVie">#</a>
<code><a href="source-class-CacheFichier.html#359-382" title="Go to source code">ajouterSupplementDureeDeVie</a>( <span>string <var>$id</var></span>, <span>integer <var>$supplement_duree_de_vie</var></span> )</code>
 
<div class="description short">
<p>Give (if possible) an extra lifetime to the given cache id</p>
 
</div>
 
<div class="description detailed hidden">
<p>Give (if possible) an extra lifetime to the given cache id</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
<dt><var>$supplement_duree_de_vie</var></dt>
<dd><code>integer</code><br>$extraLifetime</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if ok<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getMetadonneesFichier" id="_getMetadonneesFichier">
 
<td class="attributes"><code>
protected
array|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getMetadonneesFichier">#</a>
<code><a href="source-class-CacheFichier.html#384-400" title="Go to source code">getMetadonneesFichier</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Get a metadatas record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Get a metadatas record</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array|false</code><br>Associative array of metadatas<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setMetadonnees" id="_setMetadonnees">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#402-424" title="Go to source code">setMetadonnees</a>( <span>string <var>$id</var></span>, <span>array <var>$metadonnees</var></span>, <span>boolean <var>$sauvegarde</var> = <span class="php-keyword1">true</span></span> )</code>
 
<div class="description short">
<p>Set a metadatas record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Set a metadatas record</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$metadonnees</var></dt>
<dd><code>array</code><br>$metadatas Associative array of metadatas</dd>
<dt><var>$sauvegarde</var></dt>
<dd><code>boolean</code><br>$save optional pass false to disable saving to file</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimerMetadonnees" id="_supprimerMetadonnees">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimerMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#426-438" title="Go to source code">supprimerMetadonnees</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Drop a metadata record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Drop a metadata record</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="nettoyerMetadonnees" id="_nettoyerMetadonnees">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_nettoyerMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#440-447" title="Go to source code">nettoyerMetadonnees</a>( )</code>
 
<div class="description short">
<p>Clear the metadatas array</p>
 
</div>
 
<div class="description detailed hidden">
<p>Clear the metadatas array</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="chargerMetadonnees" id="_chargerMetadonnees">
 
<td class="attributes"><code>
protected
array|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_chargerMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#449-461" title="Go to source code">chargerMetadonnees</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Load metadatas from disk</p>
 
</div>
 
<div class="description detailed hidden">
<p>Load metadatas from disk</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array|false</code><br>Metadatas associative array<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="sauverMetadonnees" id="_sauverMetadonnees">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_sauverMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#463-474" title="Go to source code">sauverMetadonnees</a>( <span>string <var>$id</var></span>, <span>array <var>$metadonnees</var></span> )</code>
 
<div class="description short">
<p>Save metadatas to disk</p>
 
</div>
 
<div class="description detailed hidden">
<p>Save metadatas to disk</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$metadonnees</var></dt>
<dd><code>array</code><br>$metadatas Associative array</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getNomFichierMeta" id="_getNomFichierMeta">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getNomFichierMeta">#</a>
<code><a href="source-class-CacheFichier.html#476-486" title="Go to source code">getNomFichierMeta</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Make and return a file name (with path) for metadatas</p>
 
</div>
 
<div class="description detailed hidden">
<p>Make and return a file name (with path) for metadatas</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>Metadatas file name (with path)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="etreFichierMeta" id="_etreFichierMeta">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_etreFichierMeta">#</a>
<code><a href="source-class-CacheFichier.html#488-497" title="Go to source code">etreFichierMeta</a>( <span>string <var>$fichier_nom</var></span> )</code>
 
<div class="description short">
<p>Check if the given filename is a metadatas one</p>
 
</div>
 
<div class="description detailed hidden">
<p>Check if the given filename is a metadatas one</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier_nom</var></dt>
<dd><code>string</code><br>$fileName File name</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if it's a metadatas one<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimerFichier" id="_supprimerFichier">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimerFichier">#</a>
<code><a href="source-class-CacheFichier.html#499-516" title="Go to source code">supprimerFichier</a>( <span>string <var>$fichier</var></span> )</code>
 
<div class="description short">
<p>Remove a file</p>
 
</div>
 
<div class="description detailed hidden">
<p>Remove a file</p>
 
<p>If we can't remove the file (because of locks or any problem), we will touch
the file to invalidate it</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier</var></dt>
<dd><code>string</code><br>$file Complete file path</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if ok<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="nettoyerFichiers" id="_nettoyerFichiers">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_nettoyerFichiers">#</a>
<code><a href="source-class-CacheFichier.html#518-626" title="Go to source code">nettoyerFichiers</a>( <span>string <var>$dossier</var></span>, <span>string <var>$mode</var> = <code><a href="class-Cache.html#NETTOYAGE_MODE_TOUS">Cache::<b>NETTOYAGE_MODE_TOUS</b></a></code></span>, <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Clean some cache records (protected method used for recursive stuff)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Clean some cache records (protected method used for recursive stuff)</p>
 
<p>Available modes are : Zend_Cache::CLEANING_MODE_ALL (default) =&gt; remove
all cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_OLD =&gt; remove
too old cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_MATCHING_TAG
=&gt; remove cache entries matching all given tags ($tags can be an array of
strings or a single string) Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG =&gt;
remove cache entries not {matching one of the given tags} ($tags can be an array
of strings or a single string) Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG =&gt;
remove cache entries matching any given tags ($tags can be an array of strings
or a single string)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$dossier</var></dt>
<dd><code>string</code><br>$dir Directory to clean</dd>
<dt><var>$mode</var></dt>
<dd><code>string</code><br>$mode Clean mode</dd>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags Array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if no problem<br>
</div>
 
<h4>Throws</h4>
<div class="list">
<code>Zend_Cache_Exception</code><br>
</div>
 
 
 
</div>
</div></td>
</tr>
<tr data-order="analyserCache" id="_analyserCache">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_analyserCache">#</a>
<code><a href="source-class-CacheFichier.html#628-709" title="Go to source code">analyserCache</a>( <span>mixed <var>$dossier</var></span>, <span>mixed <var>$mode</var></span>, <span>mixed <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="genererCleSecu" id="_genererCleSecu">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_genererCleSecu">#</a>
<code><a href="source-class-CacheFichier.html#711-732" title="Go to source code">genererCleSecu</a>( <span>string <var>$donnees</var></span>, <span>string <var>$type_de_controle</var></span> )</code>
 
<div class="description short">
<p>Make a control key with the string containing datas</p>
 
</div>
 
<div class="description detailed hidden">
<p>Make a control key with the string containing datas</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$donnees</var></dt>
<dd><code>string</code><br>$data Data</dd>
<dt><var>$type_de_controle</var></dt>
<dd><code>string</code><br>$controlType Type of control 'md5', 'crc32' or 'strlen'</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>Control key<br>
</div>
 
<h4>Throws</h4>
<div class="list">
<code>Zend_Cache_Exception</code><br>
</div>
 
 
 
</div>
</div></td>
</tr>
<tr data-order="transformaterIdEnNomFichier" id="_transformaterIdEnNomFichier">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_transformaterIdEnNomFichier">#</a>
<code><a href="source-class-CacheFichier.html#734-744" title="Go to source code">transformaterIdEnNomFichier</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Transform a cache id into a file name and return it</p>
 
</div>
 
<div class="description detailed hidden">
<p>Transform a cache id into a file name and return it</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>File name<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getFichierNom" id="_getFichierNom">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getFichierNom">#</a>
<code><a href="source-class-CacheFichier.html#746-756" title="Go to source code">getFichierNom</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Make and return a file name (with path)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Make and return a file name (with path)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>File name (with path)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getChemin" id="_getChemin">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getChemin">#</a>
<code><a href="source-class-CacheFichier.html#758-777" title="Go to source code">getChemin</a>( <span>string <var>$id</var></span>, <span>boolean <var>$decoupage</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Return the complete directory path of a filename (including
hashedDirectoryStructure)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return the complete directory path of a filename (including
hashedDirectoryStructure)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$decoupage</var></dt>
<dd><code>boolean</code><br>$decoupage if true, returns array of directory parts instead of single string</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>Complete directory path<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="lancerMkdirEtChmodRecursif" id="_lancerMkdirEtChmodRecursif">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_lancerMkdirEtChmodRecursif">#</a>
<code><a href="source-class-CacheFichier.html#779-797" title="Go to source code">lancerMkdirEtChmodRecursif</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Make the directory strucuture for the given id</p>
 
</div>
 
<div class="description detailed hidden">
<p>Make the directory strucuture for the given id</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="testerExistenceCache" id="_testerExistenceCache">
 
<td class="attributes"><code>
protected
boolean|mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_testerExistenceCache">#</a>
<code><a href="source-class-CacheFichier.html#799-814" title="Go to source code">testerExistenceCache</a>( <span>string <var>$id</var></span>, <span>boolean <var>$ne_pas_tester_validiter_du_cache</var></span> )</code>
 
<div class="description short">
<p>Test if the given cache id is available (and still valid as a cache
record)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Test if the given cache id is available (and still valid as a cache
record)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$ne_pas_tester_validiter_du_cache</var></dt>
<dd><code>boolean</code><br>$doNotTestCacheValidity If set to true, the cache validity won't be tested</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean|mixed</code><br>false (a cache is not available) or "last modified" timestamp (int) of the
available cache record<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getContenuFichier" id="_getContenuFichier">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getContenuFichier">#</a>
<code><a href="source-class-CacheFichier.html#816-834" title="Go to source code">getContenuFichier</a>( <span>string <var>$fichier</var></span> )</code>
 
<div class="description short">
<p>Return the file content of the given file</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return the file content of the given file</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier</var></dt>
<dd><code>string</code><br>$file File complete path</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>File content (or false if problem)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setContenuFichier" id="_setContenuFichier">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setContenuFichier">#</a>
<code><a href="source-class-CacheFichier.html#836-858" title="Go to source code">setContenuFichier</a>( <span>string <var>$fichier</var></span>, <span>string <var>$chaine</var></span> )</code>
 
<div class="description short">
<p>Put the given string into the given file</p>
 
</div>
 
<div class="description detailed hidden">
<p>Put the given string into the given file</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier</var></dt>
<dd><code>string</code><br>$file File complete path</dd>
<dt><var>$chaine</var></dt>
<dd><code>string</code><br>$string String to put in file</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="transformerNomFichierEnId" id="_transformerNomFichierEnId">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_transformerNomFichierEnId">#</a>
<code><a href="source-class-CacheFichier.html#860-869" title="Go to source code">transformerNomFichierEnId</a>( <span>string <var>$nom_de_fichier</var></span> )</code>
 
<div class="description short">
<p>Transform a file name into cache id and return it</p>
 
</div>
 
<div class="description detailed hidden">
<p>Transform a file name into cache id and return it</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$nom_de_fichier</var></dt>
<dd><code>string</code><br>$fileName File name</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>Cache id<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="options" id="$options">
<td class="attributes"><code>
protected
array
</code></td>
 
<td class="name">
<a href="source-class-CacheFichier.html#3-62" title="Go to source code"><var>$options</var></a>
</td>
<td class="value"><code><span class="php-keyword1">array</span>(
<span class="php-quote">'stockage_chemin'</span> =&gt; <span class="php-keyword1">null</span>,
<span class="php-quote">'fichier_verrou'</span> =&gt; <span class="php-keyword1">true</span>,
<span class="php-quote">'controle_lecture'</span> =&gt; <span class="php-keyword1">true</span>,
<span class="php-quote">'controle_lecture_type'</span> =&gt; <span class="php-quote">'crc32'</span>,
<span class="php-quote">'dossier_niveau'</span> =&gt; <span class="php-num">0</span>,
<span class="php-quote">'dossier_umask'</span> =&gt; <span class="php-num">0700</span>,
<span class="php-quote">'fichier_prefixe'</span> =&gt; <span class="php-quote">'tbf'</span>,
<span class="php-quote">'fichier_umask'</span> =&gt; <span class="php-num">0600</span>,
<span class="php-quote">'metadonnees_max_taille'</span> =&gt; <span class="php-num">100</span>
)</code></td>
<td class="description"><div>
<a href="#$options" class="anchor">#</a>
 
<div class="description short">
<p>Options disponibles</p>
 
</div>
 
<div class="description detailed hidden">
<p>Options disponibles</p>
 
<h2>&gt; (string) stockage_chemin :</h2>
 
<p>Chemin vers le dossier devant contenir l'arborescence du cache.</p>
 
<h1>&gt; (boolean) fichier_verrou :</h1>
 
<ul>
<li>Active / Désactive le verrouillage des fichiers</li>
 
<li>Peut éviter la corruption du cache dans de mauvaises circonstances, mais
cela ne fonctionne pas sur des serveur</li>
</ul>
 
<p>multithread et sur les systèmes de fichiers NFS par exemple.</p>
 
<h1>&gt; (boolean) controle_lecture :</h1>
 
<ul>
<li>Activer / désactiver le contrôle de lecture</li>
 
<li>S'il est activé, une clé de contrôle est ajoutée dans le fichier de
cache et cette clé est comparée avec celle calculée</li>
</ul>
 
<p>après la lecture.</p>
 
<h1>&gt; (string) controle_lecture_type :</h1>
 
<p>Type de contrôle de lecture (seulement si le contrôle de lecture est
activé). Les valeurs disponibles sont:</p>
 
<ul>
<li>«md5» pour un contrôle md5 (le meilleur mais le plus lent)</li>
 
<li>«crc32» pour un contrôle de hachage crc32 (un peu moins sécurisé, mais
plus rapide, un meilleur choix)</li>
 
<li>«adler32» pour un contrôle de hachage adler32 (excellent choix aussi,
plus rapide que crc32)</li>
 
<li>«strlen» pour un test de longueur uniquement (le plus rapide)</li>
</ul>
 
<h1>&gt; (int) dossier_niveau :</h1>
 
<ul>
<li>Permet de réglez le nombre de niveau de sous-dossier que contiendra
l'arborescence des dossiers du cache.</li>
</ul>
 
<p>0 signifie "pas de sous-dossier pour le cache", 1 signifie "un niveau de
sous-dossier", 2 signifie "deux niveaux" ... Cette option peut accélérer le
cache seulement lorsque vous avez plusieurs centaines de fichiers de cache.
Seuls des tests spécifiques peuvent vous aider à choisir la meilleure valeur
possible pour vous. 1 ou 2 peut être est un bon début.</p>
 
<h1>&gt; (int) dossier_umask :</h1>
 
<ul>
<li>Umask pour les sous-dossiers de l'arborescence du cache.</li>
</ul>
 
<h1>&gt; (string) fichier_prefixe :</h1>
 
<ul>
<li>préfixe pour les fichiers du cache</li>
 
<li>ATTENTION : faite vraiment attention avec cette option, car une valeur trop
générique dans le dossier cache du système</li>
</ul>
 
<p>(comme /tmp) peut provoquer des catastrophes lors du nettoyage du cache.</p>
 
<h1>&gt; (int) fichier_umask :</h1>
 
<ul>
<li>Umask pour les fichiers de cache</li>
</ul>
 
<h1>&gt; (int) metadonnees_max_taille :</h1>
 
<ul>
<li>taille maximum pour le tableau de métadonnées du cache (ne changer pas
cette valeur sauf si vous savez ce que vous faite)</li>
</ul>
 
 
</div>
</div></td>
</tr>
<tr data-order="metadonnees" id="$metadonnees">
<td class="attributes"><code>
protected
array
</code></td>
 
<td class="name">
<a href="source-class-CacheFichier.html#64-69" title="Go to source code"><var>$metadonnees</var></a>
</td>
<td class="value"><code><span class="php-keyword1">array</span>()</code></td>
<td class="description"><div>
<a href="#$metadonnees" class="anchor">#</a>
 
<div class="description short">
<p>Array of metadatas (each item is an associative array)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Array of metadatas (each item is an associative array)</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Url.html
New file
0,0 → 1,694
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Url | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li class="active"><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Url</h1>
 
 
<div class="description">
<p>Classe Url, gérant le découpage des paramètres, leurs modification etc...
Traduction et conversion d'une classe (NET_Url2) issue de Pear</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
Php 5.2<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
<b>Author:</b>
Christian SCHMIDT &lt;<a
href="mailto:schmidt&#64;php.net">schmidt&#64;<!-- -->php.net</a>&gt; (Auteur
classe originale)<br>
<b>Author:</b>
Aurélien PERONNET &lt;<a
href="mailto:aurelien&#64;tela-botanica.org">aurelien&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
SVN: $Id: Url.php 404 2012-02-22 15:44:24Z gduche $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Url.html#3-425" title="Go to source code">Url.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-Url.html#97-134" title="Go to source code">__construct</a>( <span>string <var>$url</var></span>, <span>array <var>$options</var> = <span class="php-keyword1">null</span></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$url</var></dt>
<dd><code>string</code><br>$url une URL relative ou absolue</dd>
<dt><var>$options</var></dt>
<dd><code>array</code><br>$options</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getOption" id="_getOption">
 
<td class="attributes"><code>
public
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getOption">#</a>
<code><a href="source-class-Url.html#136-145" title="Go to source code">getOption</a>( <span>string <var>$nomOption</var></span> )</code>
 
<div class="description short">
<p>Renvoie la valeur de l'option specifiée.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Renvoie la valeur de l'option specifiée.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$nomOption</var></dt>
<dd><code>string</code><br>$nomOption Nom de l'option demandée</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setOption" id="_setOption">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setOption">#</a>
<code><a href="source-class-Url.html#147-163" title="Go to source code">setOption</a>( <span>string <var>$nomOption</var></span>, <span>mixed <var>$valeur</var></span> )</code>
 
<div class="description short">
<p>Met à jour la valeur de l'option spécifiée.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Met à jour la valeur de l'option spécifiée.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$nomOption</var></dt>
<dd><code>string</code><br>$nomOption une des constantes commençant par self::OPTION_</dd>
<dt><var>$valeur</var></dt>
<dd><code>mixed</code><br>$valeur valeur de l'option</dd>
</dl></div>
 
 
 
<h4>See</h4>
<div class="list">
self::OPTION_STRICTE<br>
<code><code><a href="class-Url.html#OPTION_UTILISER_CROCHETS">Url::<b>OPTION_UTILISER_CROCHETS</b></a></code></code><br>
<code><code><a href="class-Url.html#OPTION_ENCODER_CLES">Url::<b>OPTION_ENCODER_CLES</b></a></code></code><br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="setRequete" id="_setRequete">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setRequete">#</a>
<code><a href="source-class-Url.html#264-299" title="Go to source code">setRequete</a>( <span>array <var>$parametres</var></span> )</code>
 
<div class="description short">
<p>(Re-)Création de la partie requête de l'URL à partir des données du
tableau (passé en paramètre).</p>
 
</div>
 
<div class="description detailed hidden">
<p>(Re-)Création de la partie requête de l'URL à partir des données du
tableau (passé en paramètre).</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$parametres</var></dt>
<dd><code>array</code><br>(nom =&gt; valeur) tableau de clés &amp; valeurs pour la partie requête de
l'url.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code></code><br>(Re-)Création de la partie requête.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="fusionnerRequete" id="_fusionnerRequete">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_fusionnerRequete">#</a>
<code><a href="source-class-Url.html#301-313" title="Go to source code">fusionnerRequete</a>( <span>array <var>$parametres</var></span> )</code>
 
<div class="description short">
<p>(Re-)Création de la partie requête de l'URL à partir de la fusion du
tableau (passé en paramètre) et les valeurs présentes dans $_GET.</p>
 
</div>
 
<div class="description detailed hidden">
<p>(Re-)Création de la partie requête de l'URL à partir de la fusion du
tableau (passé en paramètre) et les valeurs présentes dans $_GET.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$parametres</var></dt>
<dd><code>array</code><br>(nom =&gt; valeur) tableau de clés &amp; valeurs pour la partie requête de
l'url.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code></code><br>(Re-)Création de la partie requête.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="normaliser" id="_normaliser">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_normaliser">#</a>
<code><a href="source-class-Url.html#315-352" title="Go to source code">normaliser</a>( )</code>
 
<div class="description short">
<p>Normalise les données de l'instance d'Url faisant appel à cette
méthode.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Normalise les données de l'instance d'Url faisant appel à cette
méthode.</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code></code><br>l'instance d'Url courrante est normalisée.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getCanonique" id="_getCanonique">
 
<td class="attributes"><code>
public static
<code><a href="class-Url.html">Url</a></code>
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getCanonique">#</a>
<code><a href="source-class-Url.html#354-374" title="Go to source code">getCanonique</a>( )</code>
 
<div class="description short">
<p>Renvoie une instance d'objet Url representant l'URL canonique du script PHP
en cours d'éxécution.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Renvoie une instance d'objet Url representant l'URL canonique du script PHP
en cours d'éxécution.</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code><code><a href="class-Url.html">Url</a></code></code><br>retourne un objet Url ou null en cas d'erreur.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getDemande" id="_getDemande">
 
<td class="attributes"><code>
public static
<code><a href="class-Url.html">Url</a></code>
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getDemande">#</a>
<code><a href="source-class-Url.html#376-393" title="Go to source code">getDemande</a>( )</code>
 
<div class="description short">
<p>Renvoie une instance d'objet Url representant l'URL utilisée pour
récupérer la requête en cours.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Renvoie une instance d'objet Url representant l'URL utilisée pour
récupérer la requête en cours.</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code><code><a href="class-Url.html">Url</a></code></code><br>retourne un objet Url ou null en cas d'erreur.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getURL" id="_getURL">
 
<td class="attributes"><code>
public
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getURL">#</a>
<code><a href="source-class-Url.html#396-424" title="Go to source code">getURL</a>( )</code>
 
<div class="description short">
<p>Renvoie un représentation sous forme de chaine de l'URL.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Renvoie un représentation sous forme de chaine de l'URL.</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>l'url<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
<table class="summary" id="constants">
<caption>Constants summary</caption>
<tr data-order="OPTION_UTILISER_CROCHETS" id="OPTION_UTILISER_CROCHETS">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Url.html#20-23" title="Go to source code"><b>OPTION_UTILISER_CROCHETS</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'utiliser_crochets'</span></code></td>
<td class="description"><div>
<a href="#OPTION_UTILISER_CROCHETS" class="anchor">#</a>
 
<div class="description short">
<p>Répresenter les tableaux dans les requêtes en utilisant la notation php [].
Par défaut à true.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Répresenter les tableaux dans les requêtes en utilisant la notation php [].
Par défaut à true.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="OPTION_ENCODER_CLES" id="OPTION_ENCODER_CLES">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Url.html#25-28" title="Go to source code"><b>OPTION_ENCODER_CLES</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'encoder_cles'</span></code></td>
<td class="description"><div>
<a href="#OPTION_ENCODER_CLES" class="anchor">#</a>
 
<div class="description short">
<p>URL-encoder les clés des variables dans les requêtes. Par défaut à
true.</p>
 
</div>
 
<div class="description detailed hidden">
<p>URL-encoder les clés des variables dans les requêtes. Par défaut à
true.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="OPTION_ENCODER_VALEURS" id="OPTION_ENCODER_VALEURS">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Url.html#30-33" title="Go to source code"><b>OPTION_ENCODER_VALEURS</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'encoder_valeurs'</span></code></td>
<td class="description"><div>
<a href="#OPTION_ENCODER_VALEURS" class="anchor">#</a>
 
<div class="description short">
<p>URL-encoder les valeurs des variables dans les requêtes. Par défaut à
false.</p>
 
</div>
 
<div class="description detailed hidden">
<p>URL-encoder les valeurs des variables dans les requêtes. Par défaut à
false.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="OPTION_SEPARATEUR_ENTREE" id="OPTION_SEPARATEUR_ENTREE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Url.html#35-40" title="Go to source code"><b>OPTION_SEPARATEUR_ENTREE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'separateur_entree'</span></code></td>
<td class="description"><div>
<a href="#OPTION_SEPARATEUR_ENTREE" class="anchor">#</a>
 
<div class="description short">
<p>Séparateurs de variables lors du parsing de la requête. Chaque caractère
est considéré comme un séparateur. Par défaut, spécifié par le paramêtre
arg_separator.input dans php.ini (par défaut "&amp;").</p>
 
</div>
 
<div class="description detailed hidden">
<p>Séparateurs de variables lors du parsing de la requête. Chaque caractère
est considéré comme un séparateur. Par défaut, spécifié par le paramêtre
arg_separator.input dans php.ini (par défaut "&amp;").</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="OPTION_SEPARATEUR_SORTIE" id="OPTION_SEPARATEUR_SORTIE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Url.html#42-46" title="Go to source code"><b>OPTION_SEPARATEUR_SORTIE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'separateur_sortie'</span></code></td>
<td class="description"><div>
<a href="#OPTION_SEPARATEUR_SORTIE" class="anchor">#</a>
 
<div class="description short">
<p>Séparateur de variables lors de la génération de la requête. Par défaut,
spécifié par le paramètre arg_separator.output dans php.ini (par défaut
"&amp;").</p>
 
</div>
 
<div class="description detailed hidden">
<p>Séparateur de variables lors de la génération de la requête. Par défaut,
spécifié par le paramètre arg_separator.output dans php.ini (par défaut
"&amp;").</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/resources/footer.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/ApiGen/resources/footer.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/ApiGen/resources/tree-last.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/ApiGen/resources/tree-last.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/ApiGen/resources/resize.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/ApiGen/resources/resize.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/ApiGen/resources/inherit.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/ApiGen/resources/inherit.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/ApiGen/resources/style.css
New file
0,0 → 1,608
/*!
* ApiGen 2.8.0 - API documentation generator for PHP 5.3+
*
* Copyright (c) 2010-2011 David Grudl (http://davidgrudl.com)
* Copyright (c) 2011-2012 Jaroslav Hanslík (https://github.com/kukulich)
* Copyright (c) 2011-2012 Ondřej Nešpor (https://github.com/Andrewsville)
*
* For the full copyright and license information, please view
* the file LICENSE.md that was distributed with this source code.
*/
 
body {
font: 13px/1.5 Verdana, 'Geneva CE', lucida, sans-serif;
margin: 0;
padding: 0;
background: #ffffff;
color: #333333;
}
 
h1, h2, h3, h4, caption {
font-family: 'Trebuchet MS', 'Geneva CE', lucida, sans-serif;
color: #053368;
}
 
h1 {
color: #1e5eb6;
font-size: 230%;
font-weight: normal;
margin: .3em 0;
}
 
h2 {
color: #1e5eb6;
font-size: 150%;
font-weight: normal;
margin: -.3em 0 .3em 0;
}
 
h3 {
font-size: 1.6em;
font-weight: normal;
margin-bottom: 2px;
}
 
h4 {
font-size: 100%;
font-weight: bold;
padding: 0;
margin: 0;
}
 
caption {
border: 1px solid #cccccc;
background: #ecede5;
font-weight: bold;
font-size: 1.2em;
padding: 3px 5px;
text-align: left;
margin-bottom: 0;
}
 
p {
margin: .7em 0 1em;
padding: 0;
}
 
hr {
margin: 2em 0 1em;
border: none;
border-top: 1px solid #cccccc;
height: 0;
}
 
a {
color: #006aeb;
padding: 3px 1px;
text-decoration: none;
}
 
h1 a {
color: #1e5eb6;
}
 
a:hover, a:active, a:focus, a:hover b, a:hover var {
background-color: #006aeb;
color: #ffffff !important;
}
 
code, var, pre {
font-family: monospace;
}
 
var {
font-weight: bold;
font-style: normal;
color: #ca8a04;
}
 
pre {
margin: 0;
}
 
code a b {
color: #000000;
}
 
.deprecated {
text-decoration: line-through;
}
 
.invalid {
color: #e71818;
}
 
.hidden {
display: none;
}
 
/* Left side */
#left {
overflow: auto;
width: 270px;
height: 100%;
position: fixed;
}
 
/* Menu */
#menu {
padding: 10px;
}
 
#menu ul {
list-style: none;
padding: 0;
margin: 0;
}
 
#menu ul ul {
padding-left: 10px;
}
 
#menu li {
white-space: nowrap;
position: relative;
}
 
#menu a {
display: block;
padding: 0 2px;
}
 
#menu .active > a, #menu > span {
color: #333333;
background: none;
font-weight: bold;
}
 
#menu .active > a.invalid {
color: #e71818;
}
 
#menu .active > a:hover, #menu .active > a:active, #menu .active > a:focus {
background-color: #006aeb;
}
 
#menu #groups span {
position: absolute;
top: 4px;
right: 2px;
cursor: pointer;
display: block;
width: 12px;
height: 12px;
background: url('collapsed.png') transparent 0 0 no-repeat;
}
 
#menu #groups span:hover {
background-position: -12px 0;
}
 
#menu #groups span.collapsed {
background-position: 0 -12px;
}
 
#menu #groups span.collapsed:hover {
background-position: -12px -12px;
}
 
#menu #groups ul.collapsed {
display: none;
}
 
/* Right side */
#right {
overflow: auto;
margin-left: 275px;
height: 100%;
position: fixed;
left: 0;
right: 0;
}
 
#rightInner {
max-width: 1000px;
min-width: 350px;
}
 
/* Search */
#search {
float: right;
margin: 3px 8px;
}
 
#search input.text {
padding: 3px 5px;
width: 250px;
}
 
/* Autocomplete */
.ac_results {
padding: 0;
border: 1px solid #cccccc;
background-color: #ffffff;
overflow: hidden;
z-index: 99999;
}
 
.ac_results ul {
width: 100%;
list-style-position: outside;
list-style: none;
padding: 0;
margin: 0;
}
 
.ac_results li {
margin: 0;
padding: 2px 5px;
cursor: default;
display: block;
font: 12px 'Trebuchet MS', 'Geneva CE', lucida, sans-serif;
line-height: 16px;
overflow: hidden;
white-space: nowrap;
}
 
.ac_results li strong {
color: #000000;
}
 
.ac_odd {
background-color: #eeeeee;
}
 
.ac_over {
background-color: #006aeb;
color: #ffffff;
}
 
.ac_results li.ac_over strong {
color: #ffffff;
}
 
/* Navigation */
#navigation {
padding: 3px 8px;
background-color: #f6f6f4;
height: 26px;
}
 
#navigation ul {
list-style: none;
margin: 0 8px 4px 0;
padding: 0;
overflow: hidden;
float: left;
}
 
#navigation ul + ul {
border-left: 1px solid #000000;
padding-left: 8px;
}
 
#navigation ul li {
float: left;
margin: 2px;
padding: 0 3px;
font-family: Verdana, 'Geneva CE', lucida, sans-serif;
color: #808080;
}
 
#navigation ul li.active {
background-color: #053368;
color: #ffffff;
font-weight: bold;
}
 
#navigation ul li a {
color: #000000;
font-weight: bold;
padding: 0;
}
 
#navigation ul li span {
float: left;
padding: 0 3px;
}
 
#navigation ul li a:hover span, #navigation ul li a:active span, #navigation ul li a:focus span {
background-color: #006aeb;
}
 
/* Content */
#content {
clear: both;
padding: 5px 15px;
}
 
.description pre {
padding: .6em;
background: #fcfcf7;
}
 
#content > .description {
background: #ecede5;
padding: 1px 8px;
margin: 1.2em 0;
}
 
#content > .description pre {
margin: .5em 0;
}
 
dl.tree {
margin: 1.2em 0;
}
 
dl.tree dd {
margin: 0;
padding: 0;
}
 
.info {
margin: 1.2em 0;
}
 
.summary {
border: 1px solid #cccccc;
border-collapse: collapse;
font-size: 1em;
width: 100%;
margin: 1.2em 0 2.4em;
}
 
.summary caption {
border-width: 1px 1px 0;
}
 
.summary caption.switchable {
background: #ecede5 url('sort.png') no-repeat center right;
cursor: pointer;
}
 
.summary td {
border: 1px solid #cccccc;
margin: 0;
padding: 3px 10px;
font-size: 1em;
vertical-align: top;
}
 
.summary td:first-child {
text-align: right;
}
 
#packages.summary td:first-child, #namespaces.summary td:first-child, .inherited.summary td:first-child, .used.summary td:first-child {
text-align: left;
}
 
.summary tr:hover td {
background: #f6f6f4;
}
 
.summary .description pre {
border: .5em solid #ecede5;
}
 
.summary .description p {
margin: 0;
}
 
.summary .description p + p, .summary .description ul {
margin: 3px 0 0 0;
}
 
.summary .description.detailed h4 {
margin-top: 3px;
}
 
.summary dl {
margin: 0;
}
 
.summary dd {
margin: 0 0 0 25px;
}
 
.name, .attributes {
white-space: nowrap;
}
 
.value {
white-space: pre-wrap;
}
 
td.name, td.attributes {
width: 1%;
}
 
.class #methods .name {
width: auto;
white-space: normal;
}
 
.class #methods .name > div > code {
white-space: pre-wrap;
}
 
.class #methods .name > div > code span, .function .value > code {
white-space: nowrap;
}
 
.class #methods td.name > div, .class td.description > div {
position: relative;
padding-right: 1em;
}
 
.anchor {
position: absolute;
top: 0;
right: 0;
line-height: 1;
font-size: 85%;
margin: 0;
color: #006aeb !important;
}
 
.list {
margin: 0 0 5px 25px;
}
 
div.invalid {
background-color: #fae4e0;
padding: 10px;
}
 
/* Splitter */
#splitter {
position: fixed;
height: 100%;
width: 5px;
left: 270px;
background: #1e5eb6 url('resize.png') left center no-repeat;
cursor: e-resize;
}
 
#splitter.active {
opacity: .5;
}
 
/* Footer */
#footer {
border-top: 1px solid #e9eeef;
clear: both;
color: #a7a7a7;
font-size: 8pt;
text-align: center;
padding: 20px 0 0;
margin: 3em 0 0;
height: 90px;
background: #ffffff url('footer.png') no-repeat center top;
}
 
/* Tree */
div.tree ul {
list-style: none;
background: url('tree-vertical.png') left repeat-y;
padding: 0;
margin-left: 20px;
}
 
div.tree li {
margin: 0;
padding: 0;
}
 
div.tree div {
padding-left: 30px;
}
 
div.tree div.notlast {
background: url('tree-hasnext.png') left 10px no-repeat;
}
 
div.tree div.last {
background: url('tree-last.png') left -240px no-repeat;
}
 
div.tree li.last {
background: url('tree-cleaner.png') left center repeat-y;
}
 
div.tree span.padding {
padding-left: 15px;
}
 
/* Source code */
.php-keyword1 {
color: #e71818;
font-weight: bold;
}
 
.php-keyword2 {
font-weight: bold;
}
 
.php-var {
color: #d59401;
font-weight: bold;
}
 
.php-num {
color: #cd0673;
}
 
.php-quote {
color: #008000;
}
 
.php-comment {
color: #929292;
}
 
.xlang {
color: #ff0000;
font-weight: bold;
}
 
span.l {
display: block;
}
 
span.l.selected {
background: #f6f6f4;
}
 
span.l a {
color: #333333;
}
 
span.l a:hover, div.l a:active, div.l a:focus {
background: transparent;
color: #333333 !important;
}
 
span.l .php-var a {
color: #d59401;
}
 
span.l .php-var a:hover, span.l .php-var a:active, span.l .php-var a:focus {
color: #d59401 !important;
}
 
span.l a.l {
padding-left: 2px;
color: #c0c0c0;
}
 
span.l a.l:hover, span.l a.l:active, span.l a.l:focus {
background: transparent;
color: #c0c0c0 !important;
}
 
#rightInner.medium #navigation {
height: 52px;
}
 
#rightInner.medium #navigation ul:first-child + ul {
clear: left;
border: none;
padding: 0;
}
 
#rightInner.medium .name, #rightInner.medium .attributes {
white-space: normal;
}
 
#rightInner.small #search {
float: left;
}
 
#rightInner.small #navigation {
height: 78px;
}
 
#rightInner.small #navigation ul:first-child {
clear: both;
}
/branches/v0.3-aleaume/doc/ApiGen/resources/collapsed.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/ApiGen/resources/collapsed.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/ApiGen/resources/tree-cleaner.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/ApiGen/resources/tree-cleaner.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/ApiGen/resources/tree-vertical.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/ApiGen/resources/tree-vertical.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/ApiGen/resources/sort.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/ApiGen/resources/sort.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/ApiGen/resources/tree-hasnext.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/branches/v0.3-aleaume/doc/ApiGen/resources/tree-hasnext.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/branches/v0.3-aleaume/doc/ApiGen/resources/combined.js
New file
0,0 → 1,1264
 
var ApiGen = ApiGen || {};
ApiGen.config = {"require":{"min":"2.8.0"},"resources":{"resources":"resources"},"templates":{"common":{"overview.latte":"index.html","combined.js.latte":"resources\/combined.js","elementlist.js.latte":"elementlist.js","404.latte":"404.html"},"optional":{"sitemap":{"filename":"sitemap.xml","template":"sitemap.xml.latte"},"opensearch":{"filename":"opensearch.xml","template":"opensearch.xml.latte"},"robots":{"filename":"robots.txt","template":"robots.txt.latte"}},"main":{"package":{"filename":"package-%s.html","template":"package.latte"},"namespace":{"filename":"namespace-%s.html","template":"namespace.latte"},"class":{"filename":"class-%s.html","template":"class.latte"},"constant":{"filename":"constant-%s.html","template":"constant.latte"},"function":{"filename":"function-%s.html","template":"function.latte"},"source":{"filename":"source-%s.html","template":"source.latte"},"tree":{"filename":"tree.html","template":"tree.latte"},"deprecated":{"filename":"deprecated.html","template":"deprecated.latte"},"todo":{"filename":"todo.html","template":"todo.latte"}}},"options":{"elementDetailsCollapsed":true,"elementsOrder":"natural"},"config":"\/opt\/lampp\/lib\/php\/data\/ApiGen\/templates\/default\/config.neon"};
 
 
/*! jQuery v1.7 jquery.com | jquery.org/license */
(function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ck(){try{return new a.XMLHttpRequest}catch(b){}}function ce(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cd(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function cc(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bG.test(a)?d(a,e):cc(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)cc(a+"["+e+"]",b[e],c,d);else d(a,b)}function cb(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function ca(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bV,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=ca(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=ca(a,c,d,e,"*",g));return l}function b_(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bR),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bE(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bz:bA;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bB(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function br(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bi,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bq(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bp(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bp)}function bp(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bo(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bn(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bm(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bl(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function X(a){var b=Y.split(" "),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(){return!0}function M(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.add(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return a!=null&&m.test(a)&&!isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(I)return I.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())}),typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return e});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments)},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",enctype:!!c.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.lastChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-999px",top:"-999px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;f(function(){var a,b,d,e,g,h,i=1,j="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",n="style='"+j+"border:5px solid #000;padding:0;'",p="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>";m=c.getElementsByTagName("body")[0];!m||(a=c.createElement("div"),a.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+i+"px",m.insertBefore(a,m.firstChild),o=c.createElement("div"),o.style.cssText=j+l,o.innerHTML=p,a.appendChild(o),b=o.firstChild,d=b.firstChild,g=b.nextSibling.firstChild.firstChild,h={doesNotAddBorder:d.offsetTop!==5,doesAddBorderForTableAndCells:g.offsetTop===5},d.style.position="fixed",d.style.top="20px",h.fixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",h.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,h.doesNotIncludeMarginInBodyOffset=m.offsetTop!==i,m.removeChild(a),o=a=null,f.extend(k,h))}),o.innerHTML="",n.removeChild(o),o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[f.expando]:a[f.expando]&&f.expando,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[f.expando]=n=++f.uuid:n=f.expando),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[f.expando]:f.expando;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)?b=b:b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" "));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}return b}e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g},removeAttr:function(a,b){var c,d,e,g,h=0;if(a.nodeType===1){d=(b||"").split(p),g=d.length;for(;h<g;h++)e=d[h].toLowerCase(),c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1)}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return b;h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/\.(.*)$/,A=/^(?:textarea|input|select)$/i,B=/\./g,C=/ /g,D=/[^\w\s.|`]/g,E=/^([^\.]*)?(?:\.(.+))?$/,F=/\bhover(\.\S+)?/,G=/^key/,H=/^(?:mouse|contextmenu)|click/,I=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(a){var b=I.exec(a);b&&
(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},K=function(a,b){return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||a.id===b[2])&&(!b[3]||b[3].test(a.className))},L=function(a){return f.event.special.hover?a:a.replace(F,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=L(c).split(" ");for(k=0;k<c.length;k++){l=E.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,namespace:n.join(".")},p),g&&(o.quick=J(g),!o.quick&&f.expr.match.POS.test(g)&&(o.isPositional=!0)),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d){var e=f.hasData(a)&&f._data(a),g,h,i,j,k,l,m,n,o,p,q;if(!!e&&!!(m=e.events)){b=L(b||"").split(" ");for(g=0;g<b.length;g++){h=E.exec(b[g])||[],i=h[1],j=h[2];if(!i){j=j?"."+j:"";for(l in m)f.event.remove(a,l+j,c,d);return}n=f.event.special[i]||{},i=(d?n.delegateType:n.bindType)||i,p=m[i]||[],k=p.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;if(c||j||d||n.remove)for(l=0;l<p.length;l++){q=p[l];if(!c||c.guid===q.guid)if(!j||j.test(q.namespace))if(!d||d===q.selector||d==="**"&&q.selector)p.splice(l--,1),q.selector&&p.delegateCount--,n.remove&&n.remove.call(a,q)}else p.length=0;p.length===0&&k!==p.length&&((!n.teardown||n.teardown.call(a,j)===!1)&&f.removeEvent(a,i,e.handle),delete m[i])}f.isEmptyObject(m)&&(o=e.handle,o&&(o.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"",(g||!e)&&c.preventDefault();if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,n=null;for(m=e.parentNode;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length;l++){m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d);if(c.isPropagationStopped())break}c.type=h,c.isDefaultPrevented()||(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=(f.event.special[c.type]||{}).handle,j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click"))for(m=c.target;m!=this;m=m.parentNode||this){o={},q=[];for(k=0;k<e;k++)r=d[k],s=r.selector,t=o[s],r.isPositional?t=(t||(o[s]=f(s))).index(m)>=0:t===b&&(t=o[s]=r.quick?K(m,r.quick):f(m).is(s)),t&&q.push(r);q.length&&j.push({elem:m,matches:q})}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){p=j[k],c.currentTarget=p.elem;for(l=0;l<p.matches.length&&!c.isImmediatePropagationStopped();l++){r=p.matches[l];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=(i||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},focus:{delegateType:"focusin",noBubble:!0},blur:{delegateType:"focusout",noBubble:!0},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?N:M):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=N;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=N;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=N,this.stopPropagation()},isDefaultPrevented:M,isPropagationStopped:M,isImmediatePropagationStopped:M},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]=f.event.special[b]={delegateType:b,bindType:b,handle:function(a){var b=this,c=a.relatedTarget,d=a.handleObj,e=d.selector,g,h;if(!c||d.origType===a.type||c!==b&&!f.contains(b,c))g=a.type,a.type=d.origType,h=d.handler.apply(this,arguments),a.type=g;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(A.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;A.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return A.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=M;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=M);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),G.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),H.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw"Syntax error, unrecognized expression: "+a};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?T.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",Z=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,_=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ba=/<([\w:]+)/,bb=/<tbody/i,bc=/<|&#?\w+;/,bd=/<(?:script|style)/i,be=/<(?:script|object|embed|option|style)/i,bf=new RegExp("<(?:"+Y.replace(" ","|")+")","i"),bg=/checked\s*(?:[^=]|=\s*.checked.)/i,bh=/\/(java|ecma)script/i,bi=/^\s*<!(?:\[CDATA\[|\-\-)/,bj={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bk=X(c);bj.optgroup=bj.option,bj.tbody=bj.tfoot=bj.colgroup=bj.caption=bj.thead,bj.th=bj.td,f.support.htmlSerialize||(bj._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after"
,arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Z,""):null;if(typeof a=="string"&&!bd.test(a)&&(f.support.leadingWhitespace||!$.test(a))&&!bj[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(_,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bg.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bl(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,br)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!be.test(j)&&(f.support.checkClone||!bg.test(j))&&!f.support.unknownElems&&bf.test(j)&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bn(a,d),e=bo(a),g=bo(d);for(h=0;e[h];++h)g[h]&&bn(e[h],g[h])}if(b){bm(a,d);if(c){e=bo(a),g=bo(d);for(h=0;e[h];++h)bm(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bc.test(k))k=b.createTextNode(k);else{k=k.replace(_,"<$1></$2>");var l=(ba.exec(k)||["",""])[1].toLowerCase(),m=bj[l]||bj._default,n=m[0],o=b.createElement("div");b===c?bk.appendChild(o):X(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=bb.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&$.test(k)&&o.insertBefore(b.createTextNode($.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bq(k[i]);else bq(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bh.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bs=/alpha\([^)]*\)/i,bt=/opacity=([^)]*)/,bu=/([A-Z]|^ms)/g,bv=/^-?\d+(?:px)?$/i,bw=/^-?\d/,bx=/^([\-+])=([\-+.\de]+)/,by={position:"absolute",visibility:"hidden",display:"block"},bz=["Left","Right"],bA=["Top","Bottom"],bB,bC,bD;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bB(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bx.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bB)return bB(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bE(a,b,d);f.swap(a,by,function(){e=bE(a,b,d)});return e}},set:function(a,b){if(!bv.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bt.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bs,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bs.test(g)?g.replace(bs,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bB(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bC=function(a,c){var d,e,g;c=c.replace(bu,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bD=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bv.test(f)&&bw.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bB=bC||bD,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bF=/%20/g,bG=/\[\]$/,bH=/\r?\n/g,bI=/#.*$/,bJ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bK=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bL=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bM=/^(?:GET|HEAD)$/,bN=/^\/\//,bO=/\?/,bP=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bQ=/^(?:select|textarea)/i,bR=/\s+/,bS=/([?&])_=[^&]*/,bT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bU=f.fn.load,bV={},bW={},bX,bY,bZ=["*/"]+["*"];try{bX=e.href}catch(b$){bX=c.createElement("a"),bX.href="",bX=bX.href}bY=bT.exec(bX.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bU)return bU.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bP,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bQ.test(this.nodeName)||bK.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bH,"\r\n")}}):{name:b.name,value:c.replace(bH,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?cb(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),cb(a,b);return a},ajaxSettings:{url:bX,isLocal:bL.test(bY[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bZ},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:b_(bV),ajaxTransport:b_(bW),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cd(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=ce(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bJ.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bI,"").replace(bN,bY[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bR),d.crossDomain==null&&(r=bT.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bY[1]&&r[2]==bY[2]&&(r[3]||(r[1]==="http:"?80:443))==(bY[3]||(bY[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),ca(bV,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bM.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bO.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bS,"$1_="+x);d.url=y+(y===d.url?(bO.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bZ+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=ca(bW,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)cc(g,a[g],c,e);return d.join("&").replace(bF,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cf=f.now(),cg=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cf++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cg.test(b.url)||e&&cg.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cg,l),b.url===j&&(e&&(k=k.replace(cg,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ch=a.ActiveXObject?function(){for(var a in cj)cj[a](0,1)}:!1,ci=0,cj;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ck()||cl()}:ck,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ch&&delete cj[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++ci,ch&&(cj||(cj={},f(a).unload(ch)),cj[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cm={},cn,co,cp=/^(?:toggle|show|hide)$/,cq=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cr,cs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ct;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cw("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cx(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cw("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cw("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cx(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cp.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=cq.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cw("show",1),slideUp:cw("hide",1),slideToggle:cw("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=ct||cu(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cr&&(cr=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=ct||cu(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cr),cr=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now))}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cy=/^t(?:able|d|h)$/i,cz=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cA(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cy.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cz.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cz.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cA(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cA(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
 
/**
* Create a cookie with the given name and value and other optional parameters.
*
* @example $.cookie('the_cookie', 'the_value');
* @desc Set the value of a cookie.
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
* @desc Create a cookie with all available options.
* @example $.cookie('the_cookie', 'the_value');
* @desc Create a session cookie.
* @example $.cookie('the_cookie', null);
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
* used when the cookie was set.
*
* @param String name The name of the cookie.
* @param String value The value of the cookie.
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
* If set to null or omitted, the cookie will be a session cookie and will not be retained
* when the the browser exits.
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
* require a secure protocol (like HTTPS).
* @type undefined
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
 
/**
* Get the value of a cookie with the given name.
*
* @example $.cookie('the_cookie');
* @desc Get the value of a cookie.
*
* @param String name The name of the cookie.
* @return The value of the cookie.
* @type String
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
}
// CAUTION: Needed to parenthesize options.path and options.domain
// in the following expressions, otherwise they evaluate to undefined
// in the packed version for some reason...
var path = options.path ? '; path=' + (options.path) : '';
var domain = options.domain ? '; domain=' + (options.domain) : '';
var secure = options.secure ? '; secure' : '';
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
} else { // only name given, get cookie
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
};
/*!
* sprintf and vsprintf for jQuery
* somewhat based on http://jan.moesen.nu/code/javascript/sprintf-and-printf-in-javascript/
* Copyright (c) 2008 Sabin Iacob (m0n5t3r) <iacobs@m0n5t3r.info>
* @license http://www.gnu.org/licenses/gpl.html
* @project jquery.sprintf
*/
(function(d){var a={b:function(e){return parseInt(e,10).toString(2)},c:function(e){return String.fromCharCode(parseInt(e,10))},d:function(e){return parseInt(e,10)},u:function(e){return Math.abs(e)},f:function(f,e){e=parseInt(e,10);f=parseFloat(f);if(isNaN(e&&f)){return NaN}return e&&f.toFixed(e)||f},o:function(e){return parseInt(e,10).toString(8)},s:function(e){return e},x:function(e){return(""+parseInt(e,10).toString(16)).toLowerCase()},X:function(e){return(""+parseInt(e,10).toString(16)).toUpperCase()}};var c=/%(?:(\d+)?(?:\.(\d+))?|\(([^)]+)\))([%bcdufosxX])/g;var b=function(f){if(f.length==1&&typeof f[0]=="object"){f=f[0];return function(i,h,k,j,g,m,l){return a[g](f[j])}}else{var e=0;return function(i,h,k,j,g,m,l){if(g=="%"){return"%"}return a[g](f[e++],k)}}};d.extend({sprintf:function(f){var e=Array.apply(null,arguments).slice(1);return f.replace(c,b(e))},vsprintf:function(f,e){return f.replace(c,b(e))}})})(jQuery);
 
/*!
* jQuery Autocomplete plugin 1.1
*
* Copyright (c) 2009 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
*/
 
;(function($) {
 
$.fn.extend({
autocomplete: function(urlOrData, options) {
var isUrl = typeof urlOrData == "string";
options = $.extend({}, $.Autocompleter.defaults, {
url: isUrl ? urlOrData : null,
data: isUrl ? null : urlOrData,
delay: isUrl ? $.Autocompleter.defaults.delay : 10,
max: options && !options.scroll ? 10 : 150
}, options);
 
// if highlight is set to false, replace it with a do-nothing function
options.highlight = options.highlight || function(value) { return value; };
 
// if the formatMatch option is not specified, then use formatItem for backwards compatibility
options.formatMatch = options.formatMatch || options.formatItem;
 
options.show = options.show || function(list) {};
 
return this.each(function() {
new $.Autocompleter(this, options);
});
},
result: function(handler) {
return this.bind("result", handler);
},
search: function(handler) {
return this.trigger("search", [handler]);
},
flushCache: function() {
return this.trigger("flushCache");
},
setOptions: function(options){
return this.trigger("setOptions", [options]);
},
unautocomplete: function() {
return this.trigger("unautocomplete");
}
});
 
$.Autocompleter = function(input, options) {
 
var KEY = {
UP: 38,
DOWN: 40,
DEL: 46,
TAB: 9,
RETURN: 13,
ESC: 27,
COMMA: 188,
PAGEUP: 33,
PAGEDOWN: 34,
BACKSPACE: 8
};
 
// Create $ object for input element
var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
 
var timeout;
var previousValue = "";
var cache = $.Autocompleter.Cache(options);
var hasFocus = 0;
var lastKeyPressCode;
var config = {
mouseDownOnSelect: false
};
var select = $.Autocompleter.Select(options, input, selectCurrent, config);
 
// only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
$input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {
// a keypress means the input has focus
// avoids issue where input had focus before the autocomplete was applied
hasFocus = 1;
// track last key pressed
lastKeyPressCode = event.keyCode;
switch(event.keyCode) {
 
case KEY.UP:
event.preventDefault();
if ( select.visible() ) {
select.prev();
} else {
onChange(0, true);
}
break;
 
case KEY.DOWN:
event.preventDefault();
if ( select.visible() ) {
select.next();
} else {
onChange(0, true);
}
break;
 
case KEY.PAGEUP:
event.preventDefault();
if ( select.visible() ) {
select.pageUp();
} else {
onChange(0, true);
}
break;
 
case KEY.PAGEDOWN:
event.preventDefault();
if ( select.visible() ) {
select.pageDown();
} else {
onChange(0, true);
}
break;
 
// matches also semicolon
case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
case KEY.TAB:
case KEY.RETURN:
if( selectCurrent() ) {
//event.preventDefault();
//return false;
}
break;
 
case KEY.ESC:
select.hide();
break;
 
default:
clearTimeout(timeout);
timeout = setTimeout(onChange, options.delay);
break;
}
}).focus(function(){
// track whether the field has focus, we shouldn't process any
// results if the field no longer has focus
hasFocus++;
}).blur(function() {
hasFocus = 0;
if (!config.mouseDownOnSelect) {
hideResults();
}
}).click(function() {
// show select when clicking in a focused field
if ( hasFocus++ > 1 && !select.visible() ) {
onChange(0, true);
}
}).bind("search", function() {
// TODO why not just specifying both arguments?
var fn = (arguments.length > 1) ? arguments[1] : null;
function findValueCallback(q, data) {
var result;
if( data && data.length ) {
for (var i=0; i < data.length; i++) {
if( data[i].result.toLowerCase() == q.toLowerCase() ) {
result = data[i];
break;
}
}
}
if( typeof fn == "function" ) fn(result);
else $input.trigger("result", result && [result.data, result.value]);
}
$.each(trimWords($input.val()), function(i, value) {
request(value, findValueCallback, findValueCallback);
});
}).bind("flushCache", function() {
cache.flush();
}).bind("setOptions", function() {
$.extend(options, arguments[1]);
// if we've updated the data, repopulate
if ( "data" in arguments[1] )
cache.populate();
}).bind("unautocomplete", function() {
select.unbind();
$input.unbind();
$(input.form).unbind(".autocomplete");
});
 
 
function selectCurrent() {
var selected = select.selected();
if( !selected )
return false;
 
var v = selected.result;
previousValue = v;
 
if ( options.multiple ) {
var words = trimWords($input.val());
if ( words.length > 1 ) {
var seperator = options.multipleSeparator.length;
var cursorAt = $(input).selection().start;
var wordAt, progress = 0;
$.each(words, function(i, word) {
progress += word.length;
if (cursorAt <= progress) {
wordAt = i;
return false;
}
progress += seperator;
});
words[wordAt] = v;
// TODO this should set the cursor to the right position, but it gets overriden somewhere
//$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
v = words.join( options.multipleSeparator );
}
v += options.multipleSeparator;
}
 
$input.val(v);
hideResultsNow();
$input.trigger("result", [selected.data, selected.value]);
return true;
}
 
function onChange(crap, skipPrevCheck) {
if( lastKeyPressCode == KEY.DEL ) {
select.hide();
return;
}
 
var currentValue = $input.val();
 
if ( !skipPrevCheck && currentValue == previousValue )
return;
 
previousValue = currentValue;
 
currentValue = lastWord(currentValue);
if ( currentValue.length >= options.minChars) {
$input.addClass(options.loadingClass);
if (!options.matchCase)
currentValue = currentValue.toLowerCase();
request(currentValue, receiveData, hideResultsNow);
} else {
stopLoading();
select.hide();
}
};
 
function trimWords(value) {
if (!value)
return [""];
if (!options.multiple)
return [$.trim(value)];
return $.map(value.split(options.multipleSeparator), function(word) {
return $.trim(value).length ? $.trim(word) : null;
});
}
 
function lastWord(value) {
if ( !options.multiple )
return value;
var words = trimWords(value);
if (words.length == 1)
return words[0];
var cursorAt = $(input).selection().start;
if (cursorAt == value.length) {
words = trimWords(value)
} else {
words = trimWords(value.replace(value.substring(cursorAt), ""));
}
return words[words.length - 1];
}
 
// fills in the input box w/the first match (assumed to be the best match)
// q: the term entered
// sValue: the first matching result
function autoFill(q, sValue){
// autofill in the complete box w/the first match as long as the user hasn't entered in more data
// if the last user key pressed was backspace, don't autofill
if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
// fill in the value (keep the case the user has typed)
$input.val($input.val() + sValue.substring(lastWord(previousValue).length));
// select the portion of the value not typed by the user (so the next character will erase)
$(input).selection(previousValue.length, previousValue.length + sValue.length);
}
};
 
function hideResults() {
clearTimeout(timeout);
timeout = setTimeout(hideResultsNow, 200);
};
 
function hideResultsNow() {
var wasVisible = select.visible();
select.hide();
clearTimeout(timeout);
stopLoading();
if (options.mustMatch) {
// call search and run callback
$input.search(
function (result){
// if no value found, clear the input box
if( !result ) {
if (options.multiple) {
var words = trimWords($input.val()).slice(0, -1);
$input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
}
else {
$input.val( "" );
$input.trigger("result", null);
}
}
}
);
}
};
 
function receiveData(q, data) {
if ( data && data.length && hasFocus ) {
stopLoading();
select.display(data, q);
autoFill(q, data[0].value);
select.show();
} else {
hideResultsNow();
}
};
 
function request(term, success, failure) {
if (!options.matchCase)
term = term.toLowerCase();
var data = cache.load(term);
// recieve the cached data
if (data && data.length) {
success(term, data);
// if an AJAX url has been supplied, try loading the data now
} else if( (typeof options.url == "string") && (options.url.length > 0) ){
 
var extraParams = {
timestamp: +new Date()
};
$.each(options.extraParams, function(key, param) {
extraParams[key] = typeof param == "function" ? param() : param;
});
 
$.ajax({
// try to leverage ajaxQueue plugin to abort previous requests
mode: "abort",
// limit abortion to this input
port: "autocomplete" + input.name,
dataType: options.dataType,
url: options.url,
data: $.extend({
q: lastWord(term),
limit: options.max
}, extraParams),
success: function(data) {
var parsed = options.parse && options.parse(data) || parse(data);
cache.add(term, parsed);
success(term, parsed);
}
});
} else {
// if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
select.emptyList();
failure(term);
}
};
 
function parse(data) {
var parsed = [];
var rows = data.split("\n");
for (var i=0; i < rows.length; i++) {
var row = $.trim(rows[i]);
if (row) {
row = row.split("|");
parsed[parsed.length] = {
data: row,
value: row[0],
result: options.formatResult && options.formatResult(row, row[0]) || row[0]
};
}
}
return parsed;
};
 
function stopLoading() {
$input.removeClass(options.loadingClass);
};
 
};
 
$.Autocompleter.defaults = {
inputClass: "ac_input",
resultsClass: "ac_results",
loadingClass: "ac_loading",
minChars: 1,
delay: 400,
matchCase: false,
matchSubset: true,
matchContains: false,
cacheLength: 10,
max: 100,
mustMatch: false,
extraParams: {},
selectFirst: true,
formatItem: function(row) { return row[0]; },
formatMatch: null,
autoFill: false,
width: 0,
multiple: false,
multipleSeparator: ", ",
highlight: function(value, term) {
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
},
scroll: true,
scrollHeight: 180
};
 
$.Autocompleter.Cache = function(options) {
 
var data = {};
var length = 0;
 
function matchSubset(s, sub) {
if (!options.matchCase)
s = s.toLowerCase();
var i = s.indexOf(sub);
if (options.matchContains == "word"){
i = s.toLowerCase().search("\\b" + sub.toLowerCase());
}
if (i == -1) return false;
return i == 0 || options.matchContains;
};
 
function add(q, value) {
if (length > options.cacheLength){
flush();
}
if (!data[q]){
length++;
}
data[q] = value;
}
 
function populate(){
if( !options.data ) return false;
// track the matches
var stMatchSets = {},
nullData = 0;
 
// no url was specified, we need to adjust the cache length to make sure it fits the local data store
if( !options.url ) options.cacheLength = 1;
 
// track all options for minChars = 0
stMatchSets[""] = [];
 
// loop through the array and create a lookup structure
for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
var rawValue = options.data[i];
// if rawValue is a string, make an array otherwise just reference the array
rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
 
var value = options.formatMatch(rawValue, i+1, options.data.length);
if ( value === false )
continue;
 
var firstChar = value.charAt(0).toLowerCase();
// if no lookup array for this character exists, look it up now
if( !stMatchSets[firstChar] )
stMatchSets[firstChar] = [];
 
// if the match is a string
var row = {
value: value,
data: rawValue,
result: options.formatResult && options.formatResult(rawValue) || value
};
 
// push the current match into the set list
stMatchSets[firstChar].push(row);
 
// keep track of minChars zero items
if ( nullData++ < options.max ) {
stMatchSets[""].push(row);
}
};
 
// add the data items to the cache
$.each(stMatchSets, function(i, value) {
// increase the cache size
options.cacheLength++;
// add to the cache
add(i, value);
});
}
 
// populate any existing data
setTimeout(populate, 25);
 
function flush(){
data = {};
length = 0;
}
 
return {
flush: flush,
add: add,
populate: populate,
load: function(q) {
if (!options.cacheLength || !length)
return null;
/*
* if dealing w/local data and matchContains than we must make sure
* to loop through all the data collections looking for matches
*/
if( !options.url && options.matchContains ){
// track all matches
var csub = [];
// loop through all the data grids for matches
for( var k in data ){
// don't search through the stMatchSets[""] (minChars: 0) cache
// this prevents duplicates
if( k.length > 0 ){
var c = data[k];
$.each(c, function(i, x) {
// if we've got a match, add it to the array
if (matchSubset(x.value, q)) {
csub.push(x);
}
});
}
}
return csub;
} else
// if the exact item exists, use it
if (data[q]){
return data[q];
} else
if (options.matchSubset) {
for (var i = q.length - 1; i >= options.minChars; i--) {
var c = data[q.substr(0, i)];
if (c) {
var csub = [];
$.each(c, function(i, x) {
if (matchSubset(x.value, q)) {
csub[csub.length] = x;
}
});
return csub;
}
}
}
return null;
}
};
};
 
$.Autocompleter.Select = function (options, input, select, config) {
var CLASSES = {
ACTIVE: "ac_over"
};
 
var listItems,
active = -1,
data,
term = "",
needsInit = true,
element,
list;
 
// Create results
function init() {
if (!needsInit)
return;
element = $("<div/>")
.hide()
.addClass(options.resultsClass)
.css("position", "absolute")
.appendTo(document.body);
 
list = $("<ul/>").appendTo(element).mouseover( function(event) {
if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
$(target(event)).addClass(CLASSES.ACTIVE);
}
}).click(function(event) {
$(target(event)).addClass(CLASSES.ACTIVE);
select();
// TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
input.focus();
return false;
}).mousedown(function() {
config.mouseDownOnSelect = true;
}).mouseup(function() {
config.mouseDownOnSelect = false;
});
 
if( options.width > 0 )
element.css("width", options.width);
 
needsInit = false;
}
 
function target(event) {
var element = event.target;
while(element && element.tagName != "LI")
element = element.parentNode;
// more fun with IE, sometimes event.target is empty, just ignore it then
if(!element)
return [];
return element;
}
 
function moveSelect(step) {
listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
movePosition(step);
var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
if(options.scroll) {
var offset = 0;
listItems.slice(0, active).each(function() {
offset += this.offsetHeight;
});
if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
} else if(offset < list.scrollTop()) {
list.scrollTop(offset);
}
}
};
 
function movePosition(step) {
active += step;
if (active < 0) {
active = listItems.size() - 1;
} else if (active >= listItems.size()) {
active = 0;
}
}
 
function limitNumberOfItems(available) {
return options.max && options.max < available
? options.max
: available;
}
 
function fillList() {
list.empty();
var max = limitNumberOfItems(data.length);
for (var i=0; i < max; i++) {
if (!data[i])
continue;
var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
if ( formatted === false )
continue;
var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
$.data(li, "ac_data", data[i]);
}
listItems = list.find("li");
if ( options.selectFirst ) {
listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
active = 0;
}
// apply bgiframe if available
if ( $.fn.bgiframe )
list.bgiframe();
}
 
return {
display: function(d, q) {
init();
data = d;
term = q;
fillList();
},
next: function() {
moveSelect(1);
},
prev: function() {
moveSelect(-1);
},
pageUp: function() {
if (active != 0 && active - 8 < 0) {
moveSelect( -active );
} else {
moveSelect(-8);
}
},
pageDown: function() {
if (active != listItems.size() - 1 && active + 8 > listItems.size()) {
moveSelect( listItems.size() - 1 - active );
} else {
moveSelect(8);
}
},
hide: function() {
element && element.hide();
listItems && listItems.removeClass(CLASSES.ACTIVE);
active = -1;
},
visible : function() {
return element && element.is(":visible");
},
current: function() {
return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
},
show: function() {
var offset = $(input).offset();
element.css({
width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).innerWidth(),
top: offset.top + input.offsetHeight,
left: offset.left
}).show();
options.show(element);
if(options.scroll) {
list.scrollTop(0);
list.css({
maxHeight: options.scrollHeight,
overflow: 'auto'
});
 
if($.browser.msie && typeof document.body.style.maxHeight === "undefined") {
var listHeight = 0;
listItems.each(function() {
listHeight += this.offsetHeight;
});
var scrollbarsVisible = listHeight > options.scrollHeight;
list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
if (!scrollbarsVisible) {
// IE doesn't recalculate width when scrollbar disappears
listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
}
}
 
}
},
selected: function() {
var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
return selected && selected.length && $.data(selected[0], "ac_data");
},
emptyList: function (){
list && list.empty();
},
unbind: function() {
element && element.remove();
}
};
};
 
$.fn.selection = function(start, end) {
if (start !== undefined) {
return this.each(function() {
if( this.createTextRange ){
var selRange = this.createTextRange();
if (end === undefined || start == end) {
selRange.move("character", start);
selRange.select();
} else {
selRange.collapse(true);
selRange.moveStart("character", start);
selRange.moveEnd("character", end);
selRange.select();
}
} else if( this.setSelectionRange ){
this.setSelectionRange(start, end);
} else if( this.selectionStart ){
this.selectionStart = start;
this.selectionEnd = end;
}
});
}
var field = this[0];
if ( field.createTextRange ) {
var range = document.selection.createRange(),
orig = field.value,
teststring = "<->",
textLength = range.text.length;
range.text = teststring;
var caretAt = field.value.indexOf(teststring);
field.value = orig;
this.selection(caretAt, caretAt + textLength);
return {
start: caretAt,
end: caretAt + textLength
}
} else if( field.selectionStart !== undefined ){
return {
start: field.selectionStart,
end: field.selectionEnd
}
}
};
 
})(jQuery);
/**
* jQuery.fn.sortElements
* --------------
* @author James Padolsey (http://james.padolsey.com)
* @version 0.11
* @updated 18-MAR-2010
* --------------
* @param Function comparator:
* Exactly the same behaviour as [1,2,3].sort(comparator)
*
* @param Function getSortable
* A function that should return the element that is
* to be sorted. The comparator will run on the
* current collection, but you may want the actual
* resulting sort to occur on a parent or another
* associated element.
*
* E.g. $('td').sortElements(comparator, function(){
* return this.parentNode;
* })
*
* The <td>'s parent (<tr>) will be sorted instead
* of the <td> itself.
*/
jQuery.fn.sortElements = (function(){
 
var sort = [].sort;
 
return function(comparator, getSortable) {
 
getSortable = getSortable || function(){return this;};
 
var placements = this.map(function(){
 
var sortElement = getSortable.call(this),
parentNode = sortElement.parentNode,
 
// Since the element itself will change position, we have
// to have some way of storing it's original position in
// the DOM. The easiest way is to have a 'flag' node:
nextSibling = parentNode.insertBefore(
document.createTextNode(''),
sortElement.nextSibling
);
 
return function() {
 
if (parentNode === this) {
throw new Error(
"You can't sort elements if any one is a descendant of another."
);
}
 
// Insert before flag:
parentNode.insertBefore(this, nextSibling);
// Remove flag:
parentNode.removeChild(nextSibling);
 
};
 
});
 
return sort.call(this, comparator).each(function(i){
placements[i].call(getSortable.call(this));
});
 
};
 
})();
/*!
* ApiGen 2.8.0 - API documentation generator for PHP 5.3+
*
* Copyright (c) 2010-2011 David Grudl (http://davidgrudl.com)
* Copyright (c) 2011-2012 Jaroslav Hanslík (https://github.com/kukulich)
* Copyright (c) 2011-2012 Ondřej Nešpor (https://github.com/Andrewsville)
*
* For the full copyright and license information, please view
* the file LICENSE.md that was distributed with this source code.
*/
 
$(function() {
var $document = $(document);
var $left = $('#left');
var $right = $('#right');
var $rightInner = $('#rightInner');
var $splitter = $('#splitter');
var $groups = $('#groups');
var $content = $('#content');
 
// Menu
 
// Hide deep packages and namespaces
$('ul span', $groups).click(function(event) {
event.preventDefault();
event.stopPropagation();
$(this)
.toggleClass('collapsed')
.parent()
.next('ul')
.toggleClass('collapsed');
}).click();
 
$active = $('ul li.active', $groups);
if ($active.length > 0) {
// Open active
$('> a > span', $active).click();
} else {
$main = $('> ul > li.main', $groups);
if ($main.length > 0) {
// Open first level of the main project
$('> a > span', $main).click();
} else {
// Open first level of all
$('> ul > li > a > span', $groups).click();
}
}
 
// Content
 
// Search autocompletion
var autocompleteFound = false;
var autocompleteFiles = {'c': 'class', 'co': 'constant', 'f': 'function', 'm': 'class', 'mm': 'class', 'p': 'class', 'mp': 'class', 'cc': 'class'};
var $search = $('#search input[name=q]');
$search
.autocomplete(ApiGen.elements, {
matchContains: true,
scrollHeight: 200,
max: 20,
formatItem: function(data) {
return data[1].replace(/^(.+\\)(.+)$/, '<span><small>$1</small>$2</span>');
},
formatMatch: function(data) {
return data[1];
},
formatResult: function(data) {
return data[1];
},
show: function($list) {
var $items = $('li span', $list);
var maxWidth = Math.max.apply(null, $items.map(function() {
return $(this).width();
}));
// 10px padding
$list
.width(Math.max(maxWidth + 10, $search.innerWidth()))
.css('left', $search.offset().left + $search.outerWidth() - $list.outerWidth());
}
}).result(function(event, data) {
autocompleteFound = true;
var location = window.location.href.split('/');
location.pop();
var parts = data[1].split(/::|$/);
var file = $.sprintf(ApiGen.config.templates.main[autocompleteFiles[data[0]]].filename, parts[0].replace(/[^\w]/g, '.'));
if (parts[1]) {
file += '#' + ('mm' === data[0] || 'mp' === data[0] ? 'm' : '') + parts[1].replace(/([\w]+)\(\)/, '_$1');
}
location.push(file);
window.location = location.join('/');
 
// Workaround for Opera bug
$(this).closest('form').attr('action', location.join('/'));
}).closest('form')
.submit(function() {
var query = $search.val();
if ('' === query) {
return false;
}
 
var label = $('#search input[name=more]').val();
if (!autocompleteFound && label && -1 === query.indexOf('more:')) {
$search.val(query + ' more:' + label);
}
 
return !autocompleteFound && '' !== $('#search input[name=cx]').val();
});
 
// Save natural order
$('table.summary tr[data-order]', $content).each(function(index) {
do {
index = '0' + index;
} while (index.length < 3);
$(this).attr('data-order-natural', index);
});
 
// Switch between natural and alphabetical order
var $caption = $('table.summary', $content)
.filter(':has(tr[data-order])')
.find('caption');
$caption
.click(function() {
var $this = $(this);
var order = $this.data('order') || 'natural';
order = 'natural' === order ? 'alphabetical' : 'natural';
$this.data('order', order);
$.cookie('order', order, {expires: 365});
var attr = 'alphabetical' === order ? 'data-order' : 'data-order-natural';
$this
.closest('table')
.find('tr').sortElements(function(a, b) {
return $(a).attr(attr) > $(b).attr(attr) ? 1 : -1;
});
return false;
})
.addClass('switchable')
.attr('title', 'Switch between natural and alphabetical order');
if ((null === $.cookie('order') && 'alphabetical' === ApiGen.config.options.elementsOrder) || 'alphabetical' === $.cookie('order')) {
$caption.click();
}
 
// Open details
if (ApiGen.config.options.elementDetailsCollapsed) {
$('tr', $content).filter(':has(.detailed)')
.click(function() {
var $this = $(this);
$('.short', $this).hide();
$('.detailed', $this).show();
});
}
 
// Splitter
var splitterWidth = $splitter.width();
function setSplitterPosition(position)
{
$left.width(position);
$right.css('margin-left', position + splitterWidth);
$splitter.css('left', position);
}
function setNavigationPosition()
{
var width = $rightInner.width();
$rightInner
.toggleClass('medium', width <= 960)
.toggleClass('small', width <= 650);
}
$splitter.mousedown(function() {
$splitter.addClass('active');
 
$document.mousemove(function(event) {
if (event.pageX >= 230 && $document.width() - event.pageX >= 600 + splitterWidth) {
setSplitterPosition(event.pageX);
setNavigationPosition();
}
});
 
$()
.add($splitter)
.add($document)
.mouseup(function() {
$splitter
.removeClass('active')
.unbind('mouseup');
$document
.unbind('mousemove')
.unbind('mouseup');
 
$.cookie('splitter', parseInt($splitter.css('left')), {expires: 365});
});
 
return false;
});
var splitterPosition = $.cookie('splitter');
if (null !== splitterPosition) {
setSplitterPosition(parseInt(splitterPosition));
}
setNavigationPosition();
$(window).resize(setNavigationPosition);
 
// Select selected lines
var matches = window.location.hash.substr(1).match(/^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$/);
if (null !== matches) {
var lists = matches[0].split(',');
for (var i = 0; i < lists.length; i++) {
var lines = lists[i].split('-');
lines[1] = lines[1] || lines[0];
for (var j = lines[0]; j <= lines[1]; j++) {
$('#' + j).addClass('selected');
}
}
 
var $firstLine = $('#' + parseInt(matches[0]));
if ($firstLine.length > 0) {
$right.scrollTop($firstLine.offset().top);
}
}
 
// Save selected lines
var lastLine;
$('a.l').click(function(event) {
event.preventDefault();
 
var $selectedLine = $(this).parent();
var selectedLine = parseInt($selectedLine.attr('id'));
 
if (event.shiftKey) {
if (lastLine) {
for (var i = Math.min(selectedLine, lastLine); i <= Math.max(selectedLine, lastLine); i++) {
$('#' + i).addClass('selected');
}
} else {
$selectedLine.addClass('selected');
}
} else if (event.ctrlKey) {
$selectedLine.toggleClass('selected');
} else {
var $selected = $('.l.selected')
.not($selectedLine)
.removeClass('selected');
if ($selected.length > 0) {
$selectedLine.addClass('selected');
} else {
$selectedLine.toggleClass('selected');
}
}
 
lastLine = $selectedLine.hasClass('selected') ? selectedLine : null;
 
// Update hash
var lines = $('.l.selected')
.map(function() {
return parseInt($(this).attr('id'));
})
.get()
.sort(function(a, b) {
return a - b;
});
 
var hash = [];
var list = [];
for (var j = 0; j < lines.length; j++) {
if (0 === j && j + 1 === lines.length) {
hash.push(lines[j]);
} else if (0 === j) {
list[0] = lines[j];
} else if (lines[j - 1] + 1 !== lines[j] && j + 1 === lines.length) {
hash.push(list.join('-'));
hash.push(lines[j]);
} else if (lines[j - 1] + 1 !== lines[j]) {
hash.push(list.join('-'));
list = [lines[j]];
} else if (j + 1 === lines.length) {
list[1] = lines[j];
hash.push(list.join('-'));
} else {
list[1] = lines[j];
}
}
 
window.location.hash = hash.join(',');
});
});
 
/branches/v0.3-aleaume/doc/ApiGen/source-class-Cli.html
New file
0,0 → 1,224
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Cli.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li class="active"><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Cli.html" title="Summary of Cli"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * CLI permet de récupérer les paramètres passés en ligne de commande pour instancier une classe héritant de la classe abstraite
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * Script.
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * Elle va déclencher l'éxecution du script via l'appel de la méthode executer().
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * C'est une Singleton.
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> *
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @package Framework
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @author Delphine CAUQUIL &lt;delphine@tela-botanica.org&gt;
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * @since 0.3
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> * @version $Id: Cli.php 386 2011-10-28 15:56:25Z jpm $
</span></span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-comment"> */</span>
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a>
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a><span class="php-keyword1">class</span> <a id="Cli" href="#Cli">Cli</a> {
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> <span class="php-comment">/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/</span>
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$parametres_obligatoires" href="#$parametres_obligatoires">$parametres_obligatoires</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'chemin_modules'</span>);
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a>
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a>
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a> <span class="php-comment">/**
</span></span><span id="28" class="l"><a class="l" href="#28"> 28: </a><span class="php-comment"> * Execute la ligne de commande en récupérant le nom du script à lancer et ses paramètres.
</span></span><span id="29" class="l"><a class="l" href="#29"> 29: </a><span class="php-comment"> * Instancie la classe du script à lancer et appelle la méthode executer().
</span></span><span id="30" class="l"><a class="l" href="#30"> 30: </a><span class="php-comment"> * @return void
</span></span><span id="31" class="l"><a class="l" href="#31"> 31: </a><span class="php-comment"> */</span>
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_executer" href="#_executer">executer</a>() {
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a> <span class="php-keyword1">if</span> (<span class="php-var">$_SERVER</span>[<span class="php-quote">'argc'</span>] &lt; <span class="php-num">2</span>){
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Erreur: vous n'avez pas indiqué le nom du script. Voir '&quot;</span>.<span class="php-var">$_SERVER</span>[<span class="php-quote">'argv'</span>][<span class="php-num">0</span>].<span class="php-quote">&quot; help'.\n&quot;</span>, E_USER_ERROR);
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> }
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a>
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> <span class="php-comment">// Récupération de la ligne de commande</span>
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a> <span class="php-var">$argv</span> = <span class="php-var">$_SERVER</span>[<span class="php-quote">'argv'</span>];
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a> <span class="php-comment">// Nous dépilons le nom du fichier qui initialise le framework et appele cette méthode.</span>
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> <span class="php-keyword2">array_shift</span>(<span class="php-var">$argv</span>);
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a> <span class="php-comment">// Nous dépilons le nom du script à lancer</span>
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a> <span class="php-var">$script</span> = <span class="php-keyword2">array_shift</span>(<span class="php-var">$argv</span>);
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a> <span class="php-comment">// Récupération des paramètres d'execution du script</span>
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a> <span class="php-var">$parametres</span> = self::getParametres(<span class="php-var">$argv</span>);
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a>
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> <span class="php-comment">// Chargement du script à lancer</span>
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a> <span class="php-var">$Script</span> = Cli::charger(<span class="php-var">$script</span>, <span class="php-var">$parametres</span>);
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_null</span>(<span class="php-var">$Script</span>)) {
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-var">$Script</span>-&gt;executer();
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> }
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a>
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> <span class="php-comment">// Affichage des exceptions et erreurs générées par le script</span>
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a> <span class="php-keyword1">echo</span> GestionnaireException::getExceptions();
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a>
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> <span class="php-comment">// Fin d'execution</span>
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> <span class="php-keyword1">exit</span>(<span class="php-num">0</span>);
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> }
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a>
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_charger" href="#_charger">charger</a>(<span class="php-var">$script_nom</span>, <span class="php-var">$parametres</span>) {
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> <span class="php-var">$Script</span> = <span class="php-keyword1">null</span>;
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> Config::verifierPresenceParametres(self::<span class="php-var">$parametres_obligatoires</span>);
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a>
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">strpos</span>(<span class="php-var">$script_nom</span>, DS)) {
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-var">$decompoScriptNom</span> = <span class="php-keyword2">explode</span>(DS, <span class="php-var">$script_nom</span>);
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> <span class="php-var">$script_nom</span> = <span class="php-keyword2">array_pop</span>(<span class="php-var">$decompoScriptNom</span>);
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a> <span class="php-var">$dossier_nom</span> = <span class="php-keyword2">implode</span>(DS, <span class="php-var">$decompoScriptNom</span>);
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> } <span class="php-keyword1">else</span> {
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a> <span class="php-var">$dossier_nom</span> = <span class="php-keyword2">strtolower</span>(<span class="php-var">$script_nom</span>);
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> }
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a>
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a> <span class="php-var">$classe_nom</span> = self::obtenirNomClasse(<span class="php-var">$script_nom</span>);
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a> <span class="php-var">$fichier_script</span> = Config::get(<span class="php-quote">'chemin_modules'</span>).<span class="php-var">$dossier_nom</span>.DS.<span class="php-var">$classe_nom</span>.<span class="php-quote">'.php'</span>;
</span><span id="73" class="l"><a class="l" href="#73"> 73: </a>
</span><span id="74" class="l"><a class="l" href="#74"> 74: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">file_exists</span>(<span class="php-var">$fichier_script</span>)){
</span><span id="75" class="l"><a class="l" href="#75"> 75: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Erreur : script '</span><span class="php-var">$fichier_script</span><span class="php-quote">' inconnu!\n&quot;</span>, E_USER_ERROR);
</span><span id="76" class="l"><a class="l" href="#76"> 76: </a> } <span class="php-keyword1">else</span> {
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> <span class="php-keyword1">require_once</span> <span class="php-var">$fichier_script</span>;
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">class_exists</span>( <span class="php-var">$classe_nom</span>)) {
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Erreur: impossible de trouver la classe de la commande : </span><span class="php-var">$classe_nom</span><span class="php-quote">\n&quot;</span>, E_USER_ERROR);
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> } <span class="php-keyword1">else</span> {
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a> <span class="php-var">$Script</span> = <span class="php-keyword1">new</span> <span class="php-var">$classe_nom</span>(<span class="php-var">$script_nom</span>, <span class="php-var">$parametres</span>);
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> }
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a> }
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> <span class="php-keyword1">return</span> <span class="php-var">$Script</span>;
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a> }
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a>
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_obtenirNomClasse" href="#_obtenirNomClasse">obtenirNomClasse</a>(<span class="php-var">$script_nom</span>) {
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a> <span class="php-var">$nom_classe</span> = <span class="php-keyword2">implode</span>(<span class="php-quote">''</span>, <span class="php-keyword2">array_map</span>(<span class="php-quote">'ucfirst'</span>, <span class="php-keyword2">explode</span>(<span class="php-quote">'_'</span>, <span class="php-keyword2">strtolower</span>(<span class="php-var">$script_nom</span>))));
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a> <span class="php-keyword1">return</span> <span class="php-var">$nom_classe</span>;
</span><span id="90" class="l"><a class="l" href="#90"> 90: </a> }
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a>
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getParametres" href="#_getParametres">getParametres</a>(<span class="php-var">$argv</span>) {
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-var">$parametres</span> = <span class="php-keyword1">array</span>();
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> <span class="php-comment">// Récupération des options</span>
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> <span class="php-keyword1">while</span> (<span class="php-keyword2">count</span>(<span class="php-var">$argv</span>)) {
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$argv</span>[<span class="php-num">1</span>]) &amp;&amp; <span class="php-var">$argv</span>[<span class="php-num">1</span>]{<span class="php-num">0</span>} != <span class="php-quote">'-'</span>) {
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> <span class="php-var">$param</span> = <span class="php-keyword2">array_shift</span>(<span class="php-var">$argv</span>);
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-var">$parametres</span>[<span class="php-var">$param</span>] = <span class="php-keyword2">array_shift</span>(<span class="php-var">$argv</span>);
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> } <span class="php-keyword1">elseif</span> (!<span class="php-keyword1">isset</span>(<span class="php-var">$argv</span>[<span class="php-num">1</span>]) || <span class="php-var">$argv</span>[<span class="php-num">1</span>]{<span class="php-num">0</span>} == <span class="php-quote">'-'</span>) {
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-var">$parametres</span>[<span class="php-keyword2">array_shift</span>(<span class="php-var">$argv</span>)] = <span class="php-keyword1">null</span>;
</span><span id="101" class="l"><a class="l" href="#101">101: </a> } <span class="php-keyword1">else</span> {
</span><span id="102" class="l"><a class="l" href="#102">102: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Erreur: valeur manquante pour le paramêtre '&quot;</span>.<span class="php-var">$argv</span>[<span class="php-num">0</span>].<span class="php-quote">&quot;' \n&quot;</span>, E_USER_ERROR);
</span><span id="103" class="l"><a class="l" href="#103">103: </a> }
</span><span id="104" class="l"><a class="l" href="#104">104: </a> }
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-keyword1">return</span> <span class="php-var">$parametres</span>;
</span><span id="106" class="l"><a class="l" href="#106">106: </a> }
</span><span id="107" class="l"><a class="l" href="#107">107: </a>}
</span><span id="108" class="l"><a class="l" href="#108">108: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-RestClient.html
New file
0,0 → 1,276
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File RestClient.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li class="active"><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-RestClient.html" title="Summary of RestClient"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment">* Classe client permettant d'interroger des services web REST.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment">*
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment">* @category php 5.2
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment">* @package Framework
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment">* @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment">* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment">* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment">* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment">* @version $Id: RestClient.php 353 2011-08-01 16:02:32Z jpm $
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment">*/</span>
</span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-keyword1">class</span> <a id="RestClient" href="#RestClient">RestClient</a> {
</span><span id="15" class="l"><a class="l" href="#15"> 15: </a> <span class="php-keyword1">const</span> <a id="HTTP_URL_REQUETE_SEPARATEUR" href="#HTTP_URL_REQUETE_SEPARATEUR">HTTP_URL_REQUETE_SEPARATEUR</a> = <span class="php-quote">'&amp;'</span>;
</span><span id="16" class="l"><a class="l" href="#16"> 16: </a> <span class="php-keyword1">const</span> <a id="HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR" href="#HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR">HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR</a> = <span class="php-quote">'='</span>;
</span><span id="17" class="l"><a class="l" href="#17"> 17: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$http_methodes" href="#$http_methodes">$http_methodes</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'GET'</span>, <span class="php-quote">'POST'</span>, <span class="php-quote">'PUT'</span>, <span class="php-quote">'DELETE'</span>, <span class="php-quote">'HEAD'</span>, <span class="php-quote">'OPTIONS'</span>, <span class="php-quote">'CONNECT'</span>, <span class="php-quote">'TRACE'</span>);
</span><span id="18" class="l"><a class="l" href="#18"> 18: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$parametres" href="#$parametres">$parametres</a></span> = <span class="php-keyword1">null</span>;
</span><span id="19" class="l"><a class="l" href="#19"> 19: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$url" href="#$url">$url</a></span> = <span class="php-keyword1">null</span>;
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$reponse_entetes" href="#$reponse_entetes">$reponse_entetes</a></span> = <span class="php-keyword1">null</span>;
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a>
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a> <span class="php-comment">//+----------------------------------------------------------------------------------------------------------------+</span>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> <span class="php-comment">// ACCESSEURS</span>
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a>
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getReponseEntetes" href="#_getReponseEntetes">getReponseEntetes</a>() {
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;reponse_entetes;
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a> }
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a>
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getParametre" href="#_getParametre">getParametre</a>(<span class="php-var">$cle</span>) {
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a> <span class="php-var">$valeur</span> = (<span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;parametres[<span class="php-var">$cle</span>])) ? <span class="php-var">$this</span>-&gt;parametres[<span class="php-var">$cle</span>] : <span class="php-keyword1">null</span>;
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> <span class="php-keyword1">return</span> <span class="php-var">$valeur</span>;
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> }
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a>
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_ajouterParametre" href="#_ajouterParametre">ajouterParametre</a>(<span class="php-var">$cle</span>, <span class="php-var">$valeur</span>) {
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-var">$this</span>-&gt;parametres[<span class="php-var">$cle</span>] = <span class="php-var">$valeur</span>;
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a> }
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a>
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_supprimerParametre" href="#_supprimerParametre">supprimerParametre</a>(<span class="php-var">$cle</span>) {
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a> <span class="php-keyword1">unset</span>(<span class="php-var">$this</span>-&gt;parametres[<span class="php-var">$cle</span>]);
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> }
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a>
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_nettoyerParametres" href="#_nettoyerParametres">nettoyerParametres</a>() {
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a> <span class="php-var">$this</span>-&gt;parametres = <span class="php-keyword1">null</span>;
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a> }
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a>
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> <span class="php-comment">//+----------------------------------------------------------------------------------------------------------------+</span>
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a> <span class="php-comment">// MÉTHODES</span>
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a>
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_consulter" href="#_consulter">consulter</a>(<span class="php-var">$url</span>) {
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;envoyerRequete(<span class="php-var">$url</span>, <span class="php-quote">'GET'</span>);
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> }
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a>
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_ajouter" href="#_ajouter">ajouter</a>(<span class="php-var">$url</span>, <span class="php-keyword1">Array</span> <span class="php-var">$donnees</span>) {
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;envoyerRequete(<span class="php-var">$url</span>, <span class="php-quote">'PUT'</span>, <span class="php-var">$donnees</span>);
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> }
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a>
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_modifier" href="#_modifier">modifier</a>(<span class="php-var">$url</span>, <span class="php-keyword1">Array</span> <span class="php-var">$donnees</span>) {
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;envoyerRequete(<span class="php-var">$url</span>, <span class="php-quote">'POST'</span>, <span class="php-var">$donnees</span>);
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> }
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a>
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_supprimer" href="#_supprimer">supprimer</a>(<span class="php-var">$url</span>) {
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;envoyerRequete(<span class="php-var">$url</span>, <span class="php-quote">'DELETE'</span>);
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> }
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a>
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_envoyerRequete" href="#_envoyerRequete">envoyerRequete</a>(<span class="php-var">$url</span>, <span class="php-var">$mode</span>, <span class="php-keyword1">Array</span> <span class="php-var">$donnees</span> = <span class="php-keyword1">array</span>()) {
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a> <span class="php-var">$this</span>-&gt;url = <span class="php-var">$url</span>;
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a> <span class="php-var">$contenu</span> = <span class="php-keyword1">false</span>;
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a> <span class="php-keyword1">if</span> (! <span class="php-keyword2">in_array</span>(<span class="php-var">$mode</span>, <span class="php-var">$this</span>-&gt;http_methodes)) {
</span><span id="73" class="l"><a class="l" href="#73"> 73: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Le mode de requête '</span><span class="php-var">$mode</span><span class="php-quote">' n'est pas accepté!&quot;</span>;
</span><span id="74" class="l"><a class="l" href="#74"> 74: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_WARNING);
</span><span id="75" class="l"><a class="l" href="#75"> 75: </a> } <span class="php-keyword1">else</span> {
</span><span id="76" class="l"><a class="l" href="#76"> 76: </a> <span class="php-keyword1">if</span> (<span class="php-var">$mode</span> == <span class="php-quote">'GET'</span>) {
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> <span class="php-var">$this</span>-&gt;traiterUrlParametres();
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> }
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> <span class="php-var">$content</span> = <span class="php-keyword2">http_build_query</span>(<span class="php-var">$donnees</span>, <span class="php-keyword1">null</span>, self::HTTP_URL_REQUETE_SEPARATEUR);
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> <span class="php-var">$contexte</span> = <span class="php-keyword2">stream_context_create</span>(<span class="php-keyword1">array</span>(
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a> <span class="php-quote">'http'</span> =&gt; <span class="php-keyword1">array</span>(
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> <span class="php-quote">'method'</span> =&gt; <span class="php-var">$mode</span>,
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a> <span class="php-quote">'header'</span> =&gt; <span class="php-quote">&quot;Content-type: application/x-www-form-urlencoded\r\n&quot;</span>,
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> <span class="php-quote">'content'</span> =&gt; <span class="php-var">$content</span>)));
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a> <span class="php-var">$flux</span> = @<span class="php-keyword2">fopen</span>(<span class="php-var">$this</span>-&gt;url, <span class="php-quote">'r'</span>, <span class="php-keyword1">false</span>, <span class="php-var">$contexte</span>);
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a> <span class="php-keyword1">if</span> (!<span class="php-var">$flux</span>) {
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-var">$this</span>-&gt;reponse_entetes = <span class="php-var">$http_response_header</span>;
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a> <span class="php-var">$entetesFmt</span> = <span class="php-keyword2">print_r</span>(<span class="php-var">$this</span>-&gt;analyserEntete(), <span class="php-keyword1">true</span>);
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;L'ouverture de l'url '</span><span class="php-var">{$this-&gt;url}</span><span class="php-quote">' par la méthode HTTP '</span><span class="php-var">$mode</span><span class="php-quote">' a échoué!\n&quot;</span>.
</span><span id="90" class="l"><a class="l" href="#90"> 90: </a> <span class="php-quote">&quot;Le contenu des métadonnées était : </span><span class="php-var">$entetesFmt</span><span class="php-quote"> \n&quot;</span>.
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> <span class="php-quote">&quot;Les paramètres de la requête HTTP étaient : </span><span class="php-var">$content</span><span class="php-quote"> \n&quot;</span>.
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> <span class="php-quote">&quot;Le contenu était : &quot;</span>.<span class="php-keyword2">stream_get_contents</span>(<span class="php-var">$flux</span>);
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_WARNING);
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> } <span class="php-keyword1">else</span> {
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> <span class="php-comment">// Informations sur les en-têtes et métadonnées du flux</span>
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> <span class="php-var">$this</span>-&gt;reponse_entetes = <span class="php-keyword2">stream_get_meta_data</span>(<span class="php-var">$flux</span>);
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a>
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-comment">// Contenu actuel de $url</span>
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> <span class="php-var">$contenu</span> = <span class="php-keyword2">stream_get_contents</span>(<span class="php-var">$flux</span>);
</span><span id="100" class="l"><a class="l" href="#100">100: </a>
</span><span id="101" class="l"><a class="l" href="#101">101: </a> <span class="php-keyword2">fclose</span>(<span class="php-var">$flux</span>);
</span><span id="102" class="l"><a class="l" href="#102">102: </a> }
</span><span id="103" class="l"><a class="l" href="#103">103: </a> <span class="php-var">$this</span>-&gt;traiterEntete();
</span><span id="104" class="l"><a class="l" href="#104">104: </a> }
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-var">$this</span>-&gt;reinitialiser();
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-keyword1">return</span> <span class="php-var">$contenu</span>;
</span><span id="107" class="l"><a class="l" href="#107">107: </a> }
</span><span id="108" class="l"><a class="l" href="#108">108: </a>
</span><span id="109" class="l"><a class="l" href="#109">109: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_traiterUrlParametres" href="#_traiterUrlParametres">traiterUrlParametres</a>() {
</span><span id="110" class="l"><a class="l" href="#110">110: </a> <span class="php-var">$parametres</span> = <span class="php-keyword1">array</span>();
</span><span id="111" class="l"><a class="l" href="#111">111: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(<span class="php-var">$this</span>-&gt;parametres) &gt; <span class="php-num">0</span>) {
</span><span id="112" class="l"><a class="l" href="#112">112: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$this</span>-&gt;parametres <span class="php-keyword1">as</span> <span class="php-var">$cle</span> =&gt; <span class="php-var">$valeur</span>) {
</span><span id="113" class="l"><a class="l" href="#113">113: </a> <span class="php-var">$cle</span> = <span class="php-keyword2">rawurlencode</span>(<span class="php-var">$cle</span>);
</span><span id="114" class="l"><a class="l" href="#114">114: </a> <span class="php-var">$valeur</span> = <span class="php-keyword2">rawurlencode</span>(<span class="php-var">$valeur</span>);
</span><span id="115" class="l"><a class="l" href="#115">115: </a> <span class="php-var">$parametres</span>[] = <span class="php-var">$cle</span>.self::HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR.<span class="php-var">$valeur</span>;
</span><span id="116" class="l"><a class="l" href="#116">116: </a> }
</span><span id="117" class="l"><a class="l" href="#117">117: </a> <span class="php-var">$url_parametres</span> = <span class="php-keyword2">implode</span>(self::HTTP_URL_REQUETE_SEPARATEUR, <span class="php-var">$parametres</span>);
</span><span id="118" class="l"><a class="l" href="#118">118: </a> <span class="php-var">$this</span>-&gt;url = <span class="php-var">$this</span>-&gt;url.<span class="php-quote">'?'</span>.<span class="php-var">$url_parametres</span>;
</span><span id="119" class="l"><a class="l" href="#119">119: </a> }
</span><span id="120" class="l"><a class="l" href="#120">120: </a> }
</span><span id="121" class="l"><a class="l" href="#121">121: </a>
</span><span id="122" class="l"><a class="l" href="#122">122: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_traiterEntete" href="#_traiterEntete">traiterEntete</a>() {
</span><span id="123" class="l"><a class="l" href="#123">123: </a> <span class="php-var">$infos</span> = <span class="php-var">$this</span>-&gt;analyserEntete();
</span><span id="124" class="l"><a class="l" href="#124">124: </a> <span class="php-var">$this</span>-&gt;traiterEnteteDebogage(<span class="php-var">$infos</span>);
</span><span id="125" class="l"><a class="l" href="#125">125: </a> }
</span><span id="126" class="l"><a class="l" href="#126">126: </a>
</span><span id="127" class="l"><a class="l" href="#127">127: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_analyserEntete" href="#_analyserEntete">analyserEntete</a>() {
</span><span id="128" class="l"><a class="l" href="#128">128: </a> <span class="php-var">$entetes</span> = <span class="php-var">$this</span>-&gt;reponse_entetes;
</span><span id="129" class="l"><a class="l" href="#129">129: </a> <span class="php-var">$infos</span> = <span class="php-keyword1">array</span>(<span class="php-quote">'date'</span> =&gt; <span class="php-keyword1">null</span>, <span class="php-quote">'uri'</span> =&gt; <span class="php-var">$this</span>-&gt;url, <span class="php-quote">'debogages'</span> =&gt; <span class="php-keyword1">null</span>);
</span><span id="130" class="l"><a class="l" href="#130">130: </a>
</span><span id="131" class="l"><a class="l" href="#131">131: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$entetes</span>[<span class="php-quote">'wrapper_data'</span>])) {
</span><span id="132" class="l"><a class="l" href="#132">132: </a> <span class="php-var">$entetes</span> = <span class="php-var">$entetes</span>[<span class="php-quote">'wrapper_data'</span>];
</span><span id="133" class="l"><a class="l" href="#133">133: </a> }
</span><span id="134" class="l"><a class="l" href="#134">134: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$entetes</span> <span class="php-keyword1">as</span> <span class="php-var">$entete</span>) {
</span><span id="135" class="l"><a class="l" href="#135">135: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">preg_match</span>(<span class="php-quote">'/^X_REST_DEBOGAGE_MESSAGES: (.+)$/'</span>, <span class="php-var">$entete</span>, <span class="php-var">$match</span>)) {
</span><span id="136" class="l"><a class="l" href="#136">136: </a> <span class="php-var">$infos</span>[<span class="php-quote">'debogages'</span>] = <span class="php-keyword2">json_decode</span>(<span class="php-var">$match</span>[<span class="php-num">1</span>]);
</span><span id="137" class="l"><a class="l" href="#137">137: </a> }
</span><span id="138" class="l"><a class="l" href="#138">138: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">preg_match</span>(<span class="php-quote">'/^Date: .+ ([012][0-9]:[012345][0-9]:[012345][0-9]) .*$/'</span>, <span class="php-var">$entete</span>, <span class="php-var">$match</span>)) {
</span><span id="139" class="l"><a class="l" href="#139">139: </a> <span class="php-var">$infos</span>[<span class="php-quote">'date'</span>] = <span class="php-var">$match</span>[<span class="php-num">1</span>];
</span><span id="140" class="l"><a class="l" href="#140">140: </a> }
</span><span id="141" class="l"><a class="l" href="#141">141: </a> }
</span><span id="142" class="l"><a class="l" href="#142">142: </a> <span class="php-keyword1">return</span> <span class="php-var">$infos</span>;
</span><span id="143" class="l"><a class="l" href="#143">143: </a> }
</span><span id="144" class="l"><a class="l" href="#144">144: </a>
</span><span id="145" class="l"><a class="l" href="#145">145: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_traiterEnteteDebogage" href="#_traiterEnteteDebogage">traiterEnteteDebogage</a>(<span class="php-var">$entetes_analyses</span>) {
</span><span id="146" class="l"><a class="l" href="#146">146: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$entetes</span>[<span class="php-quote">'debogages'</span>])) {
</span><span id="147" class="l"><a class="l" href="#147">147: </a> <span class="php-var">$date</span> = <span class="php-var">$entetes</span>[<span class="php-quote">'date'</span>];
</span><span id="148" class="l"><a class="l" href="#148">148: </a> <span class="php-var">$uri</span> = <span class="php-var">$entetes</span>[<span class="php-quote">'uri'</span>];
</span><span id="149" class="l"><a class="l" href="#149">149: </a> <span class="php-var">$debogages</span> = <span class="php-var">$entetes</span>[<span class="php-quote">'debogages'</span>];
</span><span id="150" class="l"><a class="l" href="#150">150: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$debogages</span> <span class="php-keyword1">as</span> <span class="php-var">$debogage</span>) {
</span><span id="151" class="l"><a class="l" href="#151">151: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;DEBOGAGE : </span><span class="php-var">$date</span><span class="php-quote"> - </span><span class="php-var">$uri</span><span class="php-quote"> :\n</span><span class="php-var">$debogage</span><span class="php-quote">&quot;</span>;
</span><span id="152" class="l"><a class="l" href="#152">152: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_NOTICE);
</span><span id="153" class="l"><a class="l" href="#153">153: </a> }
</span><span id="154" class="l"><a class="l" href="#154">154: </a> }
</span><span id="155" class="l"><a class="l" href="#155">155: </a> }
</span><span id="156" class="l"><a class="l" href="#156">156: </a>
</span><span id="157" class="l"><a class="l" href="#157">157: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_reinitialiser" href="#_reinitialiser">reinitialiser</a>() {
</span><span id="158" class="l"><a class="l" href="#158">158: </a> <span class="php-var">$this</span>-&gt;nettoyerParametres();
</span><span id="159" class="l"><a class="l" href="#159">159: </a> }
</span><span id="160" class="l"><a class="l" href="#160">160: </a></span>}</code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-CacheSimple.html
New file
0,0 → 1,240
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File CacheSimple.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li class="active"><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-CacheSimple.html" title="Summary of CacheSimple"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe Cache permettant de mettre en cache des données de façon extremement simple.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * Le cache est stocker dans des fichiers textes.
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * Le contrôle de la durée de vie du cache se fait avec la fonction PHP filemtime.
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * Si la durée de vie du cache est modifiée dans le constructeur ou le fichier de config, alors la durée de vie de l'ensemble
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * des fichiers de cache est modifiée en conséquence.
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * Les clés pour le tableau des options et les valeurs par défaut sont indiquées dans l'attribut options de la classe.
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> *
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @category php 5.2
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @package Framework
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @author Aurélien PERONNET &lt;aurelien@tela-botanica.org&gt;
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * @license http://framework.zend.com/license/new-bsd Licence New BSD
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
</span></span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
</span></span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-comment"> * @version $Id: CacheSimple.php 435 2013-09-04 14:29:43Z jpm $
</span></span><span id="20" class="l"><a class="l" href="#20"> 20: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="21" class="l"><a class="l" href="#21"> 21: </a><span class="php-comment"> */</span>
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a><span class="php-comment">// TODO : voir ce qui est le plus pratique : error_log ou le gestionnaire de bogue du framework</span>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a><span class="php-keyword1">class</span> <a id="CacheSimple" href="#CacheSimple">CacheSimple</a> {
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a>
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$mise_en_cache" href="#$mise_en_cache">$mise_en_cache</a></span> = <span class="php-keyword1">null</span>;
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$stockage_chemin" href="#$stockage_chemin">$stockage_chemin</a></span> = <span class="php-keyword1">null</span>;
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$duree_de_vie" href="#$duree_de_vie">$duree_de_vie</a></span> = <span class="php-keyword1">null</span>;
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a>
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$options" href="#$options">$options</a></span> = <span class="php-keyword1">array</span>(
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a> <span class="php-quote">'mise_en_cache'</span> =&gt; <span class="php-quote">'true'</span>,
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> <span class="php-quote">'stockage_chemin'</span> =&gt; <span class="php-quote">'Fichier::getDossierTmp()'</span>,
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-quote">'duree_de_vie'</span> =&gt; <span class="php-quote">'3600*24'</span>
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a> );
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a>
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>(<span class="php-var">$options</span> = <span class="php-keyword1">array</span>()) {
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a> <span class="php-keyword2">extract</span>(<span class="php-var">$options</span>);
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> <span class="php-var">$this</span>-&gt;mise_en_cache = <span class="php-keyword2">is_bool</span>(<span class="php-var">$mise_en_cache</span>) ? <span class="php-var">$mise_en_cache</span> : <span class="php-keyword1">true</span>;
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a>
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;mise_en_cache) {
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> <span class="php-var">$this</span>-&gt;stockage_chemin = <span class="php-keyword1">isset</span>(<span class="php-var">$stockage_chemin</span>) ? <span class="php-keyword2">realpath</span>(<span class="php-var">$stockage_chemin</span>) : Fichier::getDossierTmp();
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">realpath</span>(<span class="php-var">$stockage_chemin</span>)) {
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a> <span class="php-keyword2">error_log</span>(<span class="php-keyword2">sprintf</span>(<span class="php-quote">&quot;%s: Attention, %s invalide: creation [%s]&quot;</span>,
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a> __FILE__,
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a> <span class="php-var">$stockage_chemin</span>,
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a> <span class="php-var">$_SERVER</span>[<span class="php-quote">'REQUEST_URI'</span>]));
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> <span class="php-keyword2">mkdir</span>(<span class="php-var">$stockage_chemin</span>, <span class="php-num">0755</span>, <span class="php-keyword1">TRUE</span>);
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a> }
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">realpath</span>(<span class="php-var">$stockage_chemin</span>)) {
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-keyword2">error_log</span>(<span class="php-keyword2">sprintf</span>(<span class="php-quote">&quot;%s: Attention, realpath(%s) invalide [%s]&quot;</span>,
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> __FILE__,
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a> <span class="php-var">$stockage_chemin</span>,
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> <span class="php-var">$_SERVER</span>[<span class="php-quote">'REQUEST_URI'</span>]));
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span>(!<span class="php-keyword2">is_writable</span>(<span class="php-keyword2">realpath</span>(<span class="php-var">$stockage_chemin</span>))) {
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> <span class="php-keyword2">error_log</span>(<span class="php-keyword2">sprintf</span>(<span class="php-quote">&quot;%s: Attention, realpath(%s) non-inscriptible [%s]&quot;</span>,
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> __FILE__,
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> <span class="php-keyword2">realpath</span>(<span class="php-var">$stockage_chemin</span>),
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> <span class="php-var">$_SERVER</span>[<span class="php-quote">'REQUEST_URI'</span>]));
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> } <span class="php-keyword1">else</span> {
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-var">$this</span>-&gt;duree_de_vie = <span class="php-keyword1">isset</span>(<span class="php-var">$duree_de_vie</span>) ? <span class="php-var">$duree_de_vie</span> : <span class="php-num">3600</span>*<span class="php-num">24</span>;
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> }
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> }
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> }
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a>
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_initialiserOptionsParConfig" href="#_initialiserOptionsParConfig">initialiserOptionsParConfig</a>() {
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> <span class="php-keyword1">while</span> (<span class="php-keyword1">list</span>(<span class="php-var">$nom</span>, <span class="php-var">$valeur</span>) = <span class="php-keyword2">each</span>(<span class="php-var">$this</span>-&gt;options)) {
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a> <span class="php-keyword1">if</span> (Config::existe(<span class="php-var">$nom</span>)) {
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> <span class="php-var">$this</span>-&gt;<span class="php-var">$nom</span> = Config::get(<span class="php-var">$nom</span>);
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a> }
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> }
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a> }
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a>
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a> <span class="php-comment">/**
</span></span><span id="73" class="l"><a class="l" href="#73"> 73: </a><span class="php-comment"> * Teste si le cache est disponible pour l'id donné et (si oui) le retourne (sinon renvoie false)
</span></span><span id="74" class="l"><a class="l" href="#74"> 74: </a><span class="php-comment"> *
</span></span><span id="75" class="l"><a class="l" href="#75"> 75: </a><span class="php-comment"> * @param string $id l'identifiant du Cache.
</span></span><span id="76" class="l"><a class="l" href="#76"> 76: </a><span class="php-comment"> * @return string|false les données en cache.
</span></span><span id="77" class="l"><a class="l" href="#77"> 77: </a><span class="php-comment"> */</span>
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_charger" href="#_charger">charger</a>(<span class="php-var">$id</span>) {
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> <span class="php-var">$contenu</span> = <span class="php-keyword1">false</span>;
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;mise_en_cache) {
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a> <span class="php-var">$chemin_fichier_cache</span> = <span class="php-var">$this</span>-&gt;stockage_chemin.DS.<span class="php-var">$id</span>.<span class="php-quote">'.txt'</span>;
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">file_exists</span>(<span class="php-var">$chemin_fichier_cache</span> ) &amp;&amp; (<span class="php-keyword2">time</span>() - @<span class="php-keyword2">filemtime</span>(<span class="php-var">$chemin_fichier_cache</span>) &lt; <span class="php-var">$this</span>-&gt;duree_de_vie)) {
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a> <span class="php-var">$contenu</span> = <span class="php-keyword2">file_get_contents</span>(<span class="php-var">$chemin_fichier_cache</span>);
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> }
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a> }
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a> <span class="php-keyword1">return</span> <span class="php-var">$contenu</span>;
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> }
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a>
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a> <span class="php-comment">/**
</span></span><span id="90" class="l"><a class="l" href="#90"> 90: </a><span class="php-comment"> * Sauvegarde la chaine de données dans un fichier texte.
</span></span><span id="91" class="l"><a class="l" href="#91"> 91: </a><span class="php-comment"> *
</span></span><span id="92" class="l"><a class="l" href="#92"> 92: </a><span class="php-comment"> * Note : $contenu est toujours de type &quot;string&quot;. C'est à vous de gérer la sérialisation.
</span></span><span id="93" class="l"><a class="l" href="#93"> 93: </a><span class="php-comment"> *
</span></span><span id="94" class="l"><a class="l" href="#94"> 94: </a><span class="php-comment"> * @param string $contenu les données à mettre en cache.
</span></span><span id="95" class="l"><a class="l" href="#95"> 95: </a><span class="php-comment"> * @param string $id l'identifiant du Cache.
</span></span><span id="96" class="l"><a class="l" href="#96"> 96: </a><span class="php-comment"> * @return boolean true si aucun problème
</span></span><span id="97" class="l"><a class="l" href="#97"> 97: </a><span class="php-comment"> */</span>
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_sauver" href="#_sauver">sauver</a>(<span class="php-var">$contenu</span>, <span class="php-var">$id</span>) {
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> <span class="php-var">$ok</span> = <span class="php-keyword1">false</span>;
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;mise_en_cache) {
</span><span id="101" class="l"><a class="l" href="#101">101: </a> <span class="php-var">$chemin_fichier_cache</span> = <span class="php-var">$this</span>-&gt;stockage_chemin.DS.<span class="php-var">$id</span>.<span class="php-quote">'.txt'</span>;
</span><span id="102" class="l"><a class="l" href="#102">102: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">file_exists</span>(<span class="php-var">$chemin_fichier_cache</span>) || (<span class="php-keyword2">time</span>() - @<span class="php-keyword2">filemtime</span>(<span class="php-var">$chemin_fichier_cache</span>) &gt; <span class="php-var">$this</span>-&gt;duree_de_vie)) {
</span><span id="103" class="l"><a class="l" href="#103">103: </a> <span class="php-var">$dossier_fichier_cache</span> = <span class="php-keyword2">dirname</span>(<span class="php-var">$chemin_fichier_cache</span>);
</span><span id="104" class="l"><a class="l" href="#104">104: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_dir</span>(<span class="php-var">$dossier_fichier_cache</span>))
</span><span id="105" class="l"><a class="l" href="#105">105: </a> {
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-keyword2">mkdir</span>(<span class="php-var">$dossier_fichier_cache</span>, <span class="php-num">0755</span>, <span class="php-keyword1">true</span>);
</span><span id="107" class="l"><a class="l" href="#107">107: </a> }
</span><span id="108" class="l"><a class="l" href="#108">108: </a>
</span><span id="109" class="l"><a class="l" href="#109">109: </a> <span class="php-var">$fh</span> = <span class="php-keyword2">fopen</span>(<span class="php-var">$chemin_fichier_cache</span>,<span class="php-quote">'w+'</span>);
</span><span id="110" class="l"><a class="l" href="#110">110: </a> <span class="php-keyword1">if</span> (<span class="php-var">$fh</span>) {
</span><span id="111" class="l"><a class="l" href="#111">111: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">fwrite</span>(<span class="php-var">$fh</span>, <span class="php-var">$contenu</span>)) {
</span><span id="112" class="l"><a class="l" href="#112">112: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">fclose</span>(<span class="php-var">$fh</span>)) {
</span><span id="113" class="l"><a class="l" href="#113">113: </a> <span class="php-var">$ok</span> = <span class="php-keyword1">true</span>;
</span><span id="114" class="l"><a class="l" href="#114">114: </a> }
</span><span id="115" class="l"><a class="l" href="#115">115: </a> }
</span><span id="116" class="l"><a class="l" href="#116">116: </a> <span class="php-comment">// Voir #ZF-4422 pour la raison de l'utilisation de octdec()</span>
</span><span id="117" class="l"><a class="l" href="#117">117: </a> @<span class="php-keyword2">chmod</span>(<span class="php-var">$chemin_fichier_cache</span>, <span class="php-keyword2">octdec</span>(<span class="php-quote">'0777'</span>));
</span><span id="118" class="l"><a class="l" href="#118">118: </a> }
</span><span id="119" class="l"><a class="l" href="#119">119: </a> }
</span><span id="120" class="l"><a class="l" href="#120">120: </a> }
</span><span id="121" class="l"><a class="l" href="#121">121: </a> <span class="php-keyword1">return</span> <span class="php-var">$ok</span>;
</span><span id="122" class="l"><a class="l" href="#122">122: </a> }
</span><span id="123" class="l"><a class="l" href="#123">123: </a>}
</span><span id="124" class="l"><a class="l" href="#124">124: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-RestClient.html
New file
0,0 → 1,538
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class RestClient | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li class="active"><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class RestClient</h1>
 
 
<div class="description">
<p>Classe client permettant d'interroger des services web REST.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
php 5.2<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: RestClient.php 353 2011-08-01 16:02:32Z jpm $<br>
<b>Located at</b> <a href="source-class-RestClient.html#3-160" title="Go to source code">RestClient.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="getReponseEntetes" id="_getReponseEntetes">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getReponseEntetes">#</a>
<code><a href="source-class-RestClient.html#25-27" title="Go to source code">getReponseEntetes</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getParametre" id="_getParametre">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getParametre">#</a>
<code><a href="source-class-RestClient.html#29-32" title="Go to source code">getParametre</a>( <span>mixed <var>$cle</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="ajouterParametre" id="_ajouterParametre">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_ajouterParametre">#</a>
<code><a href="source-class-RestClient.html#34-36" title="Go to source code">ajouterParametre</a>( <span>mixed <var>$cle</var></span>, <span>mixed <var>$valeur</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimerParametre" id="_supprimerParametre">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimerParametre">#</a>
<code><a href="source-class-RestClient.html#38-40" title="Go to source code">supprimerParametre</a>( <span>mixed <var>$cle</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="nettoyerParametres" id="_nettoyerParametres">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_nettoyerParametres">#</a>
<code><a href="source-class-RestClient.html#42-44" title="Go to source code">nettoyerParametres</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="consulter" id="_consulter">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_consulter">#</a>
<code><a href="source-class-RestClient.html#49-52" title="Go to source code">consulter</a>( <span>mixed <var>$url</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="ajouter" id="_ajouter">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_ajouter">#</a>
<code><a href="source-class-RestClient.html#54-57" title="Go to source code">ajouter</a>( <span>mixed <var>$url</var></span>, <span>array <var>$donnees</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="modifier" id="_modifier">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_modifier">#</a>
<code><a href="source-class-RestClient.html#59-62" title="Go to source code">modifier</a>( <span>mixed <var>$url</var></span>, <span>array <var>$donnees</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimer" id="_supprimer">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimer">#</a>
<code><a href="source-class-RestClient.html#64-67" title="Go to source code">supprimer</a>( <span>mixed <var>$url</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="envoyerRequete" id="_envoyerRequete">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_envoyerRequete">#</a>
<code><a href="source-class-RestClient.html#69-107" title="Go to source code">envoyerRequete</a>( <span>mixed <var>$url</var></span>, <span>mixed <var>$mode</var></span>, <span>array <var>$donnees</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
<table class="summary" id="constants">
<caption>Constants summary</caption>
<tr data-order="HTTP_URL_REQUETE_SEPARATEUR" id="HTTP_URL_REQUETE_SEPARATEUR">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestClient.html#15" title="Go to source code"><b>HTTP_URL_REQUETE_SEPARATEUR</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'&amp;'</span></code></td>
<td class="description"><div>
<a href="#HTTP_URL_REQUETE_SEPARATEUR" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
<tr data-order="HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR" id="HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestClient.html#16" title="Go to source code"><b>HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'='</span></code></td>
<td class="description"><div>
<a href="#HTTP_URL_REQUETE_CLE_VALEUR_SEPARATEUR" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="parametres" id="$parametres">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-RestClient.html#18" title="Go to source code"><var>$parametres</var></a>
</td>
<td class="value"><code><span class="php-keyword1">null</span></code></td>
<td class="description"><div>
<a href="#$parametres" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/package-PHP.html
New file
0,0 → 1,113
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Package PHP | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li class="active"><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
 
 
 
<h3>Exceptions</h3>
<ul>
<li><a href="class-Exception.html">Exception</a></li>
</ul>
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li class="active">
<span>Package</span> </li>
<li>
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="package">
<h1>Package PHP</h1>
 
 
 
 
 
 
<table class="summary" id="exceptions">
<caption>Exceptions summary</caption>
<tr>
<td class="name"><a href="class-Exception.html">Exception</a></td>
<td></td>
</tr>
</table>
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-SquelettePhp.html
New file
0,0 → 1,189
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File SquelettePhp.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li class="active"><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-SquelettePhp.html" title="Summary of SquelettePhp"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe SquelettePhp, traitant les squelette Php utilisant la syntaxe courte php ou pas.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * Ces méthodes sont statiques.
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> *
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * @category php5
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @package Framework
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="10" class="l"><a class="l" href="#10">10: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="11" class="l"><a class="l" href="#11">11: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
</span></span><span id="12" class="l"><a class="l" href="#12">12: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
</span></span><span id="13" class="l"><a class="l" href="#13">13: </a><span class="php-comment"> * @version $Id: SquelettePhp.php 241 2010-12-06 15:19:07Z jpm $
</span></span><span id="14" class="l"><a class="l" href="#14">14: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="15" class="l"><a class="l" href="#15">15: </a><span class="php-comment"> */</span>
</span><span id="16" class="l"><a class="l" href="#16">16: </a><span class="php-keyword1">class</span> <a id="SquelettePhp" href="#SquelettePhp">SquelettePhp</a> {
</span><span id="17" class="l"><a class="l" href="#17">17: </a>
</span><span id="18" class="l"><a class="l" href="#18">18: </a> <span class="php-comment">/**
</span></span><span id="19" class="l"><a class="l" href="#19">19: </a><span class="php-comment"> * Fonction prenant en paramètre un chemin de fichier squelette et un tableau associatif de données,
</span></span><span id="20" class="l"><a class="l" href="#20">20: </a><span class="php-comment"> * en extrait les variables, charge le squelette et retourne le résultat des deux combinés.
</span></span><span id="21" class="l"><a class="l" href="#21">21: </a><span class="php-comment"> *
</span></span><span id="22" class="l"><a class="l" href="#22">22: </a><span class="php-comment"> * @param String $fichier le chemin du fichier du squelette
</span></span><span id="23" class="l"><a class="l" href="#23">23: </a><span class="php-comment"> * @param Array $donnees un tableau associatif contenant les variables a injecter dans le squelette.
</span></span><span id="24" class="l"><a class="l" href="#24">24: </a><span class="php-comment"> * @return boolean false si la vue n'existe pas, sinon la chaine résultat.
</span></span><span id="25" class="l"><a class="l" href="#25">25: </a><span class="php-comment"> */</span>
</span><span id="26" class="l"><a class="l" href="#26">26: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_analyser" href="#_analyser">analyser</a>(<span class="php-var">$fichier</span>, <span class="php-keyword1">Array</span> &amp;<span class="php-var">$donnees</span> = <span class="php-keyword1">array</span>()) {
</span><span id="27" class="l"><a class="l" href="#27">27: </a> <span class="php-var">$sortie</span> = <span class="php-keyword1">false</span>;
</span><span id="28" class="l"><a class="l" href="#28">28: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">file_exists</span>(<span class="php-var">$fichier</span>)) {
</span><span id="29" class="l"><a class="l" href="#29">29: </a> <span class="php-comment">// Extraction des variables du tableau de données</span>
</span><span id="30" class="l"><a class="l" href="#30">30: </a> <span class="php-keyword2">extract</span>(<span class="php-var">$donnees</span>);
</span><span id="31" class="l"><a class="l" href="#31">31: </a>
</span><span id="32" class="l"><a class="l" href="#32">32: </a> <span class="php-comment">// Démarage de la bufferisation de sortie</span>
</span><span id="33" class="l"><a class="l" href="#33">33: </a> <span class="php-keyword2">ob_start</span>();
</span><span id="34" class="l"><a class="l" href="#34">34: </a> <span class="php-comment">// Si les tags courts sont activés</span>
</span><span id="35" class="l"><a class="l" href="#35">35: </a> <span class="php-keyword1">if</span> ((bool) @<span class="php-keyword2">ini_get</span>(<span class="php-quote">'short_open_tag'</span>) === <span class="php-keyword1">true</span>) {
</span><span id="36" class="l"><a class="l" href="#36">36: </a> <span class="php-comment">// Simple inclusion du squelette</span>
</span><span id="37" class="l"><a class="l" href="#37">37: </a> <span class="php-keyword1">include</span> <span class="php-var">$fichier</span>;
</span><span id="38" class="l"><a class="l" href="#38">38: </a> } <span class="php-keyword1">else</span> {
</span><span id="39" class="l"><a class="l" href="#39">39: </a> <span class="php-comment">// Sinon, remplacement des tags courts par la syntaxe classique avec echo</span>
</span><span id="40" class="l"><a class="l" href="#40">40: </a> <span class="php-var">$html_et_code_php</span> = self::traiterTagsCourts(<span class="php-var">$fichier</span>);
</span><span id="41" class="l"><a class="l" href="#41">41: </a> <span class="php-comment">// Pour évaluer du php mélangé dans du html il est nécessaire de fermer la balise php ouverte par eval</span>
</span><span id="42" class="l"><a class="l" href="#42">42: </a> <span class="php-var">$html_et_code_php</span> = <span class="php-quote">'?&gt;'</span>.<span class="php-var">$html_et_code_php</span>;
</span><span id="43" class="l"><a class="l" href="#43">43: </a> <span class="php-comment">// Interprétation du html et du php dans le buffer</span>
</span><span id="44" class="l"><a class="l" href="#44">44: </a> <span class="php-keyword1">echo</span> <span class="php-keyword2">eval</span>(<span class="php-var">$html_et_code_php</span>);
</span><span id="45" class="l"><a class="l" href="#45">45: </a> }
</span><span id="46" class="l"><a class="l" href="#46">46: </a> <span class="php-comment">// Récupèration du contenu du buffer</span>
</span><span id="47" class="l"><a class="l" href="#47">47: </a> <span class="php-var">$sortie</span> = <span class="php-keyword2">ob_get_contents</span>();
</span><span id="48" class="l"><a class="l" href="#48">48: </a> <span class="php-comment">// Suppression du buffer</span>
</span><span id="49" class="l"><a class="l" href="#49">49: </a> @<span class="php-keyword2">ob_end_clean</span>();
</span><span id="50" class="l"><a class="l" href="#50">50: </a> } <span class="php-keyword1">else</span> {
</span><span id="51" class="l"><a class="l" href="#51">51: </a> <span class="php-var">$msg</span> = <span class="php-quote">&quot;Le fichier du squelette '</span><span class="php-var">$fichier</span><span class="php-quote">' n'existe pas.&quot;</span>;
</span><span id="52" class="l"><a class="l" href="#52">52: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$msg</span>, E_USER_WARNING);
</span><span id="53" class="l"><a class="l" href="#53">53: </a> }
</span><span id="54" class="l"><a class="l" href="#54">54: </a> <span class="php-comment">// Retourne le contenu</span>
</span><span id="55" class="l"><a class="l" href="#55">55: </a> <span class="php-keyword1">return</span> <span class="php-var">$sortie</span>;
</span><span id="56" class="l"><a class="l" href="#56">56: </a> }
</span><span id="57" class="l"><a class="l" href="#57">57: </a>
</span><span id="58" class="l"><a class="l" href="#58">58: </a> <span class="php-comment">/**
</span></span><span id="59" class="l"><a class="l" href="#59">59: </a><span class="php-comment"> * Fonction chargeant le contenu du squelette et remplaçant les tags court php (&lt;?= ...) par un tag long avec echo.
</span></span><span id="60" class="l"><a class="l" href="#60">60: </a><span class="php-comment"> *
</span></span><span id="61" class="l"><a class="l" href="#61">61: </a><span class="php-comment"> * @param String $chemin_squelette le chemin du fichier du squelette
</span></span><span id="62" class="l"><a class="l" href="#62">62: </a><span class="php-comment"> * @return string le contenu du fichier du squelette php avec les tags courts remplacés.
</span></span><span id="63" class="l"><a class="l" href="#63">63: </a><span class="php-comment"> */</span>
</span><span id="64" class="l"><a class="l" href="#64">64: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_traiterTagsCourts" href="#_traiterTagsCourts">traiterTagsCourts</a>(<span class="php-var">$chemin_squelette</span>) {
</span><span id="65" class="l"><a class="l" href="#65">65: </a> <span class="php-var">$contenu</span> = <span class="php-keyword2">file_get_contents</span>(<span class="php-var">$chemin_squelette</span>);
</span><span id="66" class="l"><a class="l" href="#66">66: </a> <span class="php-comment">// Remplacement de tags courts par un tag long avec echo</span>
</span><span id="67" class="l"><a class="l" href="#67">67: </a> <span class="php-var">$contenu</span> = <span class="php-keyword2">str_replace</span>(<span class="php-quote">'&lt;?='</span>, <span class="php-quote">'&lt;?php echo '</span>, <span class="php-var">$contenu</span>);
</span><span id="68" class="l"><a class="l" href="#68">68: </a> <span class="php-comment">// Ajout systématique d'un point virgule avant la fermeture php</span>
</span><span id="69" class="l"><a class="l" href="#69">69: </a> <span class="php-var">$contenu</span> = <span class="php-keyword2">preg_replace</span>(<span class="php-quote">&quot;/;*\s*\?&gt;/&quot;</span>, <span class="php-quote">&quot;; ?&gt;&quot;</span>, <span class="php-var">$contenu</span>);
</span><span id="70" class="l"><a class="l" href="#70">70: </a> <span class="php-keyword1">return</span> <span class="php-var">$contenu</span>;
</span><span id="71" class="l"><a class="l" href="#71">71: </a> }
</span><span id="72" class="l"><a class="l" href="#72">72: </a>}
</span><span id="73" class="l"><a class="l" href="#73">73: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-SquelettePhp.html
New file
0,0 → 1,231
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class SquelettePhp | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li class="active"><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class SquelettePhp</h1>
 
 
<div class="description">
<p>Classe SquelettePhp, traitant les squelette Php utilisant la syntaxe courte
php ou pas. Ces méthodes sont statiques.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
php5<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: SquelettePhp.php 241 2010-12-06 15:19:07Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-SquelettePhp.html#3-72" title="Go to source code">SquelettePhp.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="analyser" id="_analyser">
 
<td class="attributes"><code>
public static
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_analyser">#</a>
<code><a href="source-class-SquelettePhp.html#18-56" title="Go to source code">analyser</a>( <span>String <var>$fichier</var></span>, <span>array <var>&amp; $donnees</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Fonction prenant en paramètre un chemin de fichier squelette et un tableau
associatif de données, en extrait les variables, charge le squelette et
retourne le résultat des deux combinés.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Fonction prenant en paramètre un chemin de fichier squelette et un tableau
associatif de données, en extrait les variables, charge le squelette et
retourne le résultat des deux combinés.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier</var></dt>
<dd><code>String</code><br>$fichier le chemin du fichier du squelette</dd>
<dt><var>$donnees</var></dt>
<dd><code>Array</code><br>$donnees un tableau associatif contenant les variables a injecter dans le
squelette.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>false si la vue n'existe pas, sinon la chaine résultat.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/package-Framework.html
New file
0,0 → 1,237
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Package Framework | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li class="active">
<span>Package</span> </li>
<li>
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="package">
<h1>Package Framework</h1>
 
 
 
<table class="summary" id="classes">
<caption>Classes summary</caption>
<tr>
<td class="name"><a href="class-Bdd.html">Bdd</a></td>
<td>Classe Bdd, d'accés au base de données. Elle fait office d'abstraction
légère de base de données en utilisant diverses possibilités d'accès aux
bases de données (PDO, mysql, mysqli, SQLite3). Les valeurs pour le paramètre
'bdd_abstraction' du fichier config.ini sont : pdo, mysql, mysqli, sqlite3 Vous
pouvez aussi utiliser : "php:Bdd::ABSTRACTION_PDO","php:Bdd::ABSTRACTION_MYSQL",
"php:Bdd::ABSTRACTION_MYSQLI", "php:Bdd::ABSTRACTION_SQLITE3". Elle peut être
étendue, pour ajouter le support d'autres bases de données où prendre en
compte des méthodes spécifique à un type d'abstraction.</td>
</tr>
<tr>
<td class="name"><a href="class-Cache.html">Cache</a></td>
<td>Classe Cache permettant de mettre en cache des données. Basée sur les
principes de Zend_Cache (Copyright (c) 2005-2010, Zend Technologies USA, Inc.
All rights reserved.)</td>
</tr>
<tr>
<td class="name"><a href="class-CacheSimple.html">CacheSimple</a></td>
<td></td>
</tr>
<tr>
<td class="name"><a href="class-Chronometre.html">Chronometre</a></td>
<td>Chronometre permet de stocker et d'afficher les temps d'éxécution de script.</td>
</tr>
<tr>
<td class="name"><a href="class-Cli.html">Cli</a></td>
<td>CLI permet de récupérer les paramètres passés en ligne de commande pour
instancier une classe héritant de la classe abstraite Script. Elle va
déclencher l'éxecution du script via l'appel de la méthode executer(). C'est
une Singleton.</td>
</tr>
<tr>
<td class="name"><a href="class-Config.html">Config</a></td>
<td>Config permet de charger automatiquement les fichiers ini du Framework et de
l'application. Elle offre l'accès en lecture seule aux paramètres de config.
C'est une Singleton. Si vous avez besoin de modifier dynamiquement des
paramètres de configuration, utiliser le @see Registe, il est fait pour ça.</td>
</tr>
<tr>
<td class="name"><a href="class-Controleur.html">Controleur</a></td>
<td>Classe Controleur, coeur d'une application, c'est normalement la seule classe
d'une application qui devrait être appelée de l'extérieur. Elle est abstraite
donc doit obligatoirement être étendue.</td>
</tr>
<tr>
<td class="name"><a href="class-Debug.html">Debug</a></td>
<td>Classe fournissant des fonctions de débogage équivalante à var_dump et
print_r. L'affichage et l'utilisation de ces fonctions sont améliorés via
cette classe. Cette classe est inspirée de la classe Zend_Debug.</td>
</tr>
<tr>
<td class="name"><a href="class-Framework.html">Framework</a></td>
<td>Classe de base du Framework : - fournissant des infos sur l'application, -
paramétrant l'environnement de l'appli et du framework, - réalisant des
traitements sur les variables globales ($_GET, $_POST, $_COOKIE...)</td>
</tr>
<tr>
<td class="name"><a href="class-GestionnaireException.html">GestionnaireException</a></td>
<td>Classe de gestion des exceptions. C'est un Singleton.</td>
</tr>
<tr>
<td class="name"><a href="class-I18n.html">I18n</a></td>
<td>I18n permet de traduire une application à partir de données stockées dans des
fichiers ini. Si vous souhaitez utiliser le fonctionnement par défaut vous
devrez : - déposer les fichiers ini dans le dossier définit par la variable de
config "chemin_i18n". - nommer les fichiers selon la forme "locale.ini" (Ex.:
fr.ini ou fr_CH.ini ).</td>
</tr>
<tr>
<td class="name"><a href="class-Log.html">Log</a></td>
<td>Classe permettant de logger des messages dans les fichier situés dans le
dossier de log.</td>
</tr>
<tr>
<td class="name"><a href="class-Registre.html">Registre</a></td>
<td>Classe Registre, qui permet un accès à différentes variables et paramètres
à travers les autres classes. C'est un remplaçant à la variable magique
$_GLOBALS de Php. C'est un singleton. Si vous voulez paramètré votre
application via un fichier de configuration, utilisez plutôt la classe @see
Config.</td>
</tr>
<tr>
<td class="name"><a href="class-RestClient.html">RestClient</a></td>
<td>Classe client permettant d'interroger des services web REST.</td>
</tr>
<tr>
<td class="name"><a href="class-RestServeur.html">RestServeur</a></td>
<td></td>
</tr>
<tr>
<td class="name"><a href="class-RestService.html">RestService</a></td>
<td>Classe principale gérant les services. Paramètres liés dans config.ini : -
serveur.baseURL</td>
</tr>
<tr>
<td class="name"><a href="class-Script.html">Script</a></td>
<td>Script est une classe abstraite qui doit être implémenté par les classes
éxecutant des scripts en ligne de commande.</td>
</tr>
<tr>
<td class="name"><a href="class-SquelettePhp.html">SquelettePhp</a></td>
<td>Classe SquelettePhp, traitant les squelette Php utilisant la syntaxe courte php
ou pas. Ces méthodes sont statiques.</td>
</tr>
<tr>
<td class="name"><a href="class-Url.html">Url</a></td>
<td>Classe Url, gérant le découpage des paramètres, leurs modification etc...
Traduction et conversion d'une classe (NET_Url2) issue de Pear</td>
</tr>
</table>
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Chronometre.html
New file
0,0 → 1,291
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Chronometre | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li class="active"><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Chronometre</h1>
 
 
<div class="description">
<p>Chronometre permet de stocker et d'afficher les temps d'éxécution de
script.</p>
 
<p>Cette classe permet de réaliser un ensemble de mesure de temps prises à
différents endroits d'un script. Ces mesures peuvent ensuite être affichées
au sein d'un tableau XHTML.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL-v3</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL-v2</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Chronometre.php 327 2011-02-08 17:54:34Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Chronometre.html#3-137" title="Go to source code">Chronometre.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="chrono" id="_chrono">
 
<td class="attributes"><code>
public static
null
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_chrono">#</a>
<code><a href="source-class-Chronometre.html#54-68" title="Go to source code">chrono</a>( <span>string <var>$cle</var> = <span class="php-keyword1">null</span></span> )</code>
 
<div class="description short">
<p>Effectue un chronometrage. Vous pouvez indiquer le nom du point de
chronométrage. Si vous n'indiquez rien, un nombre sera généré en débutant
à 1.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Effectue un chronometrage. Vous pouvez indiquer le nom du point de
chronométrage. Si vous n'indiquez rien, un nombre sera généré en débutant
à 1.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$cle</var></dt>
<dd><code>string</code><br>le nom du point de chronométrage</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>null</code><br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="afficherChrono" id="_afficherChrono">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_afficherChrono">#</a>
<code><a href="source-class-Chronometre.html#70-131" title="Go to source code">afficherChrono</a>( <span>string <var>$cle</var> = <span class="php-keyword1">null</span></span> )</code>
 
<div class="description short">
<p>Permet d'afficher les temps d'éxécution de différentes parties d'un
script.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Permet d'afficher les temps d'éxécution de différentes parties d'un
script.</p>
 
<p>Cette fonction permet d'afficher un ensemble de mesure de temps prises à
différents endroits d'un script. Ces mesures sont affichées au sein d'un
tableau XHTML dont on peut controler l'indentation des balises. Pour un site en
production, il suffit d'ajouter un style #chrono {display:none;} dans la css. De
cette façon, le tableau ne s'affichera pas. Le webmaster lui pourra rajouter sa
propre feuille de style affichant le tableau. Le développeur initial de cette
fonction est Loic d'Anterroches. Elle a été modifiée par Jean-Pascal
Milcent.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$cle</var></dt>
<dd><code>string</code><br>l'eventuel nom du point de chronométrage de fin.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>la chaine XHTML de mesure des temps.<br>
</div>
 
 
<h4>Author</h4>
<div class="list">
Loic d'Anterroches<br>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
</div>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-RestServeur.html
New file
0,0 → 1,855
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File RestServeur.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li class="active"><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-RestServeur.html" title="Summary of RestServeur"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe principale gérant les services web de type (@link(REST, http://fr.wikipedia.org/wiki/Rest).
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> *
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * Elle contient :
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * - les constantes indiquant les différentes (@link(méthode HTTP, http://fr.wikipedia.org/wiki/Http) prises en compte.
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * - les @link(codes HTTP des réponses, http://fr.wikipedia.org/wiki/Liste_des_codes_HTTP)
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> *
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * Ce serveur REST accepte 4 types de méthodes HTTP : GET, PUT, POST, DELETE.
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * GET et POST ne pose généralement pas de problème pour les clients HTTP mais ce n'est pas forcément le cas pour PUT et DELETE.
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * Vous pouvez donc pour réaliser :
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * - DELETE : utiliser la méthode POST avec action=DELETE dans le corps de la requête.
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * - PUT : utiliser la méthode POST avec une url ne contenant aucune indication de ressource.
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * Une autre solution consiste à utiliser n'importe quelle méthode et à ajouter l'entête &quot;X_HTTP_METHOD_OVERRIDE&quot; avec pour
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * valeur le nom de la méthode que vous souhaitez utiliser. Exemple d'entête : &quot;X_HTTP_METHOD_OVERRIDE: PUT&quot;.
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> * Exemple : &lt;code&gt;curl -v -v -H &quot;X_HTTP_METHOD_OVERRIDE: DELETE&quot; &quot;http://www.mondomaine.org/services/apiVersion/[mon-service]/&quot;&lt;/code&gt;
</span></span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-comment"> * Cela fonctionne avec Apache.
</span></span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-comment"> *
</span></span><span id="20" class="l"><a class="l" href="#20"> 20: </a><span class="php-comment"> * Les classes des services web doivent avoir un nom au format ChatMot &quot;MonService&quot; et être appelée dans l'url par le même nom
</span></span><span id="21" class="l"><a class="l" href="#21"> 21: </a><span class="php-comment"> * en minuscule où les mots sont séparés par des tirets &quot;mon-service&quot;.
</span></span><span id="22" class="l"><a class="l" href="#22"> 22: </a><span class="php-comment"> *
</span></span><span id="23" class="l"><a class="l" href="#23"> 23: </a><span class="php-comment"> * Paramètres liés dans config.ini :
</span></span><span id="24" class="l"><a class="l" href="#24"> 24: </a><span class="php-comment"> * - serveur.baseURL : morceau de l'url pour appeler le serveur relative au domaine. Exemple : pour http://www.tela-botanica.org/mon_serveur/
</span></span><span id="25" class="l"><a class="l" href="#25"> 25: </a><span class="php-comment"> * mettre : &quot;/mon_serveur/&quot;
</span></span><span id="26" class="l"><a class="l" href="#26"> 26: </a><span class="php-comment"> * - serveur.baseAlternativeURL : sur le même principe que ci-dessus permet d'affecter une deuxième url (pour gérer des raccourci via htaccess)
</span></span><span id="27" class="l"><a class="l" href="#27"> 27: </a><span class="php-comment"> *
</span></span><span id="28" class="l"><a class="l" href="#28"> 28: </a><span class="php-comment"> * Encodage en entrée : utf8
</span></span><span id="29" class="l"><a class="l" href="#29"> 29: </a><span class="php-comment"> * Encodage en sortie : utf8
</span></span><span id="30" class="l"><a class="l" href="#30"> 30: </a><span class="php-comment"> *
</span></span><span id="31" class="l"><a class="l" href="#31"> 31: </a><span class="php-comment"> * @category Php 5.2
</span></span><span id="32" class="l"><a class="l" href="#32"> 32: </a><span class="php-comment"> * @package Framework
</span></span><span id="33" class="l"><a class="l" href="#33"> 33: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="34" class="l"><a class="l" href="#34"> 34: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="35" class="l"><a class="l" href="#35"> 35: </a><span class="php-comment"> * @license GPL v3 &lt;http://www.gnu.org/licenses/gpl.txt&gt;
</span></span><span id="36" class="l"><a class="l" href="#36"> 36: </a><span class="php-comment"> * @license CECILL v2 &lt;http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt&gt;
</span></span><span id="37" class="l"><a class="l" href="#37"> 37: </a><span class="php-comment"> * @since 0.3
</span></span><span id="38" class="l"><a class="l" href="#38"> 38: </a><span class="php-comment"> * @version $Id: RestServeur.php 457 2014-02-06 17:54:21Z jpm $
</span></span><span id="39" class="l"><a class="l" href="#39"> 39: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="40" class="l"><a class="l" href="#40"> 40: </a><span class="php-comment"> */</span>
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a><span class="php-comment">// TODO : gerer les retours : dans ce controleur : code retour et envoi ...</span>
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a><span class="php-keyword1">class</span> <a id="RestServeur" href="#RestServeur">RestServeur</a> {
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a>
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a> <span class="php-comment">/** Nom de la méthode appelée dans un service pour éxécuter une requête de type GET. */</span>
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a> <span class="php-keyword1">const</span> <a id="METHODE_GET" href="#METHODE_GET">METHODE_GET</a> = <span class="php-quote">'consulter'</span>;
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a>
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a> <span class="php-comment">/** Nom de la méthode appelée dans un service pour éxécuter une requête de type POST. */</span>
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-keyword1">const</span> <a id="METHODE_POST" href="#METHODE_POST">METHODE_POST</a> = <span class="php-quote">'modifier'</span>;
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a>
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> <span class="php-comment">/** Nom de la méthode appelée dans un service pour éxécuter une requête de type DELETE. */</span>
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a> <span class="php-keyword1">const</span> <a id="METHODE_DELETE" href="#METHODE_DELETE">METHODE_DELETE</a> = <span class="php-quote">'supprimer'</span>;
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a>
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a> <span class="php-comment">/** Nom de la méthode appelée dans un service pour éxécuter une requête de type PUT. */</span>
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> <span class="php-keyword1">const</span> <a id="METHODE_PUT" href="#METHODE_PUT">METHODE_PUT</a> = <span class="php-quote">'ajouter'</span>;
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a>
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> <span class="php-comment">/** Code HTTP 200 : OK
</span></span><span id="57" class="l"><a class="l" href="#57"> 57: </a><span class="php-comment"> * Indiquant le succès de l'accès à un service web par la méthode GET.
</span></span><span id="58" class="l"><a class="l" href="#58"> 58: </a><span class="php-comment"> * L'utiliser lors d'une requète de type GET (consulter) pour indiquer le succès de l'opération.
</span></span><span id="59" class="l"><a class="l" href="#59"> 59: </a><span class="php-comment"> * Sera renvoyée par défaut par PHP.
</span></span><span id="60" class="l"><a class="l" href="#60"> 60: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1
</span></span><span id="61" class="l"><a class="l" href="#61"> 61: </a><span class="php-comment"> */</span>
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_OK" href="#HTTP_CODE_OK">HTTP_CODE_OK</a> = <span class="php-quote">'200'</span>;
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a>
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-comment">/** Code HTTP 201 : Created
</span></span><span id="65" class="l"><a class="l" href="#65"> 65: </a><span class="php-comment"> * Indiquant que l'accès à un service web est un succès et que la ressource a été créée ou modifié.
</span></span><span id="66" class="l"><a class="l" href="#66"> 66: </a><span class="php-comment"> * L'utiliser lors d'une requète de type PUT (ajouter) ou POST (modifier) pour indiquer le succès de l'opération.
</span></span><span id="67" class="l"><a class="l" href="#67"> 67: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.2
</span></span><span id="68" class="l"><a class="l" href="#68"> 68: </a><span class="php-comment"> */</span>
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_CREATION_OK" href="#HTTP_CODE_CREATION_OK">HTTP_CODE_CREATION_OK</a> = <span class="php-quote">'201'</span>;
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a>
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a> <span class="php-comment">/** Code HTTP 202 : Accepted
</span></span><span id="72" class="l"><a class="l" href="#72"> 72: </a><span class="php-comment"> * Indiquant que la requête a été acceptée mais que son traitement n'est pas encore terminé.
</span></span><span id="73" class="l"><a class="l" href="#73"> 73: </a><span class="php-comment"> * L'utiliser lors d'une requète de type PUT (ajouter) ou POST (modifier) pour indiquer que les données
</span></span><span id="74" class="l"><a class="l" href="#74"> 74: </a><span class="php-comment"> * seront traitées ultérieurement.
</span></span><span id="75" class="l"><a class="l" href="#75"> 75: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.3
</span></span><span id="76" class="l"><a class="l" href="#76"> 76: </a><span class="php-comment"> */</span>
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_ACCEPTE_OK" href="#HTTP_CODE_ACCEPTE_OK">HTTP_CODE_ACCEPTE_OK</a> = <span class="php-quote">'202'</span>;
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a>
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> <span class="php-comment">/** Code HTTP 204 : No Content
</span></span><span id="80" class="l"><a class="l" href="#80"> 80: </a><span class="php-comment"> * Indique que l'accès à un service web est un succès et qu'il n'y a pas de contenu à renvoyer.
</span></span><span id="81" class="l"><a class="l" href="#81"> 81: </a><span class="php-comment"> * L'utiliser lors d'une requète de type DELETE (supprimer) pour indiquer le succès de l'opération si aucun
</span></span><span id="82" class="l"><a class="l" href="#82"> 82: </a><span class="php-comment"> * contenu (status) ne doit être renvoyé, sinon utiliser 200 OK.
</span></span><span id="83" class="l"><a class="l" href="#83"> 83: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5
</span></span><span id="84" class="l"><a class="l" href="#84"> 84: </a><span class="php-comment"> */</span>
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_SUPPRESSION_OK" href="#HTTP_CODE_SUPPRESSION_OK">HTTP_CODE_SUPPRESSION_OK</a> = <span class="php-quote">'204'</span>;
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a>
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-comment">/** Code HTTP 400 : Bad Request
</span></span><span id="88" class="l"><a class="l" href="#88"> 88: </a><span class="php-comment"> * Indique que les paramètres envoyés au service contiennent des erreurs.
</span></span><span id="89" class="l"><a class="l" href="#89"> 89: </a><span class="php-comment"> * L'utiliser pour indiquer l'échec de l'accès au service. La réponse pourra contenir un message expliquant la source
</span></span><span id="90" class="l"><a class="l" href="#90"> 90: </a><span class="php-comment"> * de l'erreur.
</span></span><span id="91" class="l"><a class="l" href="#91"> 91: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1
</span></span><span id="92" class="l"><a class="l" href="#92"> 92: </a><span class="php-comment"> */</span>
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_MAUVAISE_REQUETE" href="#HTTP_CODE_MAUVAISE_REQUETE">HTTP_CODE_MAUVAISE_REQUETE</a> = <span class="php-quote">'400'</span>;
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a>
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> <span class="php-comment">/** Code HTTP 401 : Unauthorized
</span></span><span id="96" class="l"><a class="l" href="#96"> 96: </a><span class="php-comment"> * Indiquant que l'accès à un service web est refusé car l'authentification (obligatoire) a échoué pour
</span></span><span id="97" class="l"><a class="l" href="#97"> 97: </a><span class="php-comment"> * accéder à la ressource.
</span></span><span id="98" class="l"><a class="l" href="#98"> 98: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2
</span></span><span id="99" class="l"><a class="l" href="#99"> 99: </a><span class="php-comment"> */</span>
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_ACCES_NON_AUTORISE" href="#HTTP_CODE_ACCES_NON_AUTORISE">HTTP_CODE_ACCES_NON_AUTORISE</a> = <span class="php-quote">'401'</span>;
</span><span id="101" class="l"><a class="l" href="#101">101: </a>
</span><span id="102" class="l"><a class="l" href="#102">102: </a> <span class="php-comment">/** Code HTTP 403 : Forbidden
</span></span><span id="103" class="l"><a class="l" href="#103">103: </a><span class="php-comment"> * Indiquant que le service a compris la requête mais refuse de la réaliser.
</span></span><span id="104" class="l"><a class="l" href="#104">104: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4
</span></span><span id="105" class="l"><a class="l" href="#105">105: </a><span class="php-comment"> */</span>
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_ACCES_INTERDIT" href="#HTTP_CODE_ACCES_INTERDIT">HTTP_CODE_ACCES_INTERDIT</a> = <span class="php-quote">'403'</span>;
</span><span id="107" class="l"><a class="l" href="#107">107: </a>
</span><span id="108" class="l"><a class="l" href="#108">108: </a> <span class="php-comment">/** Code HTTP 404 : Not Found
</span></span><span id="109" class="l"><a class="l" href="#109">109: </a><span class="php-comment"> * Indiquant que la ressource indiquée par l'url est introuvable.
</span></span><span id="110" class="l"><a class="l" href="#110">110: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5
</span></span><span id="111" class="l"><a class="l" href="#111">111: </a><span class="php-comment"> */</span>
</span><span id="112" class="l"><a class="l" href="#112">112: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_RESSOURCE_INTROUVABLE" href="#HTTP_CODE_RESSOURCE_INTROUVABLE">HTTP_CODE_RESSOURCE_INTROUVABLE</a> = <span class="php-quote">'404'</span>;
</span><span id="113" class="l"><a class="l" href="#113">113: </a>
</span><span id="114" class="l"><a class="l" href="#114">114: </a> <span class="php-comment">/** Code HTTP 405 : Method Not Allowed
</span></span><span id="115" class="l"><a class="l" href="#115">115: </a><span class="php-comment"> * Indique soit :
</span></span><span id="116" class="l"><a class="l" href="#116">116: </a><span class="php-comment"> * - que le service web ne possède pas d'accès la ressource correspondant à la méthode HTTP employée.
</span></span><span id="117" class="l"><a class="l" href="#117">117: </a><span class="php-comment"> * - que la méthode HTTP enployée n'est pas en accord avec la ressource indiquée par l'url.
</span></span><span id="118" class="l"><a class="l" href="#118">118: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6
</span></span><span id="119" class="l"><a class="l" href="#119">119: </a><span class="php-comment"> */</span>
</span><span id="120" class="l"><a class="l" href="#120">120: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_METHODE_NON_AUTORISE" href="#HTTP_CODE_METHODE_NON_AUTORISE">HTTP_CODE_METHODE_NON_AUTORISE</a> = <span class="php-quote">'405'</span>;
</span><span id="121" class="l"><a class="l" href="#121">121: </a>
</span><span id="122" class="l"><a class="l" href="#122">122: </a> <span class="php-comment">/** Code HTTP 409 : Conflict
</span></span><span id="123" class="l"><a class="l" href="#123">123: </a><span class="php-comment"> * Indique qu'un conflit est survenu vis à vis de la ressource.
</span></span><span id="124" class="l"><a class="l" href="#124">124: </a><span class="php-comment"> * Par exemple, essayer de créer deux fois la même ressource ou bien tenter de modifier une ressource qui a été modifiée par
</span></span><span id="125" class="l"><a class="l" href="#125">125: </a><span class="php-comment"> * ailleurs.
</span></span><span id="126" class="l"><a class="l" href="#126">126: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10
</span></span><span id="127" class="l"><a class="l" href="#127">127: </a><span class="php-comment"> */</span>
</span><span id="128" class="l"><a class="l" href="#128">128: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_CONFLIT" href="#HTTP_CODE_CONFLIT">HTTP_CODE_CONFLIT</a> = <span class="php-quote">'409'</span>;
</span><span id="129" class="l"><a class="l" href="#129">129: </a>
</span><span id="130" class="l"><a class="l" href="#130">130: </a> <span class="php-comment">/** Code HTTP 411 : Length Required
</span></span><span id="131" class="l"><a class="l" href="#131">131: </a><span class="php-comment"> * Indique que des paramètres passés dans le contenu de la requête sont nécessaires au service.
</span></span><span id="132" class="l"><a class="l" href="#132">132: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.12
</span></span><span id="133" class="l"><a class="l" href="#133">133: </a><span class="php-comment"> */</span>
</span><span id="134" class="l"><a class="l" href="#134">134: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_CONTENU_REQUIS" href="#HTTP_CODE_CONTENU_REQUIS">HTTP_CODE_CONTENU_REQUIS</a> = <span class="php-quote">'411'</span>;
</span><span id="135" class="l"><a class="l" href="#135">135: </a>
</span><span id="136" class="l"><a class="l" href="#136">136: </a> <span class="php-comment">/** Code HTTP 412 : Precondition Failed
</span></span><span id="137" class="l"><a class="l" href="#137">137: </a><span class="php-comment"> * Indique que des entêtes envoyés au serveur sont erronnés.
</span></span><span id="138" class="l"><a class="l" href="#138">138: </a><span class="php-comment"> * À utiliser quand un service web reçoit de mauvais entêtes, paramètres et/ou ressources.
</span></span><span id="139" class="l"><a class="l" href="#139">139: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.13
</span></span><span id="140" class="l"><a class="l" href="#140">140: </a><span class="php-comment"> */</span>
</span><span id="141" class="l"><a class="l" href="#141">141: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_ECHEC_CONDITION" href="#HTTP_CODE_ECHEC_CONDITION">HTTP_CODE_ECHEC_CONDITION</a> = <span class="php-quote">'411'</span>;
</span><span id="142" class="l"><a class="l" href="#142">142: </a>
</span><span id="143" class="l"><a class="l" href="#143">143: </a> <span class="php-comment">/** Code HTTP 415 : Unsupported Media Type
</span></span><span id="144" class="l"><a class="l" href="#144">144: </a><span class="php-comment"> * Indique que le type de média envoyé au serveur n'est pas accepté par la ressource.
</span></span><span id="145" class="l"><a class="l" href="#145">145: </a><span class="php-comment"> * À utiliser quand un service web reçoit un mauvais type de contenu.
</span></span><span id="146" class="l"><a class="l" href="#146">146: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.16
</span></span><span id="147" class="l"><a class="l" href="#147">147: </a><span class="php-comment"> */</span>
</span><span id="148" class="l"><a class="l" href="#148">148: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_CONTENU_NON_SUPPORTE" href="#HTTP_CODE_CONTENU_NON_SUPPORTE">HTTP_CODE_CONTENU_NON_SUPPORTE</a> = <span class="php-quote">'415'</span>;
</span><span id="149" class="l"><a class="l" href="#149">149: </a>
</span><span id="150" class="l"><a class="l" href="#150">150: </a> <span class="php-comment">/** Code HTTP 500 : Internal Server Error.
</span></span><span id="151" class="l"><a class="l" href="#151">151: </a><span class="php-comment"> * L'utiliser quand le serveur ou un service soulève une erreur ou une exception.
</span></span><span id="152" class="l"><a class="l" href="#152">152: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1
</span></span><span id="153" class="l"><a class="l" href="#153">153: </a><span class="php-comment"> */</span>
</span><span id="154" class="l"><a class="l" href="#154">154: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_ERREUR" href="#HTTP_CODE_ERREUR">HTTP_CODE_ERREUR</a> = <span class="php-quote">'500'</span>;
</span><span id="155" class="l"><a class="l" href="#155">155: </a>
</span><span id="156" class="l"><a class="l" href="#156">156: </a> <span class="php-comment">/** Code HTTP 503 : Service Unavailable
</span></span><span id="157" class="l"><a class="l" href="#157">157: </a><span class="php-comment"> * L'utiliser quand le web service est momentanément indisponible.
</span></span><span id="158" class="l"><a class="l" href="#158">158: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4
</span></span><span id="159" class="l"><a class="l" href="#159">159: </a><span class="php-comment"> */</span>
</span><span id="160" class="l"><a class="l" href="#160">160: </a> <span class="php-keyword1">const</span> <a id="HTTP_CODE_SERVICE_INDISPONIBLE" href="#HTTP_CODE_SERVICE_INDISPONIBLE">HTTP_CODE_SERVICE_INDISPONIBLE</a> = <span class="php-quote">'503'</span>;
</span><span id="161" class="l"><a class="l" href="#161">161: </a>
</span><span id="162" class="l"><a class="l" href="#162">162: </a> <span class="php-comment">/** Code HTTP 501 : Not Implemented
</span></span><span id="163" class="l"><a class="l" href="#163">163: </a><span class="php-comment"> * Indique que le web service ne supporte pas la fonctionnalité demandée.
</span></span><span id="164" class="l"><a class="l" href="#164">164: </a><span class="php-comment"> * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2
</span></span><span id="165" class="l"><a class="l" href="#165">165: </a><span class="php-comment"> */</span>
</span><span id="166" class="l"><a class="l" href="#166">166: </a> <span class="php-keyword1">const</span> HTTP_NON_IMPLEMENTE= <span class="php-quote">'501'</span>;
</span><span id="167" class="l"><a class="l" href="#167">167: </a>
</span><span id="168" class="l"><a class="l" href="#168">168: </a> <span class="php-comment">/** Motif de l'epression régulière vérfiant la version de l'API. */</span>
</span><span id="169" class="l"><a class="l" href="#169">169: </a> <span class="php-keyword1">const</span> <a id="MOTIF_API_VERSION" href="#MOTIF_API_VERSION">MOTIF_API_VERSION</a> = <span class="php-quote">'/^[0-9]+(?:[.][0-9]+)*$/'</span>;
</span><span id="170" class="l"><a class="l" href="#170">170: </a>
</span><span id="171" class="l"><a class="l" href="#171">171: </a> <span class="php-comment">/** Motif de l'epression régulière vérfiant le nom du service. */</span>
</span><span id="172" class="l"><a class="l" href="#172">172: </a> <span class="php-keyword1">const</span> <a id="MOTIF_SERVICE_NOM" href="#MOTIF_SERVICE_NOM">MOTIF_SERVICE_NOM</a> = <span class="php-quote">'/^[a-z0-9]+(?:[-][a-z0-9]+)*$/'</span>;
</span><span id="173" class="l"><a class="l" href="#173">173: </a>
</span><span id="174" class="l"><a class="l" href="#174">174: </a> <span class="php-comment">/** Mettre à true pour activer l'affichage des messages d'erreurs et de débogage.
</span></span><span id="175" class="l"><a class="l" href="#175">175: </a><span class="php-comment"> * @var boolean */</span>
</span><span id="176" class="l"><a class="l" href="#176">176: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$debogageActivation" href="#$debogageActivation">$debogageActivation</a></span> = <span class="php-keyword1">false</span>;
</span><span id="177" class="l"><a class="l" href="#177">177: </a>
</span><span id="178" class="l"><a class="l" href="#178">178: </a> <span class="php-comment">/** Indiquer le mode de débogage à utiliser (@see Debug).
</span></span><span id="179" class="l"><a class="l" href="#179">179: </a><span class="php-comment"> * @var string */</span>
</span><span id="180" class="l"><a class="l" href="#180">180: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$debogageMode" href="#$debogageMode">$debogageMode</a></span> = <span class="php-quote">''</span>;
</span><span id="181" class="l"><a class="l" href="#181">181: </a>
</span><span id="182" class="l"><a class="l" href="#182">182: </a> <span class="php-comment">/** La méthode de la requête HTTP utilisée.
</span></span><span id="183" class="l"><a class="l" href="#183">183: </a><span class="php-comment"> * @var string */</span>
</span><span id="184" class="l"><a class="l" href="#184">184: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$methode" href="#$methode">$methode</a></span> = <span class="php-quote">'GET'</span>;
</span><span id="185" class="l"><a class="l" href="#185">185: </a>
</span><span id="186" class="l"><a class="l" href="#186">186: </a> <span class="php-comment">/** Le contenu brut du corps de la requête HTTP (s'il y en a).
</span></span><span id="187" class="l"><a class="l" href="#187">187: </a><span class="php-comment"> * @var array */</span>
</span><span id="188" class="l"><a class="l" href="#188">188: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$requeteDonnees" href="#$requeteDonnees">$requeteDonnees</a></span> = <span class="php-keyword1">null</span>;
</span><span id="189" class="l"><a class="l" href="#189">189: </a>
</span><span id="190" class="l"><a class="l" href="#190">190: </a> <span class="php-comment">/** Le contenu sous forme de tableau de paires clés-valeurs du corps de la requête HTTP (s'il y en a).
</span></span><span id="191" class="l"><a class="l" href="#191">191: </a><span class="php-comment"> * @var array */</span>
</span><span id="192" class="l"><a class="l" href="#192">192: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$requeteDonneesParsees" href="#$requeteDonneesParsees">$requeteDonneesParsees</a></span> = <span class="php-keyword1">null</span>;
</span><span id="193" class="l"><a class="l" href="#193">193: </a>
</span><span id="194" class="l"><a class="l" href="#194">194: </a> <span class="php-comment">/** Version de l'API demandée.
</span></span><span id="195" class="l"><a class="l" href="#195">195: </a><span class="php-comment"> * Ex. http://www.mondomaine.org/services/[apiVersion]/mon-service/
</span></span><span id="196" class="l"><a class="l" href="#196">196: </a><span class="php-comment"> * @var mixed Généralement deux nombres séparés par un point. Ex. : 1.0
</span></span><span id="197" class="l"><a class="l" href="#197">197: </a><span class="php-comment"> */</span>
</span><span id="198" class="l"><a class="l" href="#198">198: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$apiVersion" href="#$apiVersion">$apiVersion</a></span> = <span class="php-keyword1">null</span>;
</span><span id="199" class="l"><a class="l" href="#199">199: </a>
</span><span id="200" class="l"><a class="l" href="#200">200: </a> <span class="php-comment">/** Nom du service demandé.
</span></span><span id="201" class="l"><a class="l" href="#201">201: </a><span class="php-comment"> * Ex. http://www.mondomaine.org/services/apiVersion/[mon-service]/
</span></span><span id="202" class="l"><a class="l" href="#202">202: </a><span class="php-comment"> * @var string par défaut vaut null.
</span></span><span id="203" class="l"><a class="l" href="#203">203: </a><span class="php-comment"> */</span>
</span><span id="204" class="l"><a class="l" href="#204">204: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$service" href="#$service">$service</a></span> = <span class="php-keyword1">null</span>;
</span><span id="205" class="l"><a class="l" href="#205">205: </a>
</span><span id="206" class="l"><a class="l" href="#206">206: </a> <span class="php-comment">/** Morceaux de l'url servant à préciser la ressource concerné pour le service demandé.
</span></span><span id="207" class="l"><a class="l" href="#207">207: </a><span class="php-comment"> * Ex. http://www.mondomaine.org/services/apiVersion/mon-service/[maRessource/maSousResource...]
</span></span><span id="208" class="l"><a class="l" href="#208">208: </a><span class="php-comment"> * @var array
</span></span><span id="209" class="l"><a class="l" href="#209">209: </a><span class="php-comment"> */</span>
</span><span id="210" class="l"><a class="l" href="#210">210: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$ressources" href="#$ressources">$ressources</a></span> = <span class="php-keyword1">array</span>();
</span><span id="211" class="l"><a class="l" href="#211">211: </a>
</span><span id="212" class="l"><a class="l" href="#212">212: </a> <span class="php-comment">/** Partie de l'url situé après le '?' servant à paramétrer le service demandé.
</span></span><span id="213" class="l"><a class="l" href="#213">213: </a><span class="php-comment"> * Les données proviennent de $_GET où les caractères suivant ont été transformé en '_' undescrore dans les clés :
</span></span><span id="214" class="l"><a class="l" href="#214">214: </a><span class="php-comment"> * - chr(32) ( ) (space)
</span></span><span id="215" class="l"><a class="l" href="#215">215: </a><span class="php-comment"> * - chr(46) (.) (dot)
</span></span><span id="216" class="l"><a class="l" href="#216">216: </a><span class="php-comment"> * - chr(91) ([) (open square bracket)
</span></span><span id="217" class="l"><a class="l" href="#217">217: </a><span class="php-comment"> * - chr(128) - chr(159) (various)
</span></span><span id="218" class="l"><a class="l" href="#218">218: </a><span class="php-comment"> * En outre nous appliquons la méthode nettoyerGet() qui effectue d'autres remplacement dans les valeurs.
</span></span><span id="219" class="l"><a class="l" href="#219">219: </a><span class="php-comment"> * Ex. http://www.mondomaine.org/services/apiVersion/mon-service?monParametre1=maValeur1&amp;monParametre2=maValeur2
</span></span><span id="220" class="l"><a class="l" href="#220">220: </a><span class="php-comment"> * @see parametresBruts
</span></span><span id="221" class="l"><a class="l" href="#221">221: </a><span class="php-comment"> * @var array
</span></span><span id="222" class="l"><a class="l" href="#222">222: </a><span class="php-comment"> */</span>
</span><span id="223" class="l"><a class="l" href="#223">223: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$parametres" href="#$parametres">$parametres</a></span> = <span class="php-keyword1">array</span>();
</span><span id="224" class="l"><a class="l" href="#224">224: </a>
</span><span id="225" class="l"><a class="l" href="#225">225: </a> <span class="php-comment">/** Partie de l'url situé après le '?' servant à paramétrer le service demandé.
</span></span><span id="226" class="l"><a class="l" href="#226">226: </a><span class="php-comment"> * Les données proviennent de $_SERVER['QUERY_STRING'] et n'ont subies aucune transformation au niveau des clés.
</span></span><span id="227" class="l"><a class="l" href="#227">227: </a><span class="php-comment"> * Cependant nous appliquons la méthode nettoyerGet() qui effectue d'autres remplacement dans les valeurs.
</span></span><span id="228" class="l"><a class="l" href="#228">228: </a><span class="php-comment"> * Ex. http://www.mondomaine.org/services/apiVersion/mon-service?monParametre1=maValeur1&amp;monParametre2=maValeur2
</span></span><span id="229" class="l"><a class="l" href="#229">229: </a><span class="php-comment"> * @see parametres
</span></span><span id="230" class="l"><a class="l" href="#230">230: </a><span class="php-comment"> * @var array
</span></span><span id="231" class="l"><a class="l" href="#231">231: </a><span class="php-comment"> */</span>
</span><span id="232" class="l"><a class="l" href="#232">232: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$parametresBruts" href="#$parametresBruts">$parametresBruts</a></span> = <span class="php-keyword1">array</span>();
</span><span id="233" class="l"><a class="l" href="#233">233: </a>
</span><span id="234" class="l"><a class="l" href="#234">234: </a> <span class="php-comment">/** Tableau contenant les paramètres de configuration du serveur.
</span></span><span id="235" class="l"><a class="l" href="#235">235: </a><span class="php-comment"> * @var array
</span></span><span id="236" class="l"><a class="l" href="#236">236: </a><span class="php-comment"> */</span>
</span><span id="237" class="l"><a class="l" href="#237">237: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$config" href="#$config">$config</a></span> = <span class="php-keyword1">array</span>();
</span><span id="238" class="l"><a class="l" href="#238">238: </a>
</span><span id="239" class="l"><a class="l" href="#239">239: </a> <span class="php-comment">/** Tableau contenant les messages d'erreur et/ou d'avertissement du Serveur.
</span></span><span id="240" class="l"><a class="l" href="#240">240: </a><span class="php-comment"> * @var array
</span></span><span id="241" class="l"><a class="l" href="#241">241: </a><span class="php-comment"> * */</span>
</span><span id="242" class="l"><a class="l" href="#242">242: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$messages" href="#$messages">$messages</a></span> = <span class="php-keyword1">array</span>();
</span><span id="243" class="l"><a class="l" href="#243">243: </a>
</span><span id="244" class="l"><a class="l" href="#244">244: </a> <span class="php-comment">/** Codes HTTP. */</span>
</span><span id="245" class="l"><a class="l" href="#245">245: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$http10" href="#$http10">$http10</a></span> = <span class="php-keyword1">array</span>(
</span><span id="246" class="l"><a class="l" href="#246">246: </a> self::HTTP_CODE_OK =&gt; <span class="php-quote">'OK'</span>,
</span><span id="247" class="l"><a class="l" href="#247">247: </a> self::HTTP_CODE_CREATION_OK =&gt; <span class="php-quote">'Created'</span>,
</span><span id="248" class="l"><a class="l" href="#248">248: </a> self::HTTP_CODE_SUPPRESSION_OK =&gt; <span class="php-quote">'No Content'</span>,
</span><span id="249" class="l"><a class="l" href="#249">249: </a> self::HTTP_CODE_MAUVAISE_REQUETE =&gt; <span class="php-quote">'Bad Request'</span>,
</span><span id="250" class="l"><a class="l" href="#250">250: </a> self::HTTP_CODE_ACCES_NON_AUTORISE =&gt; <span class="php-quote">'Unauthorized'</span>,
</span><span id="251" class="l"><a class="l" href="#251">251: </a> self::HTTP_CODE_RESSOURCE_INTROUVABLE =&gt; <span class="php-quote">'Not Found'</span>,
</span><span id="252" class="l"><a class="l" href="#252">252: </a> self::HTTP_CODE_METHODE_NON_AUTORISE =&gt; <span class="php-quote">'Method Not Allowed'</span>,
</span><span id="253" class="l"><a class="l" href="#253">253: </a> self::HTTP_CODE_CONFLIT =&gt; <span class="php-quote">'Conflict'</span>,
</span><span id="254" class="l"><a class="l" href="#254">254: </a> self::HTTP_CODE_CONTENU_REQUIS =&gt; <span class="php-quote">'Length Required'</span>,
</span><span id="255" class="l"><a class="l" href="#255">255: </a> self::HTTP_CODE_ERREUR =&gt; <span class="php-quote">'Internal Server Error'</span>
</span><span id="256" class="l"><a class="l" href="#256">256: </a> );
</span><span id="257" class="l"><a class="l" href="#257">257: </a>
</span><span id="258" class="l"><a class="l" href="#258">258: </a> <span class="php-comment">/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/</span>
</span><span id="259" class="l"><a class="l" href="#259">259: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$parametres_obligatoires" href="#$parametres_obligatoires">$parametres_obligatoires</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'debogage'</span>, <span class="php-quote">'debogage_mode'</span>, <span class="php-quote">'serveur.baseURL'</span>, <span class="php-quote">'chemin_modules'</span>);
</span><span id="260" class="l"><a class="l" href="#260">260: </a>
</span><span id="261" class="l"><a class="l" href="#261">261: </a> <span class="php-comment">/**
</span></span><span id="262" class="l"><a class="l" href="#262">262: </a><span class="php-comment"> * Analyse les données envoyées au serveur, enregistre la méthode HTTP utilisée pour appeler le serveur et parse
</span></span><span id="263" class="l"><a class="l" href="#263">263: </a><span class="php-comment"> * l'url appelée pour trouver le service demandé.
</span></span><span id="264" class="l"><a class="l" href="#264">264: </a><span class="php-comment"> */</span>
</span><span id="265" class="l"><a class="l" href="#265">265: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>() {
</span><span id="266" class="l"><a class="l" href="#266">266: </a> Config::verifierPresenceParametres(<span class="php-var">$this</span>-&gt;parametres_obligatoires);
</span><span id="267" class="l"><a class="l" href="#267">267: </a>
</span><span id="268" class="l"><a class="l" href="#268">268: </a> self::<span class="php-var">$debogageActivation</span> = Config::get(<span class="php-quote">'debogage'</span>);
</span><span id="269" class="l"><a class="l" href="#269">269: </a> self::<span class="php-var">$debogageMode</span> = Config::get(<span class="php-quote">'debogage_mode'</span>);
</span><span id="270" class="l"><a class="l" href="#270">270: </a>
</span><span id="271" class="l"><a class="l" href="#271">271: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'REQUEST_URI'</span>]) &amp;&amp; <span class="php-keyword1">isset</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'REQUEST_METHOD'</span>]) &amp;&amp; <span class="php-keyword1">isset</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'QUERY_STRING'</span>])) {
</span><span id="272" class="l"><a class="l" href="#272">272: </a> <span class="php-var">$this</span>-&gt;initialiserMethode();
</span><span id="273" class="l"><a class="l" href="#273">273: </a> <span class="php-var">$this</span>-&gt;initialiserRequeteDonnees();
</span><span id="274" class="l"><a class="l" href="#274">274: </a>
</span><span id="275" class="l"><a class="l" href="#275">275: </a> <span class="php-var">$urlParts</span> = <span class="php-var">$this</span>-&gt;decouperUrlChemin();
</span><span id="276" class="l"><a class="l" href="#276">276: </a>
</span><span id="277" class="l"><a class="l" href="#277">277: </a> <span class="php-var">$this</span>-&gt;initialiserApiVersion(<span class="php-keyword2">array_shift</span>(<span class="php-var">$urlParts</span>));
</span><span id="278" class="l"><a class="l" href="#278">278: </a> <span class="php-var">$this</span>-&gt;initialiserServiceNom(<span class="php-keyword2">array_shift</span>(<span class="php-var">$urlParts</span>));
</span><span id="279" class="l"><a class="l" href="#279">279: </a> <span class="php-var">$this</span>-&gt;initialiserRessource(<span class="php-var">$urlParts</span>);
</span><span id="280" class="l"><a class="l" href="#280">280: </a>
</span><span id="281" class="l"><a class="l" href="#281">281: </a> <span class="php-var">$this</span>-&gt;initialiserParametres();
</span><span id="282" class="l"><a class="l" href="#282">282: </a> <span class="php-comment">// Enregistrement en première position des autoload de la méthode gérant les classes des services</span>
</span><span id="283" class="l"><a class="l" href="#283">283: </a> <span class="php-keyword2">spl_autoload_register</span>(<span class="php-keyword1">array</span>(<span class="php-keyword2">get_class</span>(), <span class="php-quote">'chargerClasse'</span>));
</span><span id="284" class="l"><a class="l" href="#284">284: </a> } <span class="php-keyword1">else</span> {
</span><span id="285" class="l"><a class="l" href="#285">285: </a> self::envoyerEnteteStatutHttp(self::HTTP_CODE_ERREUR);
</span><span id="286" class="l"><a class="l" href="#286">286: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;La classe Serveur du TBFRamework nécessite, pour fonctionner, l'accès aux variables serveurs REQUEST_URI, REQUEST_METHOD et QUERY_STRING.&quot;</span>;
</span><span id="287" class="l"><a class="l" href="#287">287: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="288" class="l"><a class="l" href="#288">288: </a> }
</span><span id="289" class="l"><a class="l" href="#289">289: </a> }
</span><span id="290" class="l"><a class="l" href="#290">290: </a>
</span><span id="291" class="l"><a class="l" href="#291">291: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_initialiserMethode" href="#_initialiserMethode">initialiserMethode</a>() {
</span><span id="292" class="l"><a class="l" href="#292">292: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'HTTP_X_HTTP_METHOD_OVERRIDE'</span>]) &amp;&amp; <span class="php-keyword2">count</span>(<span class="php-keyword2">trim</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'HTTP_X_HTTP_METHOD_OVERRIDE'</span>])) &gt; <span class="php-num">0</span>) {
</span><span id="293" class="l"><a class="l" href="#293">293: </a> <span class="php-var">$this</span>-&gt;methode = <span class="php-keyword2">trim</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'HTTP_X_HTTP_METHOD_OVERRIDE'</span>]);
</span><span id="294" class="l"><a class="l" href="#294">294: </a> } <span class="php-keyword1">else</span> {
</span><span id="295" class="l"><a class="l" href="#295">295: </a> <span class="php-var">$this</span>-&gt;methode = <span class="php-var">$_SERVER</span>[<span class="php-quote">'REQUEST_METHOD'</span>];
</span><span id="296" class="l"><a class="l" href="#296">296: </a> }
</span><span id="297" class="l"><a class="l" href="#297">297: </a> }
</span><span id="298" class="l"><a class="l" href="#298">298: </a>
</span><span id="299" class="l"><a class="l" href="#299">299: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_initialiserRequeteDonnees" href="#_initialiserRequeteDonnees">initialiserRequeteDonnees</a>() {
</span><span id="300" class="l"><a class="l" href="#300">300: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'CONTENT_LENGTH'</span>]) &amp;&amp; <span class="php-var">$_SERVER</span>[<span class="php-quote">'CONTENT_LENGTH'</span>] &gt; <span class="php-num">0</span>) {
</span><span id="301" class="l"><a class="l" href="#301">301: </a> <span class="php-var">$this</span>-&gt;requeteDonnees = <span class="php-quote">''</span>;
</span><span id="302" class="l"><a class="l" href="#302">302: </a> <span class="php-var">$httpContent</span> = <span class="php-keyword2">fopen</span>(<span class="php-quote">'php://input'</span>, <span class="php-quote">'r'</span>);
</span><span id="303" class="l"><a class="l" href="#303">303: </a> <span class="php-keyword1">while</span> (<span class="php-var">$data</span> = <span class="php-keyword2">fread</span>(<span class="php-var">$httpContent</span>, <span class="php-num">1024</span>)) {
</span><span id="304" class="l"><a class="l" href="#304">304: </a> <span class="php-var">$this</span>-&gt;requeteDonnees .= <span class="php-var">$data</span>;
</span><span id="305" class="l"><a class="l" href="#305">305: </a> }
</span><span id="306" class="l"><a class="l" href="#306">306: </a> <span class="php-keyword2">fclose</span>(<span class="php-var">$httpContent</span>);
</span><span id="307" class="l"><a class="l" href="#307">307: </a> }
</span><span id="308" class="l"><a class="l" href="#308">308: </a> }
</span><span id="309" class="l"><a class="l" href="#309">309: </a>
</span><span id="310" class="l"><a class="l" href="#310">310: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_decouperUrlChemin" href="#_decouperUrlChemin">decouperUrlChemin</a>() {
</span><span id="311" class="l"><a class="l" href="#311">311: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'REDIRECT_URL'</span>]) &amp;&amp; <span class="php-var">$_SERVER</span>[<span class="php-quote">'REDIRECT_URL'</span>] != <span class="php-quote">''</span>) {
</span><span id="312" class="l"><a class="l" href="#312">312: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'REDIRECT_QUERY_STRING'</span>]) &amp;&amp; !<span class="php-keyword1">empty</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'REDIRECT_QUERY_STRING'</span>])) {
</span><span id="313" class="l"><a class="l" href="#313">313: </a> <span class="php-var">$url</span> = <span class="php-var">$_SERVER</span>[<span class="php-quote">'REDIRECT_URL'</span>].<span class="php-quote">'?'</span>.<span class="php-var">$_SERVER</span>[<span class="php-quote">'REDIRECT_QUERY_STRING'</span>];
</span><span id="314" class="l"><a class="l" href="#314">314: </a> } <span class="php-keyword1">else</span> {
</span><span id="315" class="l"><a class="l" href="#315">315: </a> <span class="php-var">$url</span> = <span class="php-var">$_SERVER</span>[<span class="php-quote">'REDIRECT_URL'</span>];
</span><span id="316" class="l"><a class="l" href="#316">316: </a> }
</span><span id="317" class="l"><a class="l" href="#317">317: </a> } <span class="php-keyword1">else</span> {
</span><span id="318" class="l"><a class="l" href="#318">318: </a> <span class="php-var">$url</span> = <span class="php-var">$_SERVER</span>[<span class="php-quote">'REQUEST_URI'</span>];
</span><span id="319" class="l"><a class="l" href="#319">319: </a> }
</span><span id="320" class="l"><a class="l" href="#320">320: </a>
</span><span id="321" class="l"><a class="l" href="#321">321: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">strlen</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'QUERY_STRING'</span>]) == <span class="php-num">0</span>) {
</span><span id="322" class="l"><a class="l" href="#322">322: </a> <span class="php-var">$tailleURL</span> = <span class="php-keyword2">strlen</span>(<span class="php-var">$url</span>);
</span><span id="323" class="l"><a class="l" href="#323">323: </a> } <span class="php-keyword1">else</span> {
</span><span id="324" class="l"><a class="l" href="#324">324: </a> <span class="php-var">$tailleURL</span> = -(<span class="php-keyword2">strlen</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'QUERY_STRING'</span>]) + <span class="php-num">1</span>);
</span><span id="325" class="l"><a class="l" href="#325">325: </a> }
</span><span id="326" class="l"><a class="l" href="#326">326: </a>
</span><span id="327" class="l"><a class="l" href="#327">327: </a> <span class="php-var">$urlChaine</span> = <span class="php-quote">''</span>;
</span><span id="328" class="l"><a class="l" href="#328">328: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">strpos</span>(<span class="php-var">$url</span>, Config::get(<span class="php-quote">'serveur.baseURL'</span>)) !== <span class="php-keyword1">false</span>) {
</span><span id="329" class="l"><a class="l" href="#329">329: </a> <span class="php-var">$urlChaine</span> = <span class="php-keyword2">substr</span>(<span class="php-var">$url</span>, <span class="php-keyword2">strlen</span>(Config::get(<span class="php-quote">'serveur.baseURL'</span>)), <span class="php-var">$tailleURL</span>);
</span><span id="330" class="l"><a class="l" href="#330">330: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-keyword2">strpos</span>(<span class="php-var">$url</span>, Config::get(<span class="php-quote">'serveur.baseAlternativeURL'</span>)) !== <span class="php-keyword1">false</span>) {
</span><span id="331" class="l"><a class="l" href="#331">331: </a> <span class="php-var">$urlChaine</span> = <span class="php-keyword2">substr</span>(<span class="php-var">$url</span>, <span class="php-keyword2">strlen</span>(Config::get(<span class="php-quote">'serveur.baseAlternativeURL'</span>)), <span class="php-var">$tailleURL</span>);
</span><span id="332" class="l"><a class="l" href="#332">332: </a> }
</span><span id="333" class="l"><a class="l" href="#333">333: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">explode</span>(<span class="php-quote">'/'</span>, <span class="php-var">$urlChaine</span>);
</span><span id="334" class="l"><a class="l" href="#334">334: </a> }
</span><span id="335" class="l"><a class="l" href="#335">335: </a>
</span><span id="336" class="l"><a class="l" href="#336">336: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_initialiserApiVersion" href="#_initialiserApiVersion">initialiserApiVersion</a>(<span class="php-var">$apiVersion</span>) {
</span><span id="337" class="l"><a class="l" href="#337">337: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;verifierApiVersion(<span class="php-var">$apiVersion</span>)) {
</span><span id="338" class="l"><a class="l" href="#338">338: </a> <span class="php-var">$this</span>-&gt;apiVersion = <span class="php-var">$apiVersion</span>;
</span><span id="339" class="l"><a class="l" href="#339">339: </a> self::<span class="php-var">$config</span>[<span class="php-quote">'chemins'</span>][<span class="php-quote">'api'</span>] = Config::get(<span class="php-quote">'chemin_modules'</span>).<span class="php-var">$this</span>-&gt;apiVersion.DS;
</span><span id="340" class="l"><a class="l" href="#340">340: </a> self::<span class="php-var">$config</span>[<span class="php-quote">'chemins'</span>][<span class="php-quote">'api_bibliotheque'</span>] = self::<span class="php-var">$config</span>[<span class="php-quote">'chemins'</span>][<span class="php-quote">'api'</span>].Config::get(<span class="php-quote">'dossier_bibliotheque'</span>).DS;
</span><span id="341" class="l"><a class="l" href="#341">341: </a> } <span class="php-keyword1">else</span> {
</span><span id="342" class="l"><a class="l" href="#342">342: </a> self::envoyerEnteteStatutHttp(self::HTTP_CODE_MAUVAISE_REQUETE);
</span><span id="343" class="l"><a class="l" href="#343">343: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Aucune version d'API n'a été spécifiée.\n&quot;</span>.
</span><span id="344" class="l"><a class="l" href="#344">344: </a> <span class="php-quote">&quot;La version doit respecter l'expression régulière suivante : &quot;</span>.self::MOTIF_API_VERSION.<span class="php-quote">&quot;.\n&quot;</span>.
</span><span id="345" class="l"><a class="l" href="#345">345: </a> <span class="php-quote">&quot;L'url doit avoir la forme suivante : http://www.mondomaine.org/services/apiVersion/monService/&quot;</span>;
</span><span id="346" class="l"><a class="l" href="#346">346: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="347" class="l"><a class="l" href="#347">347: </a> self::cloreAccesServeur();
</span><span id="348" class="l"><a class="l" href="#348">348: </a> }
</span><span id="349" class="l"><a class="l" href="#349">349: </a> }
</span><span id="350" class="l"><a class="l" href="#350">350: </a>
</span><span id="351" class="l"><a class="l" href="#351">351: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_verifierApiVersion" href="#_verifierApiVersion">verifierApiVersion</a>(<span class="php-var">$apiVersion</span>) {
</span><span id="352" class="l"><a class="l" href="#352">352: </a> <span class="php-var">$apiOk</span> = <span class="php-keyword1">false</span>;
</span><span id="353" class="l"><a class="l" href="#353">353: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$apiVersion</span>) &amp;&amp; !<span class="php-keyword1">empty</span>(<span class="php-var">$apiVersion</span>) &amp;&amp; <span class="php-keyword2">preg_match</span>(self::MOTIF_API_VERSION, <span class="php-var">$apiVersion</span>)) {
</span><span id="354" class="l"><a class="l" href="#354">354: </a> <span class="php-var">$apiOk</span> = <span class="php-keyword1">true</span>;
</span><span id="355" class="l"><a class="l" href="#355">355: </a> }
</span><span id="356" class="l"><a class="l" href="#356">356: </a> <span class="php-keyword1">return</span> <span class="php-var">$apiOk</span>;
</span><span id="357" class="l"><a class="l" href="#357">357: </a> }
</span><span id="358" class="l"><a class="l" href="#358">358: </a>
</span><span id="359" class="l"><a class="l" href="#359">359: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_initialiserServiceNom" href="#_initialiserServiceNom">initialiserServiceNom</a>(<span class="php-var">$serviceNom</span>) {
</span><span id="360" class="l"><a class="l" href="#360">360: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;verifierServiceNom(<span class="php-var">$serviceNom</span>)) {
</span><span id="361" class="l"><a class="l" href="#361">361: </a> <span class="php-var">$this</span>-&gt;service = <span class="php-var">$this</span>-&gt;traiterNomService(<span class="php-var">$serviceNom</span>);
</span><span id="362" class="l"><a class="l" href="#362">362: </a> } <span class="php-keyword1">else</span> {
</span><span id="363" class="l"><a class="l" href="#363">363: </a> self::envoyerEnteteStatutHttp(self::HTTP_CODE_MAUVAISE_REQUETE);
</span><span id="364" class="l"><a class="l" href="#364">364: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Aucune nom de service n'a été spécifié.\n&quot;</span>.
</span><span id="365" class="l"><a class="l" href="#365">365: </a> <span class="php-quote">&quot;La nom du service doit respecter l'expression régulière suivante : &quot;</span>.self::MOTIF_SERVICE_NOM.<span class="php-quote">&quot;.\n&quot;</span>.
</span><span id="366" class="l"><a class="l" href="#366">366: </a> <span class="php-quote">&quot;L'url doit avoir la forme suivante : http://www.mondomaine.org/services/apiVersion/monService/&quot;</span>;
</span><span id="367" class="l"><a class="l" href="#367">367: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="368" class="l"><a class="l" href="#368">368: </a> self::cloreAccesServeur();
</span><span id="369" class="l"><a class="l" href="#369">369: </a> }
</span><span id="370" class="l"><a class="l" href="#370">370: </a> }
</span><span id="371" class="l"><a class="l" href="#371">371: </a>
</span><span id="372" class="l"><a class="l" href="#372">372: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_verifierServiceNom" href="#_verifierServiceNom">verifierServiceNom</a>(<span class="php-var">$serviceNom</span>) {
</span><span id="373" class="l"><a class="l" href="#373">373: </a> <span class="php-var">$serviceNomOk</span> = <span class="php-keyword1">false</span>;
</span><span id="374" class="l"><a class="l" href="#374">374: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$serviceNom</span>) &amp;&amp; !<span class="php-keyword1">empty</span>(<span class="php-var">$serviceNom</span>) &amp;&amp; <span class="php-keyword2">preg_match</span>(self::MOTIF_SERVICE_NOM, <span class="php-var">$serviceNom</span>)) {
</span><span id="375" class="l"><a class="l" href="#375">375: </a> <span class="php-var">$serviceNomOk</span> = <span class="php-keyword1">true</span>;
</span><span id="376" class="l"><a class="l" href="#376">376: </a> }
</span><span id="377" class="l"><a class="l" href="#377">377: </a> <span class="php-keyword1">return</span> <span class="php-var">$serviceNomOk</span>;
</span><span id="378" class="l"><a class="l" href="#378">378: </a> }
</span><span id="379" class="l"><a class="l" href="#379">379: </a>
</span><span id="380" class="l"><a class="l" href="#380">380: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_traiterNomService" href="#_traiterNomService">traiterNomService</a>(<span class="php-var">$serviceNom</span>) {
</span><span id="381" class="l"><a class="l" href="#381">381: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">str_replace</span>(<span class="php-quote">' '</span>, <span class="php-quote">''</span>, <span class="php-keyword2">ucwords</span>(<span class="php-keyword2">str_replace</span>(<span class="php-quote">'-'</span>, <span class="php-quote">' '</span>, <span class="php-keyword2">strtolower</span>(<span class="php-var">$serviceNom</span>))));
</span><span id="382" class="l"><a class="l" href="#382">382: </a> }
</span><span id="383" class="l"><a class="l" href="#383">383: </a>
</span><span id="384" class="l"><a class="l" href="#384">384: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_initialiserRessource" href="#_initialiserRessource">initialiserRessource</a>(<span class="php-var">$urlParts</span>) {
</span><span id="385" class="l"><a class="l" href="#385">385: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$urlParts</span>) &amp;&amp; <span class="php-keyword2">count</span>(<span class="php-var">$urlParts</span>) &gt; <span class="php-num">0</span>) {
</span><span id="386" class="l"><a class="l" href="#386">386: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$urlParts</span> <span class="php-keyword1">as</span> <span class="php-var">$ressource</span>) {
</span><span id="387" class="l"><a class="l" href="#387">387: </a> <span class="php-comment">// Ne pas utiliser empty() car valeur 0 acceptée</span>
</span><span id="388" class="l"><a class="l" href="#388">388: </a> <span class="php-keyword1">if</span> (<span class="php-var">$ressource</span> != <span class="php-quote">''</span>) {
</span><span id="389" class="l"><a class="l" href="#389">389: </a> <span class="php-var">$this</span>-&gt;ressources[] = <span class="php-keyword2">urldecode</span>(<span class="php-var">$ressource</span>);
</span><span id="390" class="l"><a class="l" href="#390">390: </a> }
</span><span id="391" class="l"><a class="l" href="#391">391: </a> }
</span><span id="392" class="l"><a class="l" href="#392">392: </a> }
</span><span id="393" class="l"><a class="l" href="#393">393: </a> }
</span><span id="394" class="l"><a class="l" href="#394">394: </a>
</span><span id="395" class="l"><a class="l" href="#395">395: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_initialiserParametres" href="#_initialiserParametres">initialiserParametres</a>() {
</span><span id="396" class="l"><a class="l" href="#396">396: </a> <span class="php-var">$this</span>-&gt;parametres = <span class="php-var">$this</span>-&gt;recupererParametresGet();
</span><span id="397" class="l"><a class="l" href="#397">397: </a> <span class="php-var">$this</span>-&gt;parametresBruts = <span class="php-var">$this</span>-&gt;recupererParametresBruts();
</span><span id="398" class="l"><a class="l" href="#398">398: </a> }
</span><span id="399" class="l"><a class="l" href="#399">399: </a>
</span><span id="400" class="l"><a class="l" href="#400">400: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_recupererParametresGet" href="#_recupererParametresGet">recupererParametresGet</a>() {
</span><span id="401" class="l"><a class="l" href="#401">401: </a> <span class="php-var">$_GET</span> = <span class="php-var">$this</span>-&gt;nettoyerParametres(<span class="php-var">$_GET</span>);
</span><span id="402" class="l"><a class="l" href="#402">402: </a> <span class="php-keyword1">return</span> <span class="php-var">$_GET</span>;
</span><span id="403" class="l"><a class="l" href="#403">403: </a> }
</span><span id="404" class="l"><a class="l" href="#404">404: </a>
</span><span id="405" class="l"><a class="l" href="#405">405: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_nettoyerParametres" href="#_nettoyerParametres">nettoyerParametres</a>(<span class="php-keyword1">Array</span> <span class="php-var">$parametres</span>) {
</span><span id="406" class="l"><a class="l" href="#406">406: </a> <span class="php-comment">// Pas besoin d'utiliser urldecode car déjà fait par php pour les clés et valeur de $_GET</span>
</span><span id="407" class="l"><a class="l" href="#407">407: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$parametres</span>) &amp;&amp; <span class="php-keyword2">count</span>(<span class="php-var">$parametres</span>) &gt; <span class="php-num">0</span>) {
</span><span id="408" class="l"><a class="l" href="#408">408: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$parametres</span> <span class="php-keyword1">as</span> <span class="php-var">$cle</span> =&gt; <span class="php-var">$valeur</span>) {
</span><span id="409" class="l"><a class="l" href="#409">409: </a> <span class="php-comment">// les quotes, guillements et points-virgules ont été retirés des caractères à vérifier car</span>
</span><span id="410" class="l"><a class="l" href="#410">410: </a> <span class="php-comment">//ça n'a plus lieu d'être maintenant que l'on utilise protéger à peu près partout</span>
</span><span id="411" class="l"><a class="l" href="#411">411: </a> <span class="php-var">$verifier</span> = <span class="php-keyword1">array</span>(<span class="php-quote">'NULL'</span>, <span class="php-quote">&quot;\\&quot;</span>, <span class="php-quote">&quot;\x00&quot;</span>, <span class="php-quote">&quot;\x1a&quot;</span>);
</span><span id="412" class="l"><a class="l" href="#412">412: </a> <span class="php-var">$parametres</span>[<span class="php-var">$cle</span>] = <span class="php-keyword2">strip_tags</span>(<span class="php-keyword2">str_replace</span>(<span class="php-var">$verifier</span>, <span class="php-quote">''</span>, <span class="php-var">$valeur</span>));
</span><span id="413" class="l"><a class="l" href="#413">413: </a> }
</span><span id="414" class="l"><a class="l" href="#414">414: </a> }
</span><span id="415" class="l"><a class="l" href="#415">415: </a> <span class="php-keyword1">return</span> <span class="php-var">$parametres</span>;
</span><span id="416" class="l"><a class="l" href="#416">416: </a> }
</span><span id="417" class="l"><a class="l" href="#417">417: </a>
</span><span id="418" class="l"><a class="l" href="#418">418: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_recupererParametresBruts" href="#_recupererParametresBruts">recupererParametresBruts</a>() {
</span><span id="419" class="l"><a class="l" href="#419">419: </a> <span class="php-var">$parametres_bruts</span> = <span class="php-keyword1">array</span>();
</span><span id="420" class="l"><a class="l" href="#420">420: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword1">empty</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'QUERY_STRING'</span>])) {
</span><span id="421" class="l"><a class="l" href="#421">421: </a> <span class="php-var">$paires</span> = <span class="php-keyword2">explode</span>(<span class="php-quote">'&amp;'</span>, <span class="php-var">$_SERVER</span>[<span class="php-quote">'QUERY_STRING'</span>]);
</span><span id="422" class="l"><a class="l" href="#422">422: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$paires</span> <span class="php-keyword1">as</span> <span class="php-var">$paire</span>) {
</span><span id="423" class="l"><a class="l" href="#423">423: </a> <span class="php-var">$nv</span> = <span class="php-keyword2">explode</span>(<span class="php-quote">'='</span>, <span class="php-var">$paire</span>);
</span><span id="424" class="l"><a class="l" href="#424">424: </a> <span class="php-var">$nom</span> = <span class="php-keyword2">urldecode</span>(<span class="php-var">$nv</span>[<span class="php-num">0</span>]);
</span><span id="425" class="l"><a class="l" href="#425">425: </a> <span class="php-var">$valeur</span> = <span class="php-keyword2">urldecode</span>(<span class="php-var">$nv</span>[<span class="php-num">1</span>]);
</span><span id="426" class="l"><a class="l" href="#426">426: </a> <span class="php-var">$parametres_bruts</span>[<span class="php-var">$nom</span>] = <span class="php-var">$valeur</span>;
</span><span id="427" class="l"><a class="l" href="#427">427: </a> }
</span><span id="428" class="l"><a class="l" href="#428">428: </a> <span class="php-var">$parametres_bruts</span> = <span class="php-var">$this</span>-&gt;nettoyerParametres(<span class="php-var">$parametres_bruts</span>);
</span><span id="429" class="l"><a class="l" href="#429">429: </a> }
</span><span id="430" class="l"><a class="l" href="#430">430: </a> <span class="php-keyword1">return</span> <span class="php-var">$parametres_bruts</span>;
</span><span id="431" class="l"><a class="l" href="#431">431: </a> }
</span><span id="432" class="l"><a class="l" href="#432">432: </a>
</span><span id="433" class="l"><a class="l" href="#433">433: </a> <span class="php-comment">/**
</span></span><span id="434" class="l"><a class="l" href="#434">434: </a><span class="php-comment"> * La méthode __autoload() charge dynamiquement les classes trouvées dans le code.
</span></span><span id="435" class="l"><a class="l" href="#435">435: </a><span class="php-comment"> * Cette fonction est appelée par php5 quand il trouve une instanciation de classe dans le code.
</span></span><span id="436" class="l"><a class="l" href="#436">436: </a><span class="php-comment"> *
</span></span><span id="437" class="l"><a class="l" href="#437">437: </a><span class="php-comment"> *@param string le nom de la classe appelée.
</span></span><span id="438" class="l"><a class="l" href="#438">438: </a><span class="php-comment"> *@return void le fichier contenant la classe doit être inclu par la fonction.
</span></span><span id="439" class="l"><a class="l" href="#439">439: </a><span class="php-comment"> */</span>
</span><span id="440" class="l"><a class="l" href="#440">440: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_chargerClasse" href="#_chargerClasse">chargerClasse</a>(<span class="php-var">$classe</span>) {
</span><span id="441" class="l"><a class="l" href="#441">441: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">class_exists</span>(<span class="php-var">$classe</span>)) {
</span><span id="442" class="l"><a class="l" href="#442">442: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">null</span>;
</span><span id="443" class="l"><a class="l" href="#443">443: </a> }
</span><span id="444" class="l"><a class="l" href="#444">444: </a> <span class="php-var">$chemins</span> = <span class="php-keyword1">array</span>(<span class="php-quote">''</span>, self::<span class="php-var">$config</span>[<span class="php-quote">'chemins'</span>][<span class="php-quote">'api'</span>], self::<span class="php-var">$config</span>[<span class="php-quote">'chemins'</span>][<span class="php-quote">'api_bibliotheque'</span>]);
</span><span id="445" class="l"><a class="l" href="#445">445: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$chemins</span> <span class="php-keyword1">as</span> <span class="php-var">$chemin</span>) {
</span><span id="446" class="l"><a class="l" href="#446">446: </a> <span class="php-var">$chemin</span> = <span class="php-var">$chemin</span>.<span class="php-var">$classe</span>.<span class="php-quote">'.php'</span>;
</span><span id="447" class="l"><a class="l" href="#447">447: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">file_exists</span>(<span class="php-var">$chemin</span>)) {
</span><span id="448" class="l"><a class="l" href="#448">448: </a> <span class="php-keyword1">require_once</span> <span class="php-var">$chemin</span>;
</span><span id="449" class="l"><a class="l" href="#449">449: </a> }
</span><span id="450" class="l"><a class="l" href="#450">450: </a> }
</span><span id="451" class="l"><a class="l" href="#451">451: </a> }
</span><span id="452" class="l"><a class="l" href="#452">452: </a>
</span><span id="453" class="l"><a class="l" href="#453">453: </a> <span class="php-comment">/**
</span></span><span id="454" class="l"><a class="l" href="#454">454: </a><span class="php-comment"> * Execute la requête.
</span></span><span id="455" class="l"><a class="l" href="#455">455: </a><span class="php-comment"> */</span>
</span><span id="456" class="l"><a class="l" href="#456">456: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_executer" href="#_executer">executer</a>() {
</span><span id="457" class="l"><a class="l" href="#457">457: </a> <span class="php-var">$retour</span> = <span class="php-quote">''</span>;
</span><span id="458" class="l"><a class="l" href="#458">458: </a> <span class="php-keyword1">switch</span> (<span class="php-var">$this</span>-&gt;methode) {
</span><span id="459" class="l"><a class="l" href="#459">459: </a> <span class="php-keyword1">case</span> <span class="php-quote">'GET'</span>:
</span><span id="460" class="l"><a class="l" href="#460">460: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;get();
</span><span id="461" class="l"><a class="l" href="#461">461: </a> <span class="php-keyword1">break</span>;
</span><span id="462" class="l"><a class="l" href="#462">462: </a> <span class="php-keyword1">case</span> <span class="php-quote">'POST'</span>:
</span><span id="463" class="l"><a class="l" href="#463">463: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;post();<span class="php-comment">// Retour pour l'alternative PUT</span>
</span><span id="464" class="l"><a class="l" href="#464">464: </a> <span class="php-keyword1">break</span>;
</span><span id="465" class="l"><a class="l" href="#465">465: </a> <span class="php-keyword1">case</span> <span class="php-quote">'DELETE'</span>:
</span><span id="466" class="l"><a class="l" href="#466">466: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;<span class="php-keyword2">delete</span>();
</span><span id="467" class="l"><a class="l" href="#467">467: </a> <span class="php-keyword1">break</span>;
</span><span id="468" class="l"><a class="l" href="#468">468: </a> <span class="php-keyword1">case</span> <span class="php-quote">'PUT'</span>:
</span><span id="469" class="l"><a class="l" href="#469">469: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;put();
</span><span id="470" class="l"><a class="l" href="#470">470: </a> <span class="php-keyword1">break</span>;
</span><span id="471" class="l"><a class="l" href="#471">471: </a> <span class="php-comment">// Autorise l'accès depuis des serveurs tiers</span>
</span><span id="472" class="l"><a class="l" href="#472">472: </a> <span class="php-comment">/*
</span></span><span id="473" class="l"><a class="l" href="#473">473: </a><span class="php-comment"> case 'OPTIONS':
</span></span><span id="474" class="l"><a class="l" href="#474">474: </a><span class="php-comment"> header('Access-Control-Allow-Origin: *');
</span></span><span id="475" class="l"><a class="l" href="#475">475: </a><span class="php-comment"> header('Access-Control-Allow-Headers:origin, content-type');
</span></span><span id="476" class="l"><a class="l" href="#476">476: </a><span class="php-comment"> header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
</span></span><span id="477" class="l"><a class="l" href="#477">477: </a><span class="php-comment"> header('Access-Control-Allow-Content-Type: application/json');
</span></span><span id="478" class="l"><a class="l" href="#478">478: </a><span class="php-comment"> header('Access-Control-Max-Age: 3628800');
</span></span><span id="479" class="l"><a class="l" href="#479">479: </a><span class="php-comment"> header('Access-Control-Allow-Credentials: false');
</span></span><span id="480" class="l"><a class="l" href="#480">480: </a><span class="php-comment"> break;
</span></span><span id="481" class="l"><a class="l" href="#481">481: </a><span class="php-comment"> */</span>
</span><span id="482" class="l"><a class="l" href="#482">482: </a> <span class="php-keyword1">default</span> :
</span><span id="483" class="l"><a class="l" href="#483">483: </a> self::envoyerEnteteStatutHttp(self::HTTP_CODE_METHODE_NON_AUTORISE);
</span><span id="484" class="l"><a class="l" href="#484">484: </a> <span class="php-keyword2">header</span>(<span class="php-quote">'Allow: GET, POST, DELETE, PUT'</span>);
</span><span id="485" class="l"><a class="l" href="#485">485: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;La méthode HTTP '</span><span class="php-var">{$this-&gt;methode}</span><span class="php-quote">' n'est pas prise en compte par ce serveur REST.\n&quot;</span>.
</span><span id="486" class="l"><a class="l" href="#486">486: </a> <span class="php-quote">&quot;Consulter l'entête Allow pour connaître les méthodes autorisées.&quot;</span>;
</span><span id="487" class="l"><a class="l" href="#487">487: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="488" class="l"><a class="l" href="#488">488: </a> }
</span><span id="489" class="l"><a class="l" href="#489">489: </a> <span class="php-var">$this</span>-&gt;cloreAccesServeur(<span class="php-var">$retour</span>);
</span><span id="490" class="l"><a class="l" href="#490">490: </a> }
</span><span id="491" class="l"><a class="l" href="#491">491: </a>
</span><span id="492" class="l"><a class="l" href="#492">492: </a> <span class="php-comment">/**
</span></span><span id="493" class="l"><a class="l" href="#493">493: </a><span class="php-comment"> * Execute a GET request. A GET request fetches a list of resource when no resource name is given, a list of element
</span></span><span id="494" class="l"><a class="l" href="#494">494: </a><span class="php-comment"> * when a resource name is given, or a resource element when a resource and resource unique identifier are given. It does not change the
</span></span><span id="495" class="l"><a class="l" href="#495">495: </a><span class="php-comment"> * database contents.
</span></span><span id="496" class="l"><a class="l" href="#496">496: </a><span class="php-comment"> */</span>
</span><span id="497" class="l"><a class="l" href="#497">497: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_get" href="#_get">get</a>() {
</span><span id="498" class="l"><a class="l" href="#498">498: </a> <span class="php-var">$retour</span> = <span class="php-quote">''</span>;
</span><span id="499" class="l"><a class="l" href="#499">499: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;service != <span class="php-keyword1">null</span>) {
</span><span id="500" class="l"><a class="l" href="#500">500: </a> <span class="php-var">$Service</span> = <span class="php-keyword1">new</span> <span class="php-var">$this</span>-&gt;service(self::<span class="php-var">$config</span>);
</span><span id="501" class="l"><a class="l" href="#501">501: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">method_exists</span>(<span class="php-var">$Service</span>, self::METHODE_GET)) {
</span><span id="502" class="l"><a class="l" href="#502">502: </a> <span class="php-var">$methodeGet</span> = self::METHODE_GET;
</span><span id="503" class="l"><a class="l" href="#503">503: </a> <span class="php-var">$parametres</span> = <span class="php-var">$Service</span>-&gt;utiliserParametresBruts() ? <span class="php-var">$this</span>-&gt;parametresBruts : <span class="php-var">$this</span>-&gt;parametres;
</span><span id="504" class="l"><a class="l" href="#504">504: </a> <span class="php-var">$retour</span> = <span class="php-var">$Service</span>-&gt;<span class="php-var">$methodeGet</span>(<span class="php-var">$this</span>-&gt;ressources, <span class="php-var">$parametres</span>);
</span><span id="505" class="l"><a class="l" href="#505">505: </a> } <span class="php-keyword1">else</span> {
</span><span id="506" class="l"><a class="l" href="#506">506: </a> self::envoyerEnteteStatutHttp(self::HTTP_CODE_RESSOURCE_INTROUVABLE);
</span><span id="507" class="l"><a class="l" href="#507">507: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Le service '</span><span class="php-var">{$this-&gt;service}</span><span class="php-quote">' ne contient pas la méthode '&quot;</span>.self::METHODE_GET.<span class="php-quote">&quot;' nécessaire &quot;</span>.
</span><span id="508" class="l"><a class="l" href="#508">508: </a> <span class="php-quote">&quot;lors de l'appel du service via la méthode HTTP GET.&quot;</span>;
</span><span id="509" class="l"><a class="l" href="#509">509: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="510" class="l"><a class="l" href="#510">510: </a> }
</span><span id="511" class="l"><a class="l" href="#511">511: </a> }
</span><span id="512" class="l"><a class="l" href="#512">512: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="513" class="l"><a class="l" href="#513">513: </a> }
</span><span id="514" class="l"><a class="l" href="#514">514: </a>
</span><span id="515" class="l"><a class="l" href="#515">515: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_post" href="#_post">post</a>() {
</span><span id="516" class="l"><a class="l" href="#516">516: </a> <span class="php-var">$retour</span> = <span class="php-quote">''</span>;
</span><span id="517" class="l"><a class="l" href="#517">517: </a> <span class="php-var">$paires</span> = <span class="php-var">$this</span>-&gt;parserDonneesRequete();
</span><span id="518" class="l"><a class="l" href="#518">518: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(<span class="php-var">$paires</span>) != <span class="php-num">0</span>) {
</span><span id="519" class="l"><a class="l" href="#519">519: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$paires</span>[<span class="php-quote">'action'</span>]) &amp;&amp; <span class="php-var">$paires</span>[<span class="php-quote">'action'</span>] == <span class="php-quote">'DELETE'</span>) {<span class="php-comment">// Alternative à l'utilisation de DELETE</span>
</span><span id="520" class="l"><a class="l" href="#520">520: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;<span class="php-keyword2">delete</span>();
</span><span id="521" class="l"><a class="l" href="#521">521: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(<span class="php-var">$this</span>-&gt;ressources) == <span class="php-num">0</span>) {<span class="php-comment">// Alternative à l'utilisation de PUT</span>
</span><span id="522" class="l"><a class="l" href="#522">522: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;put();
</span><span id="523" class="l"><a class="l" href="#523">523: </a> } <span class="php-keyword1">else</span> {
</span><span id="524" class="l"><a class="l" href="#524">524: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;service != <span class="php-keyword1">null</span>) {
</span><span id="525" class="l"><a class="l" href="#525">525: </a> <span class="php-var">$Service</span> = <span class="php-keyword1">new</span> <span class="php-var">$this</span>-&gt;service(self::<span class="php-var">$config</span>);
</span><span id="526" class="l"><a class="l" href="#526">526: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">method_exists</span>(<span class="php-var">$Service</span>, self::METHODE_POST)) {
</span><span id="527" class="l"><a class="l" href="#527">527: </a> <span class="php-var">$methodePost</span> = self::METHODE_POST;
</span><span id="528" class="l"><a class="l" href="#528">528: </a> <span class="php-var">$info</span> = <span class="php-var">$Service</span>-&gt;<span class="php-var">$methodePost</span>(<span class="php-var">$this</span>-&gt;ressources, <span class="php-var">$paires</span>);
</span><span id="529" class="l"><a class="l" href="#529">529: </a> <span class="php-keyword1">if</span> (<span class="php-var">$info</span> !== <span class="php-keyword1">false</span>) {
</span><span id="530" class="l"><a class="l" href="#530">530: </a> <span class="php-var">$this</span>-&gt;envoyerEnteteStatutHttp(self::HTTP_CODE_CREATION_OK);
</span><span id="531" class="l"><a class="l" href="#531">531: </a> <span class="php-var">$retour</span> = <span class="php-var">$info</span>;
</span><span id="532" class="l"><a class="l" href="#532">532: </a> }
</span><span id="533" class="l"><a class="l" href="#533">533: </a> } <span class="php-keyword1">else</span> {
</span><span id="534" class="l"><a class="l" href="#534">534: </a> self::envoyerEnteteStatutHttp(self::HTTP_CODE_RESSOURCE_INTROUVABLE);
</span><span id="535" class="l"><a class="l" href="#535">535: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Le service '</span><span class="php-var">{$this-&gt;service}</span><span class="php-quote">' ne contient pas la méthode '&quot;</span>.self::METHODE_POST.<span class="php-quote">&quot;' nécessaire &quot;</span>.
</span><span id="536" class="l"><a class="l" href="#536">536: </a> <span class="php-quote">&quot;lors de l'appel du service via la méthode HTTP GET.&quot;</span>;
</span><span id="537" class="l"><a class="l" href="#537">537: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="538" class="l"><a class="l" href="#538">538: </a> }
</span><span id="539" class="l"><a class="l" href="#539">539: </a> }
</span><span id="540" class="l"><a class="l" href="#540">540: </a> }
</span><span id="541" class="l"><a class="l" href="#541">541: </a> } <span class="php-keyword1">else</span> {
</span><span id="542" class="l"><a class="l" href="#542">542: </a> <span class="php-var">$this</span>-&gt;envoyerEnteteStatutHttp(self::HTTP_CODE_CONTENU_REQUIS);
</span><span id="543" class="l"><a class="l" href="#543">543: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Le service '</span><span class="php-var">{$this-&gt;service}</span><span class="php-quote">' requiert de fournir le contenu à modifier dans le corps &quot;</span>.
</span><span id="544" class="l"><a class="l" href="#544">544: </a> <span class="php-quote">&quot;de la requête avec la méthode HTTP POST.&quot;</span>;
</span><span id="545" class="l"><a class="l" href="#545">545: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="546" class="l"><a class="l" href="#546">546: </a> }
</span><span id="547" class="l"><a class="l" href="#547">547: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="548" class="l"><a class="l" href="#548">548: </a> }
</span><span id="549" class="l"><a class="l" href="#549">549: </a>
</span><span id="550" class="l"><a class="l" href="#550">550: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_put" href="#_put">put</a>() {
</span><span id="551" class="l"><a class="l" href="#551">551: </a> <span class="php-var">$retour</span> = <span class="php-quote">''</span>;
</span><span id="552" class="l"><a class="l" href="#552">552: </a> <span class="php-var">$paires</span> = <span class="php-var">$this</span>-&gt;parserDonneesRequete();
</span><span id="553" class="l"><a class="l" href="#553">553: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(<span class="php-var">$paires</span>) != <span class="php-num">0</span>) {
</span><span id="554" class="l"><a class="l" href="#554">554: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;service != <span class="php-keyword1">null</span>) {
</span><span id="555" class="l"><a class="l" href="#555">555: </a> <span class="php-var">$Service</span> = <span class="php-keyword1">new</span> <span class="php-var">$this</span>-&gt;service(self::<span class="php-var">$config</span>);
</span><span id="556" class="l"><a class="l" href="#556">556: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">method_exists</span>(<span class="php-var">$Service</span>, self::METHODE_PUT)) {
</span><span id="557" class="l"><a class="l" href="#557">557: </a> <span class="php-var">$methodePut</span> = self::METHODE_PUT;
</span><span id="558" class="l"><a class="l" href="#558">558: </a> <span class="php-var">$info</span> = <span class="php-var">$Service</span>-&gt;<span class="php-var">$methodePut</span>(<span class="php-var">$this</span>-&gt;ressources, <span class="php-var">$paires</span>);
</span><span id="559" class="l"><a class="l" href="#559">559: </a> <span class="php-keyword1">if</span> (<span class="php-var">$info</span> !== <span class="php-keyword1">false</span>) {
</span><span id="560" class="l"><a class="l" href="#560">560: </a> <span class="php-var">$this</span>-&gt;envoyerEnteteStatutHttp(self::HTTP_CODE_CREATION_OK);
</span><span id="561" class="l"><a class="l" href="#561">561: </a> <span class="php-var">$retour</span> = <span class="php-var">$info</span>;
</span><span id="562" class="l"><a class="l" href="#562">562: </a> }
</span><span id="563" class="l"><a class="l" href="#563">563: </a> } <span class="php-keyword1">else</span> {
</span><span id="564" class="l"><a class="l" href="#564">564: </a> self::envoyerEnteteStatutHttp(self::HTTP_CODE_RESSOURCE_INTROUVABLE);
</span><span id="565" class="l"><a class="l" href="#565">565: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Le service '</span><span class="php-var">{$this-&gt;service}</span><span class="php-quote">' ne contient pas la méthode '&quot;</span>.self::METHODE_PUT.<span class="php-quote">&quot;' nécessaire &quot;</span>.
</span><span id="566" class="l"><a class="l" href="#566">566: </a> <span class="php-quote">&quot;lors de l'appel du service via la méthode HTTP GET.&quot;</span>;
</span><span id="567" class="l"><a class="l" href="#567">567: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="568" class="l"><a class="l" href="#568">568: </a> }
</span><span id="569" class="l"><a class="l" href="#569">569: </a> }
</span><span id="570" class="l"><a class="l" href="#570">570: </a> } <span class="php-keyword1">else</span> {
</span><span id="571" class="l"><a class="l" href="#571">571: </a> <span class="php-var">$this</span>-&gt;envoyerEnteteStatutHttp(self::HTTP_CODE_CONTENU_REQUIS);
</span><span id="572" class="l"><a class="l" href="#572">572: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Il est nécessaire de fournir du contenu dans le corps de la requête pour créer une nouvelle ressource.&quot;</span>;
</span><span id="573" class="l"><a class="l" href="#573">573: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="574" class="l"><a class="l" href="#574">574: </a> }
</span><span id="575" class="l"><a class="l" href="#575">575: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="576" class="l"><a class="l" href="#576">576: </a> }
</span><span id="577" class="l"><a class="l" href="#577">577: </a>
</span><span id="578" class="l"><a class="l" href="#578">578: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <span class="php-keyword2">delete</span>() {
</span><span id="579" class="l"><a class="l" href="#579">579: </a> <span class="php-var">$retour</span> = <span class="php-quote">''</span>;
</span><span id="580" class="l"><a class="l" href="#580">580: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(<span class="php-var">$this</span>-&gt;ressources) != <span class="php-num">0</span>) {
</span><span id="581" class="l"><a class="l" href="#581">581: </a> <span class="php-var">$paires</span> = <span class="php-var">$this</span>-&gt;parserDonneesRequete();
</span><span id="582" class="l"><a class="l" href="#582">582: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;service != <span class="php-keyword1">null</span>) {
</span><span id="583" class="l"><a class="l" href="#583">583: </a> <span class="php-var">$Service</span> = <span class="php-keyword1">new</span> <span class="php-var">$this</span>-&gt;service(self::<span class="php-var">$config</span>);
</span><span id="584" class="l"><a class="l" href="#584">584: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">method_exists</span>(<span class="php-var">$Service</span>, self::METHODE_DELETE)) {
</span><span id="585" class="l"><a class="l" href="#585">585: </a> <span class="php-var">$methodeDelete</span> = self::METHODE_DELETE;
</span><span id="586" class="l"><a class="l" href="#586">586: </a> <span class="php-var">$info</span> = <span class="php-var">$Service</span>-&gt;<span class="php-var">$methodeDelete</span>(<span class="php-var">$this</span>-&gt;ressources, <span class="php-var">$paires</span>);
</span><span id="587" class="l"><a class="l" href="#587">587: </a> <span class="php-keyword1">if</span> (<span class="php-var">$info</span> === <span class="php-keyword1">true</span>) {
</span><span id="588" class="l"><a class="l" href="#588">588: </a> <span class="php-var">$this</span>-&gt;envoyerEnteteStatutHttp(self::HTTP_CODE_SUPPRESSION_OK);
</span><span id="589" class="l"><a class="l" href="#589">589: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-var">$info</span> === <span class="php-keyword1">false</span>) {
</span><span id="590" class="l"><a class="l" href="#590">590: </a> <span class="php-var">$this</span>-&gt;envoyerEnteteStatutHttp(self::HTTP_CODE_RESSOURCE_INTROUVABLE);
</span><span id="591" class="l"><a class="l" href="#591">591: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;La ressource à supprimer est introuvable. Il se peut qu'elle ait été préalablement supprimé.&quot;</span>;
</span><span id="592" class="l"><a class="l" href="#592">592: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="593" class="l"><a class="l" href="#593">593: </a> } <span class="php-keyword1">else</span> {
</span><span id="594" class="l"><a class="l" href="#594">594: </a> <span class="php-var">$this</span>-&gt;envoyerEnteteStatutHttp(self::HTTP_CODE_OK);
</span><span id="595" class="l"><a class="l" href="#595">595: </a> <span class="php-var">$retour</span> = <span class="php-var">$info</span>;
</span><span id="596" class="l"><a class="l" href="#596">596: </a> }
</span><span id="597" class="l"><a class="l" href="#597">597: </a> } <span class="php-keyword1">else</span> {
</span><span id="598" class="l"><a class="l" href="#598">598: </a> self::envoyerEnteteStatutHttp(self::HTTP_CODE_RESSOURCE_INTROUVABLE);
</span><span id="599" class="l"><a class="l" href="#599">599: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Le service '</span><span class="php-var">{$this-&gt;service}</span><span class="php-quote">' ne contient pas la méthode '&quot;</span>.self::METHODE_DELETE.<span class="php-quote">&quot;' nécessaire &quot;</span>.
</span><span id="600" class="l"><a class="l" href="#600">600: </a> <span class="php-quote">&quot;lors de l'appel du service via la méthode HTTP GET.&quot;</span>;
</span><span id="601" class="l"><a class="l" href="#601">601: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="602" class="l"><a class="l" href="#602">602: </a> }
</span><span id="603" class="l"><a class="l" href="#603">603: </a> }
</span><span id="604" class="l"><a class="l" href="#604">604: </a> } <span class="php-keyword1">else</span> {
</span><span id="605" class="l"><a class="l" href="#605">605: </a> <span class="php-var">$this</span>-&gt;envoyerEnteteStatutHttp(self::HTTP_CODE_MAUVAISE_REQUETE);
</span><span id="606" class="l"><a class="l" href="#606">606: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Il est nécessaire d'indiquer dans l'url la ressource à supprimer.&quot;</span>;
</span><span id="607" class="l"><a class="l" href="#607">607: </a> self::ajouterMessage(<span class="php-var">$e</span>);
</span><span id="608" class="l"><a class="l" href="#608">608: </a> }
</span><span id="609" class="l"><a class="l" href="#609">609: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="610" class="l"><a class="l" href="#610">610: </a> }
</span><span id="611" class="l"><a class="l" href="#611">611: </a>
</span><span id="612" class="l"><a class="l" href="#612">612: </a> <span class="php-comment">/**
</span></span><span id="613" class="l"><a class="l" href="#613">613: </a><span class="php-comment"> * Parse les données contenu dans le corps de la requête HTTP (= POST) en :
</span></span><span id="614" class="l"><a class="l" href="#614">614: </a><span class="php-comment"> * - décodant les clés et valeurs.
</span></span><span id="615" class="l"><a class="l" href="#615">615: </a><span class="php-comment"> * - supprimant les espaces en début et fin des clés et des valeurs.
</span></span><span id="616" class="l"><a class="l" href="#616">616: </a><span class="php-comment"> *
</span></span><span id="617" class="l"><a class="l" href="#617">617: </a><span class="php-comment"> * @return array Tableau de paires clé et valeur.
</span></span><span id="618" class="l"><a class="l" href="#618">618: </a><span class="php-comment"> */</span>
</span><span id="619" class="l"><a class="l" href="#619">619: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_parserDonneesRequete" href="#_parserDonneesRequete">parserDonneesRequete</a>() {
</span><span id="620" class="l"><a class="l" href="#620">620: </a> <span class="php-var">$donnees</span> = <span class="php-keyword1">array</span>();
</span><span id="621" class="l"><a class="l" href="#621">621: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;requeteDonneesParsees != <span class="php-keyword1">null</span>) {
</span><span id="622" class="l"><a class="l" href="#622">622: </a> <span class="php-var">$donnees</span> = <span class="php-var">$this</span>-&gt;requeteDonneesParsees;
</span><span id="623" class="l"><a class="l" href="#623">623: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;requeteDonnees != <span class="php-keyword1">null</span>) {
</span><span id="624" class="l"><a class="l" href="#624">624: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">preg_match</span>(<span class="php-quote">'/application\/json/'</span>, <span class="php-var">$_SERVER</span>[<span class="php-quote">'CONTENT_TYPE'</span>])) {
</span><span id="625" class="l"><a class="l" href="#625">625: </a> <span class="php-var">$donnees</span> = <span class="php-keyword2">json_decode</span>(<span class="php-var">$this</span>-&gt;requeteDonnees, <span class="php-keyword1">true</span>);
</span><span id="626" class="l"><a class="l" href="#626">626: </a> } <span class="php-keyword1">else</span> {
</span><span id="627" class="l"><a class="l" href="#627">627: </a> <span class="php-var">$paires</span> = <span class="php-keyword2">explode</span>(<span class="php-quote">'&amp;'</span>, <span class="php-var">$this</span>-&gt;requeteDonnees);
</span><span id="628" class="l"><a class="l" href="#628">628: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$paires</span> <span class="php-keyword1">as</span> <span class="php-var">$paire</span>) {
</span><span id="629" class="l"><a class="l" href="#629">629: </a> <span class="php-keyword1">list</span>(<span class="php-var">$cle</span>, <span class="php-var">$valeur</span>) = <span class="php-keyword2">explode</span>(<span class="php-quote">'='</span>, <span class="php-var">$paire</span>);
</span><span id="630" class="l"><a class="l" href="#630">630: </a> <span class="php-var">$cle</span> = (<span class="php-keyword1">isset</span>(<span class="php-var">$cle</span>)) ? <span class="php-keyword2">trim</span>(<span class="php-keyword2">urldecode</span>(<span class="php-var">$cle</span>)) : <span class="php-quote">''</span>;
</span><span id="631" class="l"><a class="l" href="#631">631: </a> <span class="php-var">$valeur</span> = (<span class="php-keyword1">isset</span>(<span class="php-var">$valeur</span>)) ? <span class="php-keyword2">trim</span>(<span class="php-keyword2">urldecode</span>(<span class="php-var">$valeur</span>)) : <span class="php-quote">''</span>;
</span><span id="632" class="l"><a class="l" href="#632">632: </a> <span class="php-var">$donnees</span>[<span class="php-var">$cle</span>] = <span class="php-var">$valeur</span>;
</span><span id="633" class="l"><a class="l" href="#633">633: </a> }
</span><span id="634" class="l"><a class="l" href="#634">634: </a> }
</span><span id="635" class="l"><a class="l" href="#635">635: </a> <span class="php-var">$this</span>-&gt;requeteDonneesParsees = <span class="php-var">$donnees</span>;
</span><span id="636" class="l"><a class="l" href="#636">636: </a> }
</span><span id="637" class="l"><a class="l" href="#637">637: </a> <span class="php-keyword1">return</span> <span class="php-var">$donnees</span>;
</span><span id="638" class="l"><a class="l" href="#638">638: </a> }
</span><span id="639" class="l"><a class="l" href="#639">639: </a>
</span><span id="640" class="l"><a class="l" href="#640">640: </a> <span class="php-comment">/**
</span></span><span id="641" class="l"><a class="l" href="#641">641: </a><span class="php-comment"> * Envoyer un entête HTTP (version 1.0) de statut.
</span></span><span id="642" class="l"><a class="l" href="#642">642: </a><span class="php-comment"> * Il remplacera systématiquement tout entête HTTP de statut précédement envoyé.
</span></span><span id="643" class="l"><a class="l" href="#643">643: </a><span class="php-comment"> * @param int $code entier indiquant le code du statut de l'entête HTTP à envoyer.
</span></span><span id="644" class="l"><a class="l" href="#644">644: </a><span class="php-comment"> */</span>
</span><span id="645" class="l"><a class="l" href="#645">645: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_envoyerEnteteStatutHttp" href="#_envoyerEnteteStatutHttp">envoyerEnteteStatutHttp</a>(<span class="php-var">$code</span>) {
</span><span id="646" class="l"><a class="l" href="#646">646: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(self::<span class="php-var">$http10</span>[<span class="php-var">$code</span>])) {
</span><span id="647" class="l"><a class="l" href="#647">647: </a> <span class="php-var">$txt</span> = self::<span class="php-var">$http10</span>[<span class="php-var">$code</span>];
</span><span id="648" class="l"><a class="l" href="#648">648: </a> <span class="php-keyword2">header</span>(<span class="php-quote">&quot;HTTP/1.0 </span><span class="php-var">$code</span><span class="php-quote"> </span><span class="php-var">$txt</span><span class="php-quote">&quot;</span>, <span class="php-keyword1">true</span>);
</span><span id="649" class="l"><a class="l" href="#649">649: </a> }
</span><span id="650" class="l"><a class="l" href="#650">650: </a> }
</span><span id="651" class="l"><a class="l" href="#651">651: </a>
</span><span id="652" class="l"><a class="l" href="#652">652: </a> <span class="php-comment">/**
</span></span><span id="653" class="l"><a class="l" href="#653">653: </a><span class="php-comment"> * Termine l'accès au serveur après envoir envoyer les messages.
</span></span><span id="654" class="l"><a class="l" href="#654">654: </a><span class="php-comment"> */</span>
</span><span id="655" class="l"><a class="l" href="#655">655: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_cloreAccesServeur" href="#_cloreAccesServeur">cloreAccesServeur</a>(<span class="php-var">$retour</span> = <span class="php-quote">''</span>) {
</span><span id="656" class="l"><a class="l" href="#656">656: </a> <span class="php-comment">// Gestion des exceptions et erreurs générées par les services</span>
</span><span id="657" class="l"><a class="l" href="#657">657: </a> <span class="php-var">$retour</span> .= self::gererErreurs();
</span><span id="658" class="l"><a class="l" href="#658">658: </a>
</span><span id="659" class="l"><a class="l" href="#659">659: </a> <span class="php-comment">// Envoie des messages d'erreur et d'avertissement du serveur</span>
</span><span id="660" class="l"><a class="l" href="#660">660: </a> <span class="php-var">$retour</span> .= self::envoyerMessages();
</span><span id="661" class="l"><a class="l" href="#661">661: </a>
</span><span id="662" class="l"><a class="l" href="#662">662: </a> <span class="php-comment">// Autorise l'accès depuis des serveurs tiers</span>
</span><span id="663" class="l"><a class="l" href="#663">663: </a> <span class="php-comment">//header('Access-Control-Allow-Origin: *');</span>
</span><span id="664" class="l"><a class="l" href="#664">664: </a>
</span><span id="665" class="l"><a class="l" href="#665">665: </a> <span class="php-comment">// Envoie sur la sortie standard le contenu de la réponse HTTP</span>
</span><span id="666" class="l"><a class="l" href="#666">666: </a> <span class="php-keyword1">print</span> <span class="php-var">$retour</span>;
</span><span id="667" class="l"><a class="l" href="#667">667: </a>
</span><span id="668" class="l"><a class="l" href="#668">668: </a> <span class="php-comment">// Nous terminons le script</span>
</span><span id="669" class="l"><a class="l" href="#669">669: </a> <span class="php-keyword1">exit</span>(<span class="php-num">0</span>);
</span><span id="670" class="l"><a class="l" href="#670">670: </a> }
</span><span id="671" class="l"><a class="l" href="#671">671: </a>
</span><span id="672" class="l"><a class="l" href="#672">672: </a> <span class="php-comment">/**
</span></span><span id="673" class="l"><a class="l" href="#673">673: </a><span class="php-comment"> * Si des exceptions ou des erreurs sont soulevées par le serveur ou les services, elles sont gérées par cette méthode.
</span></span><span id="674" class="l"><a class="l" href="#674">674: </a><span class="php-comment"> * Si nous avec des erreurs d'un type différent d'E_USER_NOTICE (réservé au débogage), elle sont renvoyées sur la sortie
</span></span><span id="675" class="l"><a class="l" href="#675">675: </a><span class="php-comment"> * standard (via echo).
</span></span><span id="676" class="l"><a class="l" href="#676">676: </a><span class="php-comment"> * Si seulement des erreurs de type E_USER_NOTICE, sont présentes, elle sont envoyées en fonction du contenu du paramètre de
</span></span><span id="677" class="l"><a class="l" href="#677">677: </a><span class="php-comment"> * config &quot;debogage_mode&quot; :
</span></span><span id="678" class="l"><a class="l" href="#678">678: </a><span class="php-comment"> * - Debug::MODE_ECHO : les messages sont affichés en utilisant echo au moment où ils sont déclenchés dans le code.
</span></span><span id="679" class="l"><a class="l" href="#679">679: </a><span class="php-comment"> * - Debug::MODE_NOTICE : les message sont stockés par le gestionnaire d'exception sous forme d'erreur de type
</span></span><span id="680" class="l"><a class="l" href="#680">680: </a><span class="php-comment"> * E_USER_NOTICE et sont renvoyés sur la sortie standard à la fin de l'execution du programme (via echo).
</span></span><span id="681" class="l"><a class="l" href="#681">681: </a><span class="php-comment"> * - Debug::MODE_ENTETE_HTTP : les message sont stockés par le gestionnaire d'exception sous forme d'erreur de type
</span></span><span id="682" class="l"><a class="l" href="#682">682: </a><span class="php-comment"> * E_USER_NOTICE et sont renvoyés dans un entête HTTP (X_REST_DEBOGAGE_MESSAGES) à la fin de l'execution du programme.
</span></span><span id="683" class="l"><a class="l" href="#683">683: </a><span class="php-comment"> * - Autre valeur : les messages sont formatés puis retournés par la fonction de débogage (à vous de les afficher).
</span></span><span id="684" class="l"><a class="l" href="#684">684: </a><span class="php-comment"> */</span>
</span><span id="685" class="l"><a class="l" href="#685">685: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_gererErreurs" href="#_gererErreurs">gererErreurs</a>() {
</span><span id="686" class="l"><a class="l" href="#686">686: </a> <span class="php-var">$retour</span> = <span class="php-quote">''</span>;
</span><span id="687" class="l"><a class="l" href="#687">687: </a> <span class="php-keyword1">if</span> (self::<span class="php-var">$debogageActivation</span> &amp;&amp; GestionnaireException::getExceptionsNbre() &gt; <span class="php-num">0</span>) {
</span><span id="688" class="l"><a class="l" href="#688">688: </a>
</span><span id="689" class="l"><a class="l" href="#689">689: </a> <span class="php-var">$exceptionsTriees</span> = GestionnaireException::getExceptionsTriees();
</span><span id="690" class="l"><a class="l" href="#690">690: </a> <span class="php-keyword2">reset</span>(<span class="php-var">$exceptionsTriees</span>);
</span><span id="691" class="l"><a class="l" href="#691">691: </a> <span class="php-var">$debogageSeulement</span> = <span class="php-keyword1">true</span>;
</span><span id="692" class="l"><a class="l" href="#692">692: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">array_key_exists</span>(E_USER_ERROR, <span class="php-var">$exceptionsTriees</span>)) {
</span><span id="693" class="l"><a class="l" href="#693">693: </a> self::envoyerEnteteStatutHttp(self::HTTP_CODE_ERREUR);
</span><span id="694" class="l"><a class="l" href="#694">694: </a> <span class="php-var">$debogageSeulement</span> = <span class="php-keyword1">false</span>;
</span><span id="695" class="l"><a class="l" href="#695">695: </a> }
</span><span id="696" class="l"><a class="l" href="#696">696: </a>
</span><span id="697" class="l"><a class="l" href="#697">697: </a> <span class="php-var">$exceptionsFormatees</span> = <span class="php-keyword1">array</span>();
</span><span id="698" class="l"><a class="l" href="#698">698: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$exceptionsTriees</span> <span class="php-keyword1">as</span> <span class="php-var">$exceptions</span>) {
</span><span id="699" class="l"><a class="l" href="#699">699: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$exceptions</span> <span class="php-keyword1">as</span> <span class="php-var">$e</span>) {
</span><span id="700" class="l"><a class="l" href="#700">700: </a> <span class="php-keyword1">if</span> (<span class="php-var">$debogageSeulement</span> &amp;&amp; self::<span class="php-var">$debogageMode</span> == Debug::MODE_ENTETE_HTTP) {
</span><span id="701" class="l"><a class="l" href="#701">701: </a> <span class="php-var">$exceptionsFormatees</span>[] = GestionnaireException::formaterExceptionDebug(<span class="php-var">$e</span>);
</span><span id="702" class="l"><a class="l" href="#702">702: </a> } <span class="php-keyword1">else</span> {
</span><span id="703" class="l"><a class="l" href="#703">703: </a> <span class="php-var">$retour</span> = GestionnaireException::formaterExceptionXhtml(<span class="php-var">$e</span>);
</span><span id="704" class="l"><a class="l" href="#704">704: </a> }
</span><span id="705" class="l"><a class="l" href="#705">705: </a> }
</span><span id="706" class="l"><a class="l" href="#706">706: </a> }
</span><span id="707" class="l"><a class="l" href="#707">707: </a>
</span><span id="708" class="l"><a class="l" href="#708">708: </a> <span class="php-keyword1">if</span> (<span class="php-var">$debogageSeulement</span> &amp;&amp; self::<span class="php-var">$debogageMode</span> == Debug::MODE_ENTETE_HTTP) {
</span><span id="709" class="l"><a class="l" href="#709">709: </a> <span class="php-keyword2">header</span>(<span class="php-quote">'X_REST_DEBOGAGE_MESSAGES: '</span>.<span class="php-keyword2">json_encode</span>(<span class="php-var">$exceptionsFormatees</span>));
</span><span id="710" class="l"><a class="l" href="#710">710: </a> }
</span><span id="711" class="l"><a class="l" href="#711">711: </a> }
</span><span id="712" class="l"><a class="l" href="#712">712: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="713" class="l"><a class="l" href="#713">713: </a> }
</span><span id="714" class="l"><a class="l" href="#714">714: </a>
</span><span id="715" class="l"><a class="l" href="#715">715: </a>
</span><span id="716" class="l"><a class="l" href="#716">716: </a> <span class="php-comment">/**
</span></span><span id="717" class="l"><a class="l" href="#717">717: </a><span class="php-comment"> * Permet d'ajouter un message d'erreur ou d'avertissement qui sera envoyé au client.
</span></span><span id="718" class="l"><a class="l" href="#718">718: </a><span class="php-comment"> * Le message doit être au format texte et en UTF-8.
</span></span><span id="719" class="l"><a class="l" href="#719">719: </a><span class="php-comment"> * @param string $message le message à envoyer.
</span></span><span id="720" class="l"><a class="l" href="#720">720: </a><span class="php-comment"> */</span>
</span><span id="721" class="l"><a class="l" href="#721">721: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_ajouterMessage" href="#_ajouterMessage">ajouterMessage</a>(<span class="php-var">$message</span>) {
</span><span id="722" class="l"><a class="l" href="#722">722: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$message</span>) &amp;&amp; !<span class="php-keyword1">empty</span>(<span class="php-var">$message</span>)) {
</span><span id="723" class="l"><a class="l" href="#723">723: </a> self::<span class="php-var">$messages</span>[] = <span class="php-var">$message</span>;
</span><span id="724" class="l"><a class="l" href="#724">724: </a> }
</span><span id="725" class="l"><a class="l" href="#725">725: </a> }
</span><span id="726" class="l"><a class="l" href="#726">726: </a>
</span><span id="727" class="l"><a class="l" href="#727">727: </a> <span class="php-comment">/**
</span></span><span id="728" class="l"><a class="l" href="#728">728: </a><span class="php-comment"> * Envoie au client les éventuels messages d'erreur et d'avertissement du Serveur.
</span></span><span id="729" class="l"><a class="l" href="#729">729: </a><span class="php-comment"> * Le format d'envoie est text/plain encodé en UTF-8.
</span></span><span id="730" class="l"><a class="l" href="#730">730: </a><span class="php-comment"> */</span>
</span><span id="731" class="l"><a class="l" href="#731">731: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_envoyerMessages" href="#_envoyerMessages">envoyerMessages</a>() {
</span><span id="732" class="l"><a class="l" href="#732">732: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(self::<span class="php-var">$messages</span>) &gt; <span class="php-num">0</span>) {
</span><span id="733" class="l"><a class="l" href="#733">733: </a> <span class="php-keyword2">header</span>(<span class="php-quote">&quot;Content-Type: text/plain; charset=utf-8&quot;</span>);
</span><span id="734" class="l"><a class="l" href="#734">734: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">implode</span>(<span class="php-quote">&quot;\n&quot;</span>, self::<span class="php-var">$messages</span>);
</span><span id="735" class="l"><a class="l" href="#735">735: </a> }
</span><span id="736" class="l"><a class="l" href="#736">736: </a> }
</span><span id="737" class="l"><a class="l" href="#737">737: </a>}
</span><span id="738" class="l"><a class="l" href="#738">738: </a><span class="xlang">?&gt;</span>
</span><span id="739" class="l"><a class="l" href="#739">739: </a></span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Framework.html
New file
0,0 → 1,367
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Framework.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li class="active"><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Framework.html" title="Summary of Framework"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe de base du Framework :
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * - fournissant des infos sur l'application,
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * - paramétrant l'environnement de l'appli et du framework,
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * - réalisant des traitements sur les variables globales ($_GET, $_POST, $_COOKIE...)
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> *
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * Cette classe contient la fonction de chargement automatique de classes.
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * Ce fichier doit toujours rester à la racine du framework car il initialise le chemin
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * de l'application en se basant sur son propre emplacement.
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> *
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @package Framework
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
</span></span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
</span></span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-comment"> * @version $Id: Framework.php 391 2011-11-09 16:55:53Z jpm $
</span></span><span id="20" class="l"><a class="l" href="#20"> 20: </a><span class="php-comment"> * @since 0.3
</span></span><span id="21" class="l"><a class="l" href="#21"> 21: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="22" class="l"><a class="l" href="#22"> 22: </a><span class="php-comment"> */</span>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a><span class="php-keyword1">class</span> <a id="Framework" href="#Framework">Framework</a> {
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a>
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a> <span class="php-comment">/** Variable statique indiquant que les tableaux _GET et _POST ont déjà été encodé au format de l'appli. */</span>
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$encodage" href="#$encodage">$encodage</a></span> = <span class="php-keyword1">false</span>;
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a>
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-comment">/** Tableau d'informations sur l'application */</span>
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$info" href="#$info">$info</a></span> = <span class="php-keyword1">null</span>;
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a>
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> <span class="php-comment">/** Chemin de base de l'application */</span>
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$chemin" href="#$chemin">$chemin</a></span> = <span class="php-keyword1">null</span>;
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a>
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> <span class="php-comment">/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/</span>
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$parametres_obligatoires" href="#$parametres_obligatoires">$parametres_obligatoires</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'chemin_controleurs'</span>, <span class="php-quote">'chemin_modeles'</span>, <span class="php-quote">'chemin_bibliotheque'</span>,
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a> <span class="php-quote">'url_arg_separateur_entree'</span>, <span class="php-quote">'url_arg_separateur_sortie'</span>,
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> <span class="php-quote">'encodage_sortie'</span>, <span class="php-quote">'encodage_appli'</span>);
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a>
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a> <span class="php-comment">/**
</span></span><span id="40" class="l"><a class="l" href="#40"> 40: </a><span class="php-comment"> * Initialise l'environnement nécessaire au Framework : constantes globales, méthodeles autoload, séparateur d'arguments
</span></span><span id="41" class="l"><a class="l" href="#41"> 41: </a><span class="php-comment"> * d'url.
</span></span><span id="42" class="l"><a class="l" href="#42"> 42: </a><span class="php-comment"> * Cette méthode est appelée automatiquement suite à la définition du chemin de l'application via Application::setChemin().
</span></span><span id="43" class="l"><a class="l" href="#43"> 43: </a><span class="php-comment"> */</span>
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_initialiserEnvironnement" href="#_initialiserEnvironnement">initialiserEnvironnement</a>() {
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a> self::enregistrerMethodesAutoload();
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> self::initialiserUrl();
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a> }
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a>
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-comment">/**
</span></span><span id="50" class="l"><a class="l" href="#50"> 50: </a><span class="php-comment"> * Initialise différentes classes du Framework nécessaires pour le fonctionnement de l'application.
</span></span><span id="51" class="l"><a class="l" href="#51"> 51: </a><span class="php-comment"> * Ces classes sont ensuites controlées via les fichiers de config.ini.
</span></span><span id="52" class="l"><a class="l" href="#52"> 52: </a><span class="php-comment"> * Elle est appelée automatiquement suite à la définition du chemin de l'application via Application::setChemin().
</span></span><span id="53" class="l"><a class="l" href="#53"> 53: </a><span class="php-comment"> */</span>
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_initialiserFramework" href="#_initialiserFramework">initialiserFramework</a>() {
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> GestionnaireException::configurer();
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> <span class="php-comment">//Log::configurer();</span>
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> self::verifierEtReencoderTableauRequete();
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> }
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a>
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> <span class="php-comment">/**
</span></span><span id="61" class="l"><a class="l" href="#61"> 61: </a><span class="php-comment"> * Redéfinit des constantes globales utiles pour le Framework et les applis.
</span></span><span id="62" class="l"><a class="l" href="#62"> 62: </a><span class="php-comment"> */</span>
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_definirConstantesGlobales" href="#_definirConstantesGlobales">definirConstantesGlobales</a>() {
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">defined</span>(<span class="php-quote">'DS'</span>)) {
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> <span class="php-comment">/** Redéfinition de la constante DIRECTORY_SEPARATOR en version abrégée DS */</span>
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a> <span class="php-keyword2">define</span>(<span class="php-quote">'DS'</span>, DIRECTORY_SEPARATOR);
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> }
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">defined</span>(<span class="php-quote">'PS'</span>)) {
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> <span class="php-comment">/** Redéfinition de la constante PATH_SEPARATOR en version abrégée PS */</span>
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a> <span class="php-keyword2">define</span>(<span class="php-quote">'PS'</span>, PATH_SEPARATOR);
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a> }
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a> }
</span><span id="73" class="l"><a class="l" href="#73"> 73: </a>
</span><span id="74" class="l"><a class="l" href="#74"> 74: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_definirCheminAppli" href="#_definirCheminAppli">definirCheminAppli</a>(<span class="php-var">$chemin</span>) {
</span><span id="75" class="l"><a class="l" href="#75"> 75: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_file</span>(<span class="php-var">$chemin</span>)) {
</span><span id="76" class="l"><a class="l" href="#76"> 76: </a> self::<span class="php-var">$chemin</span> = <span class="php-keyword2">dirname</span>(<span class="php-var">$chemin</span>).DS;
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_dir</span>(<span class="php-var">$chemin</span>)) {
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> self::<span class="php-var">$chemin</span> = <span class="php-var">$chemin</span>;
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> } <span class="php-keyword1">else</span> {
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> <span class="php-keyword1">throw</span> <span class="php-keyword1">new</span> Exception(<span class="php-quote">&quot;Le chemin indiqué '</span><span class="php-var">$chemin</span><span class="php-quote">' n'est ni un fichier ni un dossier.&quot;</span>);
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a> }
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> }
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a>
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_enregistrerMethodesAutoload" href="#_enregistrerMethodesAutoload">enregistrerMethodesAutoload</a>() {
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a> <span class="php-keyword2">spl_autoload_register</span>(<span class="php-keyword1">array</span>(<span class="php-keyword2">get_class</span>(), <span class="php-quote">'autoloadFw'</span>));
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a>
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-comment">// Vérification des paramètres de configuration obligatoire pour assurer le fonctionnement du Framework</span>
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a> Config::verifierPresenceParametres(self::<span class="php-var">$parametres_obligatoires</span>);
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a>
</span><span id="90" class="l"><a class="l" href="#90"> 90: </a> <span class="php-comment">// Initialisation du gestionnaire d'erreur avant toute chose</span>
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> GestionnaireException::initialiser();
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a>
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-keyword2">spl_autoload_register</span>(<span class="php-keyword1">array</span>(<span class="php-keyword2">get_class</span>(), <span class="php-quote">'autoloadAppliDefaut'</span>));
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a>
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> <span class="php-comment">// Autoload défini par l'application</span>
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">function_exists</span>(<span class="php-quote">'__autoload'</span>)) {
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> <span class="php-keyword2">spl_autoload_register</span>(<span class="php-quote">'__autoload'</span>);
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> }
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> }
</span><span id="100" class="l"><a class="l" href="#100">100: </a>
</span><span id="101" class="l"><a class="l" href="#101">101: </a> <span class="php-comment">/**
</span></span><span id="102" class="l"><a class="l" href="#102">102: </a><span class="php-comment"> * Autoload pour le Framework.
</span></span><span id="103" class="l"><a class="l" href="#103">103: </a><span class="php-comment"> */</span>
</span><span id="104" class="l"><a class="l" href="#104">104: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_autoloadFw" href="#_autoloadFw">autoloadFw</a>(<span class="php-var">$nom_classe_fw</span>) {
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-var">$dossiers_classes</span> = <span class="php-keyword1">array</span>( <span class="php-keyword2">dirname</span>(__FILE__).DS,
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-keyword2">dirname</span>(__FILE__).DS.<span class="php-quote">'utilitaires'</span>.DS);
</span><span id="107" class="l"><a class="l" href="#107">107: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$dossiers_classes</span> <span class="php-keyword1">as</span> <span class="php-var">$chemin</span>) {
</span><span id="108" class="l"><a class="l" href="#108">108: </a> <span class="php-var">$fichier_a_tester</span> = <span class="php-var">$chemin</span>.<span class="php-var">$nom_classe_fw</span>.<span class="php-quote">'.php'</span>;
</span><span id="109" class="l"><a class="l" href="#109">109: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">file_exists</span>(<span class="php-var">$fichier_a_tester</span>)) {
</span><span id="110" class="l"><a class="l" href="#110">110: </a> <span class="php-keyword1">include_once</span> <span class="php-var">$fichier_a_tester</span>;
</span><span id="111" class="l"><a class="l" href="#111">111: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">null</span>;
</span><span id="112" class="l"><a class="l" href="#112">112: </a> }
</span><span id="113" class="l"><a class="l" href="#113">113: </a> }
</span><span id="114" class="l"><a class="l" href="#114">114: </a> }
</span><span id="115" class="l"><a class="l" href="#115">115: </a>
</span><span id="116" class="l"><a class="l" href="#116">116: </a> <span class="php-comment">/**
</span></span><span id="117" class="l"><a class="l" href="#117">117: </a><span class="php-comment"> * Autoload par défaut pour l'application
</span></span><span id="118" class="l"><a class="l" href="#118">118: </a><span class="php-comment"> */</span>
</span><span id="119" class="l"><a class="l" href="#119">119: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_autoloadAppliDefaut" href="#_autoloadAppliDefaut">autoloadAppliDefaut</a>(<span class="php-var">$nom_classe</span>) {
</span><span id="120" class="l"><a class="l" href="#120">120: </a> <span class="php-var">$dossiers_classes</span> = <span class="php-keyword1">array</span>( Config::get(<span class="php-quote">'chemin_controleurs'</span>),
</span><span id="121" class="l"><a class="l" href="#121">121: </a> Config::get(<span class="php-quote">'chemin_modeles'</span>),
</span><span id="122" class="l"><a class="l" href="#122">122: </a> Config::get(<span class="php-quote">'chemin_bibliotheque'</span>));
</span><span id="123" class="l"><a class="l" href="#123">123: </a>
</span><span id="124" class="l"><a class="l" href="#124">124: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$dossiers_classes</span> <span class="php-keyword1">as</span> <span class="php-var">$chemin</span>) {
</span><span id="125" class="l"><a class="l" href="#125">125: </a> <span class="php-var">$fichier_a_tester</span> = <span class="php-var">$chemin</span>.<span class="php-var">$nom_classe</span>.<span class="php-quote">'.php'</span>;
</span><span id="126" class="l"><a class="l" href="#126">126: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">file_exists</span>(<span class="php-var">$fichier_a_tester</span>)) {
</span><span id="127" class="l"><a class="l" href="#127">127: </a> <span class="php-keyword1">include_once</span> <span class="php-var">$fichier_a_tester</span>;
</span><span id="128" class="l"><a class="l" href="#128">128: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">null</span>;
</span><span id="129" class="l"><a class="l" href="#129">129: </a> }
</span><span id="130" class="l"><a class="l" href="#130">130: </a> }
</span><span id="131" class="l"><a class="l" href="#131">131: </a> }
</span><span id="132" class="l"><a class="l" href="#132">132: </a>
</span><span id="133" class="l"><a class="l" href="#133">133: </a> <span class="php-comment">/**
</span></span><span id="134" class="l"><a class="l" href="#134">134: </a><span class="php-comment"> * Initialise le format des urls.
</span></span><span id="135" class="l"><a class="l" href="#135">135: </a><span class="php-comment"> */</span>
</span><span id="136" class="l"><a class="l" href="#136">136: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_initialiserUrl" href="#_initialiserUrl">initialiserUrl</a>() {
</span><span id="137" class="l"><a class="l" href="#137">137: </a> <span class="php-keyword2">ini_set</span>(<span class="php-quote">'arg_separator.input'</span>, Config::get(<span class="php-quote">'furl_arg_separateur_entree'</span>));
</span><span id="138" class="l"><a class="l" href="#138">138: </a> <span class="php-keyword2">ini_set</span>(<span class="php-quote">'arg_separator.output'</span>, Config::get(<span class="php-quote">'url_arg_separateur_sortie'</span>));
</span><span id="139" class="l"><a class="l" href="#139">139: </a> }
</span><span id="140" class="l"><a class="l" href="#140">140: </a>
</span><span id="141" class="l"><a class="l" href="#141">141: </a> <span class="php-comment">/**
</span></span><span id="142" class="l"><a class="l" href="#142">142: </a><span class="php-comment"> * Permet d'indiquer le chemin de base de l'Application.
</span></span><span id="143" class="l"><a class="l" href="#143">143: </a><span class="php-comment"> * Cette méthode doit obligatoirement être utilisée par l'application pour que le Framework fonctionne correctement.
</span></span><span id="144" class="l"><a class="l" href="#144">144: </a><span class="php-comment"> * @param string $chemin_fichier_principal chemin de base
</span></span><span id="145" class="l"><a class="l" href="#145">145: </a><span class="php-comment"> */</span>
</span><span id="146" class="l"><a class="l" href="#146">146: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_setCheminAppli" href="#_setCheminAppli">setCheminAppli</a>(<span class="php-var">$chemin_fichier_principal</span>) {
</span><span id="147" class="l"><a class="l" href="#147">147: </a> <span class="php-keyword1">if</span> (self::<span class="php-var">$chemin</span> === <span class="php-keyword1">null</span>) {
</span><span id="148" class="l"><a class="l" href="#148">148: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">file_exists</span>(<span class="php-var">$chemin_fichier_principal</span>)) {
</span><span id="149" class="l"><a class="l" href="#149">149: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Le fichier indiqué n'existe pas. Utilisez __FILE__ dans la méthode setCheminAppli().&quot;</span>, E_USER_ERROR);
</span><span id="150" class="l"><a class="l" href="#150">150: </a> } <span class="php-keyword1">else</span> {
</span><span id="151" class="l"><a class="l" href="#151">151: </a> self::definirConstantesGlobales();
</span><span id="152" class="l"><a class="l" href="#152">152: </a> self::definirCheminAppli(<span class="php-var">$chemin_fichier_principal</span>);
</span><span id="153" class="l"><a class="l" href="#153">153: </a> self::initialiserEnvironnement();
</span><span id="154" class="l"><a class="l" href="#154">154: </a> self::initialiserFramework();
</span><span id="155" class="l"><a class="l" href="#155">155: </a> }
</span><span id="156" class="l"><a class="l" href="#156">156: </a> } <span class="php-keyword1">else</span> {
</span><span id="157" class="l"><a class="l" href="#157">157: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Le chemin de l'application a déjà été enregistré auprès du Framework&quot;</span>, E_USER_WARNING);
</span><span id="158" class="l"><a class="l" href="#158">158: </a> }
</span><span id="159" class="l"><a class="l" href="#159">159: </a> }
</span><span id="160" class="l"><a class="l" href="#160">160: </a>
</span><span id="161" class="l"><a class="l" href="#161">161: </a> <span class="php-comment">/**
</span></span><span id="162" class="l"><a class="l" href="#162">162: </a><span class="php-comment"> * accesseur pour le chemin
</span></span><span id="163" class="l"><a class="l" href="#163">163: </a><span class="php-comment"> * @return string le chemin
</span></span><span id="164" class="l"><a class="l" href="#164">164: </a><span class="php-comment"> */</span>
</span><span id="165" class="l"><a class="l" href="#165">165: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getCheminAppli" href="#_getCheminAppli">getCheminAppli</a>() {
</span><span id="166" class="l"><a class="l" href="#166">166: </a> <span class="php-keyword1">return</span> self::<span class="php-var">$chemin</span>;
</span><span id="167" class="l"><a class="l" href="#167">167: </a> }
</span><span id="168" class="l"><a class="l" href="#168">168: </a>
</span><span id="169" class="l"><a class="l" href="#169">169: </a> <span class="php-comment">/** Le tableau des informations sur l'application possède les clés suivantes :
</span></span><span id="170" class="l"><a class="l" href="#170">170: </a><span class="php-comment"> * - nom : nom de l'application
</span></span><span id="171" class="l"><a class="l" href="#171">171: </a><span class="php-comment"> * - abr : abréviation de l'application
</span></span><span id="172" class="l"><a class="l" href="#172">172: </a><span class="php-comment"> * - encodage : encodage de l'application (ISO-8859-15, UTF-8...)
</span></span><span id="173" class="l"><a class="l" href="#173">173: </a><span class="php-comment"> *
</span></span><span id="174" class="l"><a class="l" href="#174">174: </a><span class="php-comment"> * @param array $info tableau fournissant des informations sur l'application
</span></span><span id="175" class="l"><a class="l" href="#175">175: </a><span class="php-comment"> * @return void
</span></span><span id="176" class="l"><a class="l" href="#176">176: </a><span class="php-comment"> */</span>
</span><span id="177" class="l"><a class="l" href="#177">177: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_setInfoAppli" href="#_setInfoAppli">setInfoAppli</a>(<span class="php-var">$info</span>) {
</span><span id="178" class="l"><a class="l" href="#178">178: </a> <span class="php-keyword1">if</span> (self::<span class="php-var">$info</span> === <span class="php-keyword1">null</span>) {
</span><span id="179" class="l"><a class="l" href="#179">179: </a> self::<span class="php-var">$info</span> = <span class="php-var">$info</span>;
</span><span id="180" class="l"><a class="l" href="#180">180: </a> } <span class="php-keyword1">else</span> {
</span><span id="181" class="l"><a class="l" href="#181">181: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Le informations de l'application ont déjà été enregistrées auprès du Framework&quot;</span>, E_USER_WARNING);
</span><span id="182" class="l"><a class="l" href="#182">182: </a> }
</span><span id="183" class="l"><a class="l" href="#183">183: </a> }
</span><span id="184" class="l"><a class="l" href="#184">184: </a>
</span><span id="185" class="l"><a class="l" href="#185">185: </a> <span class="php-comment">/**
</span></span><span id="186" class="l"><a class="l" href="#186">186: </a><span class="php-comment"> * Accesseur pour le tableau d'infos sur l'application.
</span></span><span id="187" class="l"><a class="l" href="#187">187: </a><span class="php-comment"> * @param string $cle la clé à laquelle on veut accéder
</span></span><span id="188" class="l"><a class="l" href="#188">188: </a><span class="php-comment"> */</span>
</span><span id="189" class="l"><a class="l" href="#189">189: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getInfoAppli" href="#_getInfoAppli">getInfoAppli</a>(<span class="php-var">$cle</span> = <span class="php-keyword1">null</span>) {
</span><span id="190" class="l"><a class="l" href="#190">190: </a> <span class="php-keyword1">if</span> (<span class="php-var">$cle</span> !== <span class="php-keyword1">null</span>) {
</span><span id="191" class="l"><a class="l" href="#191">191: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(self::<span class="php-var">$info</span>[<span class="php-var">$cle</span>])) {
</span><span id="192" class="l"><a class="l" href="#192">192: </a> <span class="php-keyword1">return</span> self::<span class="php-var">$info</span>[<span class="php-var">$cle</span>];
</span><span id="193" class="l"><a class="l" href="#193">193: </a> }
</span><span id="194" class="l"><a class="l" href="#194">194: </a> } <span class="php-keyword1">else</span> {
</span><span id="195" class="l"><a class="l" href="#195">195: </a> <span class="php-keyword1">return</span> self::<span class="php-var">$info</span>;
</span><span id="196" class="l"><a class="l" href="#196">196: </a> }
</span><span id="197" class="l"><a class="l" href="#197">197: </a> }
</span><span id="198" class="l"><a class="l" href="#198">198: </a>
</span><span id="199" class="l"><a class="l" href="#199">199: </a> <span class="php-comment">/**
</span></span><span id="200" class="l"><a class="l" href="#200">200: </a><span class="php-comment"> * Procédure vérifiant l'encodage des tableaux $_GET et $_POST et les transcodant dans l'encodage de l'application
</span></span><span id="201" class="l"><a class="l" href="#201">201: </a><span class="php-comment"> */</span>
</span><span id="202" class="l"><a class="l" href="#202">202: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_verifierEtReencoderTableauRequete" href="#_verifierEtReencoderTableauRequete">verifierEtReencoderTableauRequete</a>() {
</span><span id="203" class="l"><a class="l" href="#203">203: </a> <span class="php-keyword1">if</span> (self::<span class="php-var">$encodage</span> == <span class="php-keyword1">false</span> &amp;&amp; Config::get(<span class="php-quote">'encodage_sortie'</span>) != Config::get(<span class="php-quote">'encodage_appli'</span>)) {
</span><span id="204" class="l"><a class="l" href="#204">204: </a> <span class="php-var">$_POST</span> = self::encoderTableau(<span class="php-var">$_POST</span>, Config::get(<span class="php-quote">'encodage_appli'</span>), Config::get(<span class="php-quote">'encodage_sortie'</span>));
</span><span id="205" class="l"><a class="l" href="#205">205: </a> <span class="php-var">$_GET</span> = self::encoderTableau(<span class="php-var">$_GET</span>, Config::get(<span class="php-quote">'encodage_appli'</span>), Config::get(<span class="php-quote">'encodage_sortie'</span>));
</span><span id="206" class="l"><a class="l" href="#206">206: </a>
</span><span id="207" class="l"><a class="l" href="#207">207: </a> <span class="php-comment">// Traitement des magic quotes</span>
</span><span id="208" class="l"><a class="l" href="#208">208: </a> self::verifierEtTraiterSlashTableauRequete();
</span><span id="209" class="l"><a class="l" href="#209">209: </a>
</span><span id="210" class="l"><a class="l" href="#210">210: </a> self::<span class="php-var">$encodage</span> = <span class="php-keyword1">true</span>;
</span><span id="211" class="l"><a class="l" href="#211">211: </a> }
</span><span id="212" class="l"><a class="l" href="#212">212: </a> }
</span><span id="213" class="l"><a class="l" href="#213">213: </a>
</span><span id="214" class="l"><a class="l" href="#214">214: </a> <span class="php-comment">/**
</span></span><span id="215" class="l"><a class="l" href="#215">215: </a><span class="php-comment"> * Procédure vérifiant l'activation des magic quotes et remplacant les slash dans les tableaux de requete
</span></span><span id="216" class="l"><a class="l" href="#216">216: </a><span class="php-comment"> */</span>
</span><span id="217" class="l"><a class="l" href="#217">217: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_verifierEtTraiterSlashTableauRequete" href="#_verifierEtTraiterSlashTableauRequete">verifierEtTraiterSlashTableauRequete</a>() {
</span><span id="218" class="l"><a class="l" href="#218">218: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">get_magic_quotes_gpc</span>()) {
</span><span id="219" class="l"><a class="l" href="#219">219: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">function_exists</span>(<span class="php-quote">'nettoyerSlashProfond'</span>)) {
</span><span id="220" class="l"><a class="l" href="#220">220: </a> <span class="php-keyword1">function</span> <a id="_nettoyerSlashProfond" href="#_nettoyerSlashProfond">nettoyerSlashProfond</a>(<span class="php-var">$valeur</span>) {
</span><span id="221" class="l"><a class="l" href="#221">221: </a> <span class="php-keyword1">return</span> ( <span class="php-keyword2">is_array</span>(<span class="php-var">$valeur</span>) ) ? <span class="php-keyword2">array_map</span>(<span class="php-quote">'nettoyerSlashProfond'</span>, <span class="php-var">$valeur</span>) : <span class="php-keyword2">stripslashes</span>(<span class="php-var">$valeur</span>);
</span><span id="222" class="l"><a class="l" href="#222">222: </a> }
</span><span id="223" class="l"><a class="l" href="#223">223: </a> }
</span><span id="224" class="l"><a class="l" href="#224">224: </a> <span class="php-var">$_GET</span> = <span class="php-keyword2">array_map</span>(<span class="php-quote">'nettoyerSlashProfond'</span>, <span class="php-var">$_GET</span>);
</span><span id="225" class="l"><a class="l" href="#225">225: </a> <span class="php-var">$_POST</span> = <span class="php-keyword2">array_map</span>(<span class="php-quote">'nettoyerSlashProfond'</span>, <span class="php-var">$_POST</span>);
</span><span id="226" class="l"><a class="l" href="#226">226: </a> <span class="php-var">$_COOKIE</span> = <span class="php-keyword2">array_map</span>(<span class="php-quote">'nettoyerSlashProfond'</span>, <span class="php-var">$_COOKIE</span>);
</span><span id="227" class="l"><a class="l" href="#227">227: </a> }
</span><span id="228" class="l"><a class="l" href="#228">228: </a> }
</span><span id="229" class="l"><a class="l" href="#229">229: </a>
</span><span id="230" class="l"><a class="l" href="#230">230: </a> <span class="php-comment">/**
</span></span><span id="231" class="l"><a class="l" href="#231">231: </a><span class="php-comment"> * Fonction récursive transcodant toutes les valeurs d'un tableau de leur encodage d'entrée vers un encodage de sortie donné
</span></span><span id="232" class="l"><a class="l" href="#232">232: </a><span class="php-comment"> * @param $tableau Array Un tableau de données à encoder
</span></span><span id="233" class="l"><a class="l" href="#233">233: </a><span class="php-comment"> * @param $encodage_sortie String l'encodage vers lequel on doit transcoder
</span></span><span id="234" class="l"><a class="l" href="#234">234: </a><span class="php-comment"> * @param $encodage_entree String l'encodage original des chaines du tableau (optionnel)
</span></span><span id="235" class="l"><a class="l" href="#235">235: </a><span class="php-comment"> * @return Array Le tableau encodé dans l'encodage de sortie
</span></span><span id="236" class="l"><a class="l" href="#236">236: </a><span class="php-comment"> *
</span></span><span id="237" class="l"><a class="l" href="#237">237: </a><span class="php-comment"> */</span>
</span><span id="238" class="l"><a class="l" href="#238">238: </a> <span class="php-keyword1">final</span> <span class="php-keyword1">static</span> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_encoderTableau" href="#_encoderTableau">encoderTableau</a>(<span class="php-var">$tableau</span>, <span class="php-var">$encodage_sortie</span>, <span class="php-var">$encodage_entree</span> = <span class="php-keyword1">null</span>) {
</span><span id="239" class="l"><a class="l" href="#239">239: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$tableau</span>)) {
</span><span id="240" class="l"><a class="l" href="#240">240: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$tableau</span> <span class="php-keyword1">as</span> <span class="php-var">$cle</span> =&gt; <span class="php-var">$valeur</span>) {
</span><span id="241" class="l"><a class="l" href="#241">241: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$valeur</span>)) {
</span><span id="242" class="l"><a class="l" href="#242">242: </a> <span class="php-var">$tableau</span>[<span class="php-var">$cle</span>] = self::encoderTableau(<span class="php-var">$valeur</span>, <span class="php-var">$encodage_sortie</span>, <span class="php-var">$encodage_entree</span>);
</span><span id="243" class="l"><a class="l" href="#243">243: </a> } <span class="php-keyword1">else</span> {
</span><span id="244" class="l"><a class="l" href="#244">244: </a> <span class="php-var">$tableau</span>[<span class="php-var">$cle</span>] = <span class="php-keyword2">mb_convert_encoding</span>(<span class="php-var">$valeur</span>, <span class="php-var">$encodage_sortie</span>, <span class="php-var">$encodage_entree</span>);
</span><span id="245" class="l"><a class="l" href="#245">245: </a> }
</span><span id="246" class="l"><a class="l" href="#246">246: </a> }
</span><span id="247" class="l"><a class="l" href="#247">247: </a> }
</span><span id="248" class="l"><a class="l" href="#248">248: </a> <span class="php-keyword1">return</span> <span class="php-var">$tableau</span>;
</span><span id="249" class="l"><a class="l" href="#249">249: </a> }
</span><span id="250" class="l"><a class="l" href="#250">250: </a>}
</span><span id="251" class="l"><a class="l" href="#251">251: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-RestService.html
New file
0,0 → 1,661
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class RestService | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li class="active"><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class RestService</h1>
 
 
<div class="description">
<p>Classe principale gérant les services. Paramètres liés dans config.ini : -
serveur.baseURL</p>
 
<p>Encodage en entrée : utf8 Encodage en sortie : utf8</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Abstract</b><br>
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
Php 5.2<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="GPL">v3 &lt;http://www.gnu.org/licenses/gpl.txt&gt;</a><br>
<b>License:</b>
<a href="CECILL">v2 &lt;http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt&gt;</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: RestService.php 382 2011-10-14 10:36:41Z jpm $<br>
<b>Since:</b>
0.3<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-RestService.html#2-150" title="Go to source code">RestService.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-RestService.html#34-37" title="Go to source code">__construct</a>( <span>mixed <var>$config</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="initialiser" id="_initialiser">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_initialiser">#</a>
<code><a href="source-class-RestService.html#39-41" title="Go to source code">initialiser</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getBdd" id="_getBdd">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getBdd">#</a>
<code><a href="source-class-RestService.html#43-52" title="Go to source code">getBdd</a>( )</code>
 
<div class="description short">
<p>Méthode de connection à la base de données sur demande. Tous les services
web n'ont pas besoin de s'y connecter.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Méthode de connection à la base de données sur demande. Tous les services
web n'ont pas besoin de s'y connecter.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getRestClient" id="_getRestClient">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getRestClient">#</a>
<code><a href="source-class-RestService.html#54-62" title="Go to source code">getRestClient</a>( )</code>
 
<div class="description short">
<p>Méthode permettant de faire appel à un client REST en fonction des besoins
du service.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Méthode permettant de faire appel à un client REST en fonction des besoins
du service.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="utiliserParametresBruts" id="_utiliserParametresBruts">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_utiliserParametresBruts">#</a>
<code><a href="source-class-RestService.html#64-70" title="Go to source code">utiliserParametresBruts</a>( )</code>
 
<div class="description short">
<p>Méthode permettant de savoir si le service veut utiliser des paramètres
bruts (issu de la QueryString) ou pas (issu de $_GET).</p>
 
</div>
 
<div class="description detailed hidden">
<p>Méthode permettant de savoir si le service veut utiliser des paramètres
bruts (issu de la QueryString) ou pas (issu de $_GET).</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="ajouterMessage" id="_ajouterMessage">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_ajouterMessage">#</a>
<code><a href="source-class-RestService.html#72-79" title="Go to source code">ajouterMessage</a>( <span>string <var>$message</var></span> )</code>
 
<div class="description short">
<p>Permet d'ajouter un message d'erreur ou d'avertissement qui sera envoyé au
client. Le message doit être au format texte et en UTF-8.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Permet d'ajouter un message d'erreur ou d'avertissement qui sera envoyé au
client. Le message doit être au format texte et en UTF-8.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$message</var></dt>
<dd><code>string</code><br>$message le message à envoyer.</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="consulter" id="_consulter">
 
<td class="attributes"><code>
public
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_consulter">#</a>
<code><a href="source-class-RestService.html#81-94" title="Go to source code">consulter</a>( <span>array <var>$ressources</var></span>, <span>array <var>$parametres</var></span> )</code>
 
<div class="description short">
<p>Méthode appelée lors d'une requête HTTP de type GET.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Méthode appelée lors d'une requête HTTP de type GET.</p>
 
<p>Si la consultation est un succès, le code statut HTTP retourné sera 200.
Dans tous les autres cas, la méthode devra retourner le code statut HTTP
adéquate.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$ressources</var></dt>
<dd><code>array</code><br>Morceaux de l'url servant à préciser la ressource concerné pour le service
demandé.</dd>
<dt><var>$parametres</var></dt>
<dd><code>array</code><br>Partie de l'url situé après le '?' servant à paramétrer le service demandé.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>une chaine indiquant le succès de l'opération et les données demandées.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="modifier" id="_modifier">
 
<td class="attributes"><code>
public
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_modifier">#</a>
<code><a href="source-class-RestService.html#96-111" title="Go to source code">modifier</a>( <span>array <var>$ressources</var></span>, <span>array <var>$requeteDonnees</var></span> )</code>
 
<div class="description short">
<p>Méthode appelée lors d'une requête HTTP de type POST.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Méthode appelée lors d'une requête HTTP de type POST.</p>
 
<p>La ressource à modifier est indiquée via l'url. Les données devant servir
à la mise à jours sont passées dans le corps de la requête. Si la
modification est un succès, la méthode devra retourner "true" et le code
statut HTTP retourné sera 201.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$ressources</var></dt>
<dd><code>array</code><br>Morceaux de l'url servant à préciser la ressource concerné pour le service
demandé.</dd>
<dt><var>$requeteDonnees</var></dt>
<dd><code>array</code><br>les données transférées dans le corps de la requête devant servir à la
modification.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>une chaine indiquant le succès de l'opération ou rien.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="ajouter" id="_ajouter">
 
<td class="attributes"><code>
public
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_ajouter">#</a>
<code><a href="source-class-RestService.html#113-130" title="Go to source code">ajouter</a>( <span>array <var>$ressources</var></span>, <span>array <var>$requeteDonnees</var></span> )</code>
 
<div class="description short">
<p>Méthode appelée lors d'une requête HTTP de type PUT.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Méthode appelée lors d'une requête HTTP de type PUT.</p>
 
<p>L'identifiant de la ressource à ajouter est indiqué via l'url si on le
connait par avance. Sinon, il doit être créé par le service. Dans ce dernier
cas, le nouvel identifiant devrait être renvoyé dans le corps de la réponse.
Si l'ajout est un succès, la méthode devra retourner "true" ou l'identifiant.
Le code statut HTTP retourné sera 201 en cas de succès. Dans le cas contraire,
la méthode devra retourner false.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$ressources</var></dt>
<dd><code>array</code><br>Morceaux de l'url servant à préciser la ressource concerné pour le service
demandé.</dd>
<dt><var>$requeteDonnees</var></dt>
<dd><code>array</code><br>les données transférées dans le corps de la requête devant servir à
l'ajout.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>l'identifiant créé.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimer" id="_supprimer">
 
<td class="attributes"><code>
public
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimer">#</a>
<code><a href="source-class-RestService.html#132-149" title="Go to source code">supprimer</a>( <span>array <var>$ressources</var></span> )</code>
 
<div class="description short">
<p>Méthode appelée lors d'une requête HTTP de type DELETE (ou POST avec
action=DELETE dans le corps de la requete).</p>
 
</div>
 
<div class="description detailed hidden">
<p>Méthode appelée lors d'une requête HTTP de type DELETE (ou POST avec
action=DELETE dans le corps de la requete).</p>
 
<p>Si la suppression est un succès, la méthode devra retourner "true" et le
code statut HTTP retourné par RestServeur sera 204. Si la ressource à
supprimer est introuvable, la méthode devra retourner "false" et le code statut
HTTP retourné par RestServeur sera 404. Dans les autres cas de figure ou si
vous souhaitez gérer vos propres codes de retour erreur, retourner la valeur
null ou rien.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$ressources</var></dt>
<dd><code>array</code><br>Morceaux de l'url servant à préciser la ressource concerné pour le service
demandé.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>une chaine indiquant le succès de l'opération ou rien.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="bdd" id="$bdd">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-RestService.html#22-26" title="Go to source code"><var>$bdd</var></a>
</td>
<td class="value"><code><span class="php-keyword1">null</span></code></td>
<td class="description"><div>
<a href="#$bdd" class="anchor">#</a>
 
<div class="description short">
<p>Objet de connection à la base de données.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Objet de connection à la base de données.</p>
 
 
<h4>Deprecated</h4>
<div class="list">
Utiliser la methode getBdd().<br>
</div>
<h4>See</h4>
<div class="list">
<code><code><a href="class-RestService.html#_getBdd">RestService::getBdd()</a></code></code><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="utilisationParametresBruts" id="$utilisationParametresBruts">
<td class="attributes"><code>
protected
boolean
</code></td>
 
<td class="name">
<a href="source-class-RestService.html#31-32" title="Go to source code"><var>$utilisationParametresBruts</var></a>
</td>
<td class="value"><code><span class="php-keyword1">false</span></code></td>
<td class="description"><div>
<a href="#$utilisationParametresBruts" class="anchor">#</a>
 
<div class="description short">
<p>Indique si oui (true) ou non (false), on veut utiliser les paramètres
brutes.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Indique si oui (true) ou non (false), on veut utiliser les paramètres
brutes.</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Config.html
New file
0,0 → 1,399
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Config.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li class="active"><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Config.html" title="Summary of Config"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Config permet de charger automatiquement les fichiers ini du Framework et de l'application.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * Elle offre l'accès en lecture seule aux paramètres de config.
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * C'est une Singleton.
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * Si vous avez besoin de modifier dynamiquement des paramètres de configuration, utiliser le @see Registe, il est fait pour ça.
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> *
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @package Framework
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @version $Id: Config.php 448 2013-12-19 13:37:39Z jpm $
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> */</span>
</span><span id="18" class="l"><a class="l" href="#18"> 18: </a>
</span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-keyword1">class</span> <a id="Config" href="#Config">Config</a> {
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a>
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a> <span class="php-comment">/** Instance de la classe pointant sur elle même (pour le pattern singleton). */</span>
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$instance" href="#$instance">$instance</a></span> = <span class="php-keyword1">null</span>;
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a>
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a> <span class="php-comment">/** Paramètres de configuration. */</span>
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$parametres" href="#$parametres">$parametres</a></span> = <span class="php-keyword1">array</span>();
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a>
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>() {
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-comment">// Définition de paramètres avant chargement du config.ini</span>
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> self::<span class="php-var">$parametres</span> = <span class="php-keyword1">array</span>(
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a> <span class="php-quote">'fichier_config'</span> =&gt; <span class="php-quote">'config%s.ini'</span>,
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> <span class="php-quote">'chemin_framework'</span> =&gt; <span class="php-keyword2">dirname</span>(__FILE__).DS
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> );
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a>
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> <span class="php-comment">// Chargement du fichier config.ini du Framework</span>
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-var">$existe</span> = self::parserFichierIni(self::<span class="php-var">$parametres</span>[<span class="php-quote">'chemin_framework'</span>].<span class="php-keyword2">sprintf</span>(self::<span class="php-var">$parametres</span>[<span class="php-quote">'fichier_config'</span>], <span class="php-quote">''</span>));
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a> <span class="php-keyword1">if</span> (<span class="php-var">$existe</span> === <span class="php-keyword1">false</span>) {
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Veuillez configurer le Framework en renommant le fichier config.defaut.ini en config.ini.&quot;</span>, E_USER_ERROR);
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a> }
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a>
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> <span class="php-comment">// Chargement du fichier config.ini par défaut de l'application</span>
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a> <span class="php-var">$chemin_config_defaut_appli</span> = self::<span class="php-var">$parametres</span>[<span class="php-quote">'chemin_configurations'</span>].<span class="php-keyword2">sprintf</span>(self::<span class="php-var">$parametres</span>[<span class="php-quote">'fichier_config'</span>], <span class="php-quote">''</span>);
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a> self::parserFichierIni(<span class="php-var">$chemin_config_defaut_appli</span>);
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a>
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a> <span class="php-comment">// Chargement des fichiers config.ini contextuels</span>
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a> <span class="php-keyword1">if</span> (PHP_SAPI == <span class="php-quote">'cli'</span>) {<span class="php-comment">// mode console</span>
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$_SERVER</span>[<span class="php-quote">'argv'</span>] <span class="php-keyword1">as</span> <span class="php-var">$cle</span> =&gt; <span class="php-var">$valeur</span>) {
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a> <span class="php-keyword1">if</span> (<span class="php-var">$valeur</span> == <span class="php-quote">'-contexte'</span>) {
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> self::chargerFichierContexte(<span class="php-var">$_SERVER</span>[<span class="php-quote">'argv'</span>][(<span class="php-var">$cle</span>+<span class="php-num">1</span>)]);
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-keyword1">break</span>;
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> }
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a> }
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> } <span class="php-keyword1">else</span> {<span class="php-comment">// mode web</span>
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a> <span class="php-comment">// Pour Papyrus</span>
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">defined</span>(<span class="php-quote">'PAP_VERSION'</span>)) {
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> self::chargerFichierContexte(<span class="php-quote">'papyrus'</span>);
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> }
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> <span class="php-comment">// Via le fichie .ini par défaut de l'appli</span>
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> <span class="php-keyword1">if</span> (Config::existeValeur(<span class="php-quote">'info.contexte'</span>, self::<span class="php-var">$parametres</span>)) {
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> self::chargerFichierContexte(Config::get(<span class="php-quote">'info.contexte'</span>));
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> }
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a>
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> <span class="php-comment">// Chargement du contexte présent dans le GET</span>
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$_GET</span>[<span class="php-quote">'contexte'</span>])) {
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-var">$_GET</span>[<span class="php-quote">'contexte'</span>] = <span class="php-keyword2">strip_tags</span>(<span class="php-var">$_GET</span>[<span class="php-quote">'contexte'</span>]);
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> self::chargerFichierContexte(<span class="php-var">$_GET</span>[<span class="php-quote">'contexte'</span>]);
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a> }
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a>
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a> <span class="php-comment">// Chargement du contexte présent dans le POST</span>
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$_POST</span>[<span class="php-quote">'contexte'</span>])) {
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a> <span class="php-var">$_POST</span>[<span class="php-quote">'contexte'</span>] = <span class="php-keyword2">strip_tags</span>(<span class="php-var">$_POST</span>[<span class="php-quote">'contexte'</span>]);
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a> self::chargerFichierContexte(<span class="php-var">$_POST</span>[<span class="php-quote">'contexte'</span>]);
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a> }
</span><span id="73" class="l"><a class="l" href="#73"> 73: </a> }
</span><span id="74" class="l"><a class="l" href="#74"> 74: </a> }
</span><span id="75" class="l"><a class="l" href="#75"> 75: </a>
</span><span id="76" class="l"><a class="l" href="#76"> 76: </a> <span class="php-comment">/**
</span></span><span id="77" class="l"><a class="l" href="#77"> 77: </a><span class="php-comment"> * Charge le fichier de config correspondant au contexte
</span></span><span id="78" class="l"><a class="l" href="#78"> 78: </a><span class="php-comment"> * @param string $contexte le contexte
</span></span><span id="79" class="l"><a class="l" href="#79"> 79: </a><span class="php-comment"> */</span>
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_chargerFichierContexte" href="#_chargerFichierContexte">chargerFichierContexte</a>(<span class="php-var">$contexte</span>) {
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a> <span class="php-var">$chemin_config_appli_contextuel</span> = self::<span class="php-var">$parametres</span>[<span class="php-quote">'chemin_configurations'</span>];
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> <span class="php-var">$chemin_config_appli_contextuel</span> .= <span class="php-keyword2">sprintf</span>(self::<span class="php-var">$parametres</span>[<span class="php-quote">'fichier_config'</span>], <span class="php-quote">'_'</span>.<span class="php-var">$contexte</span>);
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a> self::parserFichierIni(<span class="php-var">$chemin_config_appli_contextuel</span>);
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> }
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a>
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a> <span class="php-comment">/**
</span></span><span id="87" class="l"><a class="l" href="#87"> 87: </a><span class="php-comment"> * Parse le fichier ini donné en paramètre
</span></span><span id="88" class="l"><a class="l" href="#88"> 88: </a><span class="php-comment"> * @param string $fichier_ini nom du fichier ini à parser
</span></span><span id="89" class="l"><a class="l" href="#89"> 89: </a><span class="php-comment"> * @return array tableau contenant les paramètres du fichier ini
</span></span><span id="90" class="l"><a class="l" href="#90"> 90: </a><span class="php-comment"> */</span>
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_parserFichierIni" href="#_parserFichierIni">parserFichierIni</a>(<span class="php-var">$fichier_ini</span>) {
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">false</span>;
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">file_exists</span>(<span class="php-var">$fichier_ini</span>)) {
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> <span class="php-var">$ini</span> = <span class="php-keyword2">parse_ini_file</span>(<span class="php-var">$fichier_ini</span>, <span class="php-keyword1">true</span>);
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> <span class="php-var">$ini</span> = self::analyserTableauIni(<span class="php-var">$ini</span>);
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">true</span>;
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> } <span class="php-keyword1">else</span> {
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-keyword2">error_log</span>(<span class="php-quote">&quot;Fichier de configuration introuvable : </span><span class="php-var">$fichier_ini</span><span class="php-quote">&quot;</span>);
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> }
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="101" class="l"><a class="l" href="#101">101: </a> }
</span><span id="102" class="l"><a class="l" href="#102">102: </a>
</span><span id="103" class="l"><a class="l" href="#103">103: </a> <span class="php-comment">/**
</span></span><span id="104" class="l"><a class="l" href="#104">104: </a><span class="php-comment"> * Fusionne un tableau de paramètres avec le tableau de paramètres global
</span></span><span id="105" class="l"><a class="l" href="#105">105: </a><span class="php-comment"> * @param array $ini le tableau à fusionner
</span></span><span id="106" class="l"><a class="l" href="#106">106: </a><span class="php-comment"> */</span>
</span><span id="107" class="l"><a class="l" href="#107">107: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_fusionner" href="#_fusionner">fusionner</a>(<span class="php-keyword1">array</span> <span class="php-var">$ini</span>) {
</span><span id="108" class="l"><a class="l" href="#108">108: </a> self::<span class="php-var">$parametres</span> = <span class="php-keyword2">array_merge</span>(self::<span class="php-var">$parametres</span>, <span class="php-var">$ini</span>);
</span><span id="109" class="l"><a class="l" href="#109">109: </a> }
</span><span id="110" class="l"><a class="l" href="#110">110: </a>
</span><span id="111" class="l"><a class="l" href="#111">111: </a> <span class="php-comment">/**
</span></span><span id="112" class="l"><a class="l" href="#112">112: </a><span class="php-comment"> * Renvoie la valeur demandée grâce une chaîne de paramètres
</span></span><span id="113" class="l"><a class="l" href="#113">113: </a><span class="php-comment"> * @param string $param la chaine de paramètres
</span></span><span id="114" class="l"><a class="l" href="#114">114: </a><span class="php-comment"> * @param array $config le tableau de paramètre
</span></span><span id="115" class="l"><a class="l" href="#115">115: </a><span class="php-comment"> * @return string la valeur de la chaine demandée
</span></span><span id="116" class="l"><a class="l" href="#116">116: </a><span class="php-comment"> */</span>
</span><span id="117" class="l"><a class="l" href="#117">117: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getValeur" href="#_getValeur">getValeur</a>(<span class="php-var">$param</span>, <span class="php-var">$config</span>) {
</span><span id="118" class="l"><a class="l" href="#118">118: </a> <span class="php-keyword1">if</span> (<span class="php-var">$param</span> === <span class="php-keyword1">null</span>) {
</span><span id="119" class="l"><a class="l" href="#119">119: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">null</span>;
</span><span id="120" class="l"><a class="l" href="#120">120: </a> } <span class="php-keyword1">else</span> {
</span><span id="121" class="l"><a class="l" href="#121">121: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$config</span>[<span class="php-var">$param</span>])) {
</span><span id="122" class="l"><a class="l" href="#122">122: </a> <span class="php-keyword1">return</span> <span class="php-var">$config</span>[<span class="php-var">$param</span>];
</span><span id="123" class="l"><a class="l" href="#123">123: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-keyword2">strpos</span>(<span class="php-var">$param</span>, <span class="php-quote">'.'</span>) !== <span class="php-keyword1">false</span>) {
</span><span id="124" class="l"><a class="l" href="#124">124: </a> <span class="php-var">$pieces</span> = <span class="php-keyword2">explode</span>(<span class="php-quote">'.'</span>, <span class="php-var">$param</span>, <span class="php-num">2</span>);
</span><span id="125" class="l"><a class="l" href="#125">125: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">strlen</span>(<span class="php-var">$pieces</span>[<span class="php-num">0</span>]) &amp;&amp; <span class="php-keyword2">strlen</span>(<span class="php-var">$pieces</span>[<span class="php-num">1</span>])) {
</span><span id="126" class="l"><a class="l" href="#126">126: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$config</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]])) {
</span><span id="127" class="l"><a class="l" href="#127">127: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$config</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]])) {
</span><span id="128" class="l"><a class="l" href="#128">128: </a> <span class="php-keyword1">return</span> self::getValeur(<span class="php-var">$pieces</span>[<span class="php-num">1</span>], <span class="php-var">$config</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]]);
</span><span id="129" class="l"><a class="l" href="#129">129: </a> }
</span><span id="130" class="l"><a class="l" href="#130">130: </a> }
</span><span id="131" class="l"><a class="l" href="#131">131: </a> }
</span><span id="132" class="l"><a class="l" href="#132">132: </a> } <span class="php-keyword1">else</span> {
</span><span id="133" class="l"><a class="l" href="#133">133: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">null</span>;
</span><span id="134" class="l"><a class="l" href="#134">134: </a> }
</span><span id="135" class="l"><a class="l" href="#135">135: </a> }
</span><span id="136" class="l"><a class="l" href="#136">136: </a> }
</span><span id="137" class="l"><a class="l" href="#137">137: </a>
</span><span id="138" class="l"><a class="l" href="#138">138: </a> <span class="php-comment">/**
</span></span><span id="139" class="l"><a class="l" href="#139">139: </a><span class="php-comment"> * Teste si param existe dans le tableau config
</span></span><span id="140" class="l"><a class="l" href="#140">140: </a><span class="php-comment"> * @param string $param nom du paramètre
</span></span><span id="141" class="l"><a class="l" href="#141">141: </a><span class="php-comment"> * @param array tableau de configuration
</span></span><span id="142" class="l"><a class="l" href="#142">142: </a><span class="php-comment"> */</span>
</span><span id="143" class="l"><a class="l" href="#143">143: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_existeValeur" href="#_existeValeur">existeValeur</a>(<span class="php-var">$param</span>, <span class="php-var">$config</span>) {
</span><span id="144" class="l"><a class="l" href="#144">144: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">false</span>;
</span><span id="145" class="l"><a class="l" href="#145">145: </a> <span class="php-keyword1">if</span> (self::getValeur(<span class="php-var">$param</span>, <span class="php-var">$config</span>) !== <span class="php-keyword1">null</span>) {
</span><span id="146" class="l"><a class="l" href="#146">146: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">true</span>;
</span><span id="147" class="l"><a class="l" href="#147">147: </a> }
</span><span id="148" class="l"><a class="l" href="#148">148: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="149" class="l"><a class="l" href="#149">149: </a> }
</span><span id="150" class="l"><a class="l" href="#150">150: </a>
</span><span id="151" class="l"><a class="l" href="#151">151: </a> <span class="php-comment">/**
</span></span><span id="152" class="l"><a class="l" href="#152">152: </a><span class="php-comment"> * Vérifie si l'instance de classe à été crée, si non la crée
</span></span><span id="153" class="l"><a class="l" href="#153">153: </a><span class="php-comment"> */</span>
</span><span id="154" class="l"><a class="l" href="#154">154: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_verifierCreationInstance" href="#_verifierCreationInstance">verifierCreationInstance</a>() {
</span><span id="155" class="l"><a class="l" href="#155">155: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">empty</span>(self::<span class="php-var">$instance</span>)) {
</span><span id="156" class="l"><a class="l" href="#156">156: </a> self::<span class="php-var">$instance</span> = <span class="php-keyword1">new</span> Config();
</span><span id="157" class="l"><a class="l" href="#157">157: </a> }
</span><span id="158" class="l"><a class="l" href="#158">158: </a> }
</span><span id="159" class="l"><a class="l" href="#159">159: </a>
</span><span id="160" class="l"><a class="l" href="#160">160: </a> <span class="php-comment">/**
</span></span><span id="161" class="l"><a class="l" href="#161">161: </a><span class="php-comment"> * Analyse un tableau de paramètres.
</span></span><span id="162" class="l"><a class="l" href="#162">162: </a><span class="php-comment"> * @param array $config le tableau de paramètres
</span></span><span id="163" class="l"><a class="l" href="#163">163: </a><span class="php-comment"> * @return array le tableau analysé
</span></span><span id="164" class="l"><a class="l" href="#164">164: </a><span class="php-comment"> */</span>
</span><span id="165" class="l"><a class="l" href="#165">165: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_analyserTableauIni" href="#_analyserTableauIni">analyserTableauIni</a>(<span class="php-var">$config</span> = <span class="php-keyword1">array</span>()) {
</span><span id="166" class="l"><a class="l" href="#166">166: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$config</span> <span class="php-keyword1">as</span> <span class="php-var">$cle</span> =&gt; &amp;<span class="php-var">$valeur</span>) {
</span><span id="167" class="l"><a class="l" href="#167">167: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$valeur</span>)) {
</span><span id="168" class="l"><a class="l" href="#168">168: </a> <span class="php-var">$config</span>[<span class="php-var">$cle</span>] = self::analyserTableauIni(<span class="php-var">$valeur</span>);
</span><span id="169" class="l"><a class="l" href="#169">169: </a> } <span class="php-keyword1">else</span> {
</span><span id="170" class="l"><a class="l" href="#170">170: </a> self::evaluerReferences(<span class="php-var">$config</span>, <span class="php-var">$cle</span>);
</span><span id="171" class="l"><a class="l" href="#171">171: </a> self::evaluerPhp(<span class="php-var">$config</span>, <span class="php-var">$cle</span>);
</span><span id="172" class="l"><a class="l" href="#172">172: </a> self::evaluerCle(<span class="php-var">$config</span>, <span class="php-var">$cle</span>, <span class="php-var">$config</span>[<span class="php-var">$cle</span>]);
</span><span id="173" class="l"><a class="l" href="#173">173: </a> }
</span><span id="174" class="l"><a class="l" href="#174">174: </a> self::fusionner(<span class="php-var">$config</span>);
</span><span id="175" class="l"><a class="l" href="#175">175: </a> }
</span><span id="176" class="l"><a class="l" href="#176">176: </a> <span class="php-keyword1">return</span> <span class="php-var">$config</span>;
</span><span id="177" class="l"><a class="l" href="#177">177: </a> }
</span><span id="178" class="l"><a class="l" href="#178">178: </a>
</span><span id="179" class="l"><a class="l" href="#179">179: </a> <span class="php-comment">/**
</span></span><span id="180" class="l"><a class="l" href="#180">180: </a><span class="php-comment"> * Dans le cas des chaine de configuration à sous clé (ex.: cle.souscle)
</span></span><span id="181" class="l"><a class="l" href="#181">181: </a><span class="php-comment"> * évalue les valeurs correspondantes et crée les sous tableaux associés.
</span></span><span id="182" class="l"><a class="l" href="#182">182: </a><span class="php-comment"> * @param array $config tableau de configuration (par référence)
</span></span><span id="183" class="l"><a class="l" href="#183">183: </a><span class="php-comment"> * @param string $cle la cle dans le tableau
</span></span><span id="184" class="l"><a class="l" href="#184">184: </a><span class="php-comment"> * @param string $valeur la valeur à affecter
</span></span><span id="185" class="l"><a class="l" href="#185">185: </a><span class="php-comment"> */</span>
</span><span id="186" class="l"><a class="l" href="#186">186: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_evaluerCle" href="#_evaluerCle">evaluerCle</a>(&amp;<span class="php-var">$config</span>, <span class="php-var">$cle</span>, <span class="php-var">$valeur</span>) {
</span><span id="187" class="l"><a class="l" href="#187">187: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">strpos</span>(<span class="php-var">$cle</span>, <span class="php-quote">'.'</span>) !== <span class="php-keyword1">false</span>) {
</span><span id="188" class="l"><a class="l" href="#188">188: </a> <span class="php-keyword1">unset</span>(<span class="php-var">$config</span>[<span class="php-var">$cle</span>]);
</span><span id="189" class="l"><a class="l" href="#189">189: </a> <span class="php-var">$pieces</span> = <span class="php-keyword2">explode</span>(<span class="php-quote">'.'</span>, <span class="php-var">$cle</span>, <span class="php-num">2</span>);
</span><span id="190" class="l"><a class="l" href="#190">190: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">strlen</span>(<span class="php-var">$pieces</span>[<span class="php-num">0</span>]) &amp;&amp; <span class="php-keyword2">strlen</span>(<span class="php-var">$pieces</span>[<span class="php-num">1</span>])) {
</span><span id="191" class="l"><a class="l" href="#191">191: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$config</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]]) &amp;&amp; !<span class="php-keyword2">is_array</span>(<span class="php-var">$config</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]])) {
</span><span id="192" class="l"><a class="l" href="#192">192: </a> <span class="php-var">$m</span> = <span class="php-quote">&quot;Ne peut pas créer de sous-clé pour '</span><span class="php-var">{$pieces[0]}</span><span class="php-quote">' car la clé existe déjà&quot;</span>;
</span><span id="193" class="l"><a class="l" href="#193">193: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$m</span>, E_USER_WARNING);
</span><span id="194" class="l"><a class="l" href="#194">194: </a> } <span class="php-keyword1">else</span> {
</span><span id="195" class="l"><a class="l" href="#195">195: </a> <span class="php-var">$config</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]][<span class="php-var">$pieces</span>[<span class="php-num">1</span>]] = <span class="php-var">$valeur</span>;
</span><span id="196" class="l"><a class="l" href="#196">196: </a> <span class="php-var">$config</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]] = self::evaluerCle(<span class="php-var">$config</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]], <span class="php-var">$pieces</span>[<span class="php-num">1</span>], <span class="php-var">$valeur</span>);
</span><span id="197" class="l"><a class="l" href="#197">197: </a> }
</span><span id="198" class="l"><a class="l" href="#198">198: </a> } <span class="php-keyword1">else</span> {
</span><span id="199" class="l"><a class="l" href="#199">199: </a> <span class="php-var">$m</span> = <span class="php-quote">&quot;Clé invalide '</span><span class="php-var">$cle</span><span class="php-quote">'&quot;</span>;
</span><span id="200" class="l"><a class="l" href="#200">200: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$m</span>, E_USER_WARNING);
</span><span id="201" class="l"><a class="l" href="#201">201: </a> }
</span><span id="202" class="l"><a class="l" href="#202">202: </a> } <span class="php-keyword1">else</span> {
</span><span id="203" class="l"><a class="l" href="#203">203: </a> <span class="php-var">$config</span>[<span class="php-var">$cle</span>] = <span class="php-var">$valeur</span>;
</span><span id="204" class="l"><a class="l" href="#204">204: </a> }
</span><span id="205" class="l"><a class="l" href="#205">205: </a> <span class="php-keyword1">return</span> <span class="php-var">$config</span>;
</span><span id="206" class="l"><a class="l" href="#206">206: </a> }
</span><span id="207" class="l"><a class="l" href="#207">207: </a>
</span><span id="208" class="l"><a class="l" href="#208">208: </a> <span class="php-comment">/**
</span></span><span id="209" class="l"><a class="l" href="#209">209: </a><span class="php-comment"> * Évalue les valeurs de références à une clé dans le tableau config (cas du ref:cle).
</span></span><span id="210" class="l"><a class="l" href="#210">210: </a><span class="php-comment"> * @param array $config tableau de configuration
</span></span><span id="211" class="l"><a class="l" href="#211">211: </a><span class="php-comment"> * @param string $cle la clé dont il faut évaluer les références
</span></span><span id="212" class="l"><a class="l" href="#212">212: </a><span class="php-comment"> */</span>
</span><span id="213" class="l"><a class="l" href="#213">213: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_evaluerReferences" href="#_evaluerReferences">evaluerReferences</a>(&amp;<span class="php-var">$config</span>, <span class="php-var">$cle</span>) {
</span><span id="214" class="l"><a class="l" href="#214">214: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">preg_match_all</span>(<span class="php-quote">'/{ref:([A-Za-z0-9_.-]+)}/'</span>, <span class="php-var">$config</span>[<span class="php-var">$cle</span>], <span class="php-var">$correspondances</span>, PREG_SET_ORDER)) {
</span><span id="215" class="l"><a class="l" href="#215">215: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$correspondances</span> <span class="php-keyword1">as</span> <span class="php-var">$ref</span>) {
</span><span id="216" class="l"><a class="l" href="#216">216: </a> <span class="php-var">$config</span>[<span class="php-var">$cle</span>] = <span class="php-keyword2">str_replace</span>(<span class="php-var">$ref</span>[<span class="php-num">0</span>], self::getValeur(<span class="php-var">$ref</span>[<span class="php-num">1</span>], self::<span class="php-var">$parametres</span>), <span class="php-var">$config</span>[<span class="php-var">$cle</span>]);
</span><span id="217" class="l"><a class="l" href="#217">217: </a> }
</span><span id="218" class="l"><a class="l" href="#218">218: </a> }
</span><span id="219" class="l"><a class="l" href="#219">219: </a> }
</span><span id="220" class="l"><a class="l" href="#220">220: </a>
</span><span id="221" class="l"><a class="l" href="#221">221: </a> <span class="php-comment">/**
</span></span><span id="222" class="l"><a class="l" href="#222">222: </a><span class="php-comment"> * Évalue le code php contenu dans un clé tu tableau config.
</span></span><span id="223" class="l"><a class="l" href="#223">223: </a><span class="php-comment"> * @param array $config tableau de configuration (par référence)
</span></span><span id="224" class="l"><a class="l" href="#224">224: </a><span class="php-comment"> * @param string $cle le clé du tableau dont il faut évaluer la valeur
</span></span><span id="225" class="l"><a class="l" href="#225">225: </a><span class="php-comment"> */</span>
</span><span id="226" class="l"><a class="l" href="#226">226: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_evaluerPhp" href="#_evaluerPhp">evaluerPhp</a>(&amp;<span class="php-var">$config</span>, <span class="php-var">$cle</span>) {
</span><span id="227" class="l"><a class="l" href="#227">227: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">preg_match</span>(<span class="php-quote">'/^php:(.+)$/'</span>, <span class="php-var">$config</span>[<span class="php-var">$cle</span>], <span class="php-var">$correspondances</span>)) {
</span><span id="228" class="l"><a class="l" href="#228">228: </a> <span class="php-keyword2">eval</span>(<span class="php-quote">'$config[&quot;'</span>.<span class="php-var">$cle</span>.<span class="php-quote">'&quot;] = '</span>.<span class="php-var">$correspondances</span>[<span class="php-num">1</span>].<span class="php-quote">';'</span>);
</span><span id="229" class="l"><a class="l" href="#229">229: </a> }
</span><span id="230" class="l"><a class="l" href="#230">230: </a> }
</span><span id="231" class="l"><a class="l" href="#231">231: </a>
</span><span id="232" class="l"><a class="l" href="#232">232: </a> <span class="php-comment">/**
</span></span><span id="233" class="l"><a class="l" href="#233">233: </a><span class="php-comment"> * Charge un fichier ini dans le tableau des paramètres de l'appli.
</span></span><span id="234" class="l"><a class="l" href="#234">234: </a><span class="php-comment"> * @param string $fichier_ini le nom du fichier à charger
</span></span><span id="235" class="l"><a class="l" href="#235">235: </a><span class="php-comment"> * @return array le fichier ini parsé
</span></span><span id="236" class="l"><a class="l" href="#236">236: </a><span class="php-comment"> */</span>
</span><span id="237" class="l"><a class="l" href="#237">237: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_charger" href="#_charger">charger</a>(<span class="php-var">$fichier_ini</span>) {
</span><span id="238" class="l"><a class="l" href="#238">238: </a> self::verifierCreationInstance();
</span><span id="239" class="l"><a class="l" href="#239">239: </a> <span class="php-keyword1">return</span> self::parserFichierIni(<span class="php-var">$fichier_ini</span>);
</span><span id="240" class="l"><a class="l" href="#240">240: </a> }
</span><span id="241" class="l"><a class="l" href="#241">241: </a>
</span><span id="242" class="l"><a class="l" href="#242">242: </a> <span class="php-comment">/**
</span></span><span id="243" class="l"><a class="l" href="#243">243: </a><span class="php-comment"> * Accesseur pour la valeur d'un paramètre.
</span></span><span id="244" class="l"><a class="l" href="#244">244: </a><span class="php-comment"> * @param string $param le nom du paramètre
</span></span><span id="245" class="l"><a class="l" href="#245">245: </a><span class="php-comment"> * @return string la valeur du paramètre
</span></span><span id="246" class="l"><a class="l" href="#246">246: </a><span class="php-comment"> */</span>
</span><span id="247" class="l"><a class="l" href="#247">247: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_get" href="#_get">get</a>(<span class="php-var">$param</span> = <span class="php-keyword1">null</span>) {
</span><span id="248" class="l"><a class="l" href="#248">248: </a> self::verifierCreationInstance();
</span><span id="249" class="l"><a class="l" href="#249">249: </a> <span class="php-keyword1">return</span> self::getValeur(<span class="php-var">$param</span>, self::<span class="php-var">$parametres</span>);
</span><span id="250" class="l"><a class="l" href="#250">250: </a> }
</span><span id="251" class="l"><a class="l" href="#251">251: </a>
</span><span id="252" class="l"><a class="l" href="#252">252: </a> <span class="php-comment">/**
</span></span><span id="253" class="l"><a class="l" href="#253">253: </a><span class="php-comment"> * Vérifie si la valeur d'un paramètre existe.
</span></span><span id="254" class="l"><a class="l" href="#254">254: </a><span class="php-comment"> * @param string $param le nom du paramètre
</span></span><span id="255" class="l"><a class="l" href="#255">255: </a><span class="php-comment"> * @return boolean vrai si le paramètre existe, false sinon
</span></span><span id="256" class="l"><a class="l" href="#256">256: </a><span class="php-comment"> */</span>
</span><span id="257" class="l"><a class="l" href="#257">257: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_existe" href="#_existe">existe</a>(<span class="php-var">$param</span>) {
</span><span id="258" class="l"><a class="l" href="#258">258: </a> self::verifierCreationInstance();
</span><span id="259" class="l"><a class="l" href="#259">259: </a> <span class="php-keyword1">return</span> self::existeValeur(<span class="php-var">$param</span>, self::<span class="php-var">$parametres</span>);
</span><span id="260" class="l"><a class="l" href="#260">260: </a> }
</span><span id="261" class="l"><a class="l" href="#261">261: </a>
</span><span id="262" class="l"><a class="l" href="#262">262: </a> <span class="php-comment">/**
</span></span><span id="263" class="l"><a class="l" href="#263">263: </a><span class="php-comment"> * Vérifie que tous les paramêtres de config nécessaires au fonctionnement d'une classe existe dans les fichiers
</span></span><span id="264" class="l"><a class="l" href="#264">264: </a><span class="php-comment"> * de configurations.
</span></span><span id="265" class="l"><a class="l" href="#265">265: </a><span class="php-comment"> * L'utilisation de cette méthode depuis la classe Config évite de faire appel à une classe supplémentaire.
</span></span><span id="266" class="l"><a class="l" href="#266">266: </a><span class="php-comment"> *
</span></span><span id="267" class="l"><a class="l" href="#267">267: </a><span class="php-comment"> * @param array $parametres tableau des noms des paramètres de la config à verifier.
</span></span><span id="268" class="l"><a class="l" href="#268">268: </a><span class="php-comment"> * @return boolean true si tous les paramétres sont présents sinon false.
</span></span><span id="269" class="l"><a class="l" href="#269">269: </a><span class="php-comment"> */</span>
</span><span id="270" class="l"><a class="l" href="#270">270: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_verifierPresenceParametres" href="#_verifierPresenceParametres">verifierPresenceParametres</a>(<span class="php-keyword1">Array</span> <span class="php-var">$parametres</span>) {
</span><span id="271" class="l"><a class="l" href="#271">271: </a> <span class="php-var">$ok</span> = <span class="php-keyword1">true</span>;
</span><span id="272" class="l"><a class="l" href="#272">272: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$parametres</span> <span class="php-keyword1">as</span> <span class="php-var">$param</span>) {
</span><span id="273" class="l"><a class="l" href="#273">273: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_null</span>(self::get(<span class="php-var">$param</span>))) {
</span><span id="274" class="l"><a class="l" href="#274">274: </a> <span class="php-var">$classe</span> = <span class="php-keyword2">get_class</span>();
</span><span id="275" class="l"><a class="l" href="#275">275: </a> <span class="php-var">$m</span> = <span class="php-quote">&quot;L'utilisation de la classe </span><span class="php-var">$classe</span><span class="php-quote"> nécessite de définir '</span><span class="php-var">$param</span><span class="php-quote">' dans un fichier de configuration.&quot;</span>;
</span><span id="276" class="l"><a class="l" href="#276">276: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$m</span>, E_USER_ERROR);
</span><span id="277" class="l"><a class="l" href="#277">277: </a> <span class="php-var">$ok</span> = <span class="php-keyword1">false</span>;
</span><span id="278" class="l"><a class="l" href="#278">278: </a> }
</span><span id="279" class="l"><a class="l" href="#279">279: </a> }
</span><span id="280" class="l"><a class="l" href="#280">280: </a> <span class="php-keyword1">return</span> <span class="php-var">$ok</span>;
</span><span id="281" class="l"><a class="l" href="#281">281: </a> }
</span><span id="282" class="l"><a class="l" href="#282">282: </a>}
</span><span id="283" class="l"><a class="l" href="#283">283: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Cache.html
New file
0,0 → 1,1335
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Cache | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li class="active"><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Cache</h1>
 
 
<div class="description">
<p>Classe Cache permettant de mettre en cache des données. Basée sur les
principes de Zend_Cache (Copyright (c) 2005-2010, Zend Technologies USA, Inc.
All rights reserved.)</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
php 5.2<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://framework.zend.com/license/new-bsd">Licence New BSD</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Cache.php 299 2011-01-18 14:03:46Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Cache.html#3-507" title="Go to source code">Cache.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-Cache.html#98-110" title="Go to source code">__construct</a>( <span>mixed <var>$options</var> = <span class="php-keyword1">array</span>()</span>, <span>mixed <var>$options_stockage</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setEmplacement" id="_setEmplacement">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setEmplacement">#</a>
<code><a href="source-class-Cache.html#132-146" title="Go to source code">setEmplacement</a>( <span>string <var>$emplacement</var></span> )</code>
 
<div class="description short">
<p>Permet de (re-)définir l'emplacement pour le stockage du cache. En fonction
du mode de stockage utilisé , l'emplacement indiqué correspondra au chemin du
:<br />
- dossier où stocker les fichiers pour le mode "fichier".<br />
- fichier de la base de données pour le mode "sqlite".</p>
 
</div>
 
<div class="description detailed hidden">
<p>Permet de (re-)définir l'emplacement pour le stockage du cache. En fonction
du mode de stockage utilisé , l'emplacement indiqué correspondra au chemin du
: - dossier où stocker les fichiers pour le mode "fichier". - fichier de la
base de données pour le mode "sqlite".</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$emplacement</var></dt>
<dd><code>string</code><br>$emplacement chemin vers dossier (Cache::STOCKAGE_MODE_FICHIER) ou fichier base
Sqlite (Cache::STOCKAGE_MODE_SQLITE)</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="fabriquer" id="_fabriquer">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_fabriquer">#</a>
<code><a href="source-class-Cache.html#148-155" title="Go to source code">fabriquer</a>( <span>mixed <var>$mode</var></span>, <span>mixed <var>$options</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="charger" id="_charger">
 
<td class="attributes"><code>
public
mixed|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_charger">#</a>
<code><a href="source-class-Cache.html#157-174" title="Go to source code">charger</a>( <span>string <var>$id</var></span>, <span>boolean <var>$ne_pas_tester_validiter_du_cache</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Teste si un cache est disponible pour l'identifiant donné et (si oui) le
retourne (false dans le cas contraire)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Teste si un cache est disponible pour l'identifiant donné et (si oui) le
retourne (false dans le cas contraire)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Identifiant de cache.</dd>
<dt><var>$ne_pas_tester_validiter_du_cache</var></dt>
<dd><code>boolean</code><br>$ne_pas_tester_validiter_du_cache Si mis à true, la validité du cache n'est
pas testée</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed|false</code><br>Cached datas<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="tester" id="_tester">
 
<td class="attributes"><code>
public
integer|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_tester">#</a>
<code><a href="source-class-Cache.html#176-191" title="Go to source code">tester</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Test if a cache is available for the given id</p>
 
</div>
 
<div class="description detailed hidden">
<p>Test if a cache is available for the given id</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>integer|false</code><br>Last modified time of cache entry if it is available, false otherwise<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="sauver" id="_sauver">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_sauver">#</a>
<code><a href="source-class-Cache.html#193-222" title="Go to source code">sauver</a>( <span>mixed <var>$donnees</var></span>, <span>string <var>$id</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span>, <span>integer <var>$duree_de_vie_specifique</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Sauvegarde en cache les données passées en paramètre.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Sauvegarde en cache les données passées en paramètre.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$donnees</var></dt>
<dd><code>mixed</code><br>$donnees Données à mettre en cache (peut être différent d'une chaine si
serialisation_auto vaut true).</dd>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Identifiant du cache (s'il n'est pas définit, le dernier identifiant sera
utilisé).</dd>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags Mots-clés du cache.</dd>
<dt><var>$duree_de_vie_specifique</var></dt>
<dd><code>integer</code><br>$duree_de_vie_specifique Si != false, indique une durée de vie spécifique pour
cet enregistrement en cache (null =&gt; durée de vie infinie)</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True si aucun problème n'est survenu.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimer" id="_supprimer">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimer">#</a>
<code><a href="source-class-Cache.html#224-238" title="Go to source code">supprimer</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Supprime un enregistrement en cache.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Supprime un enregistrement en cache.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Identificant du cache à supprimer.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True si ok<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="nettoyer" id="_nettoyer">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_nettoyer">#</a>
<code><a href="source-class-Cache.html#240-269" title="Go to source code">nettoyer</a>( <span>string <var>$mode</var> = <code><a href="class-Cache.html#NETTOYAGE_MODE_TOUS">Cache::<b>NETTOYAGE_MODE_TOUS</b></a></code></span>, <span>array|string <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Nettoyage des enregistrements en cache</p>
 
</div>
 
<div class="description detailed hidden">
<p>Nettoyage des enregistrements en cache</p>
 
<p>Mode de nettoyage disponibles : 'tous' (défaut) =&gt; supprime tous les
enregistrements ($tags n'est pas utilisé) 'expiration' =&gt; supprime tous les
enregistrements dont la date d'expériration est dépassée ($tags n'est pas
utilisé) 'avecLesTag' =&gt; supprime tous les enregistrements contenant tous
les tags indiqués 'sansLesTag' =&gt; supprime tous les enregistrements
contenant aucun des tags indiqués 'avecUnTag' =&gt; supprime tous les
enregistrements contenant au moins un des tags indiqués</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$mode</var></dt>
<dd><code>string</code><br>$mode mode de nettoyage</dd>
<dt><var>$tags</var></dt>
<dd><code>array|string</code><br>$tags peut être un tableau de chaîne ou une simple chaine.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True si ok<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIds" id="_getIds">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIds">#</a>
<code><a href="source-class-Cache.html#271-280" title="Go to source code">getIds</a>( )</code>
 
<div class="description short">
<p>Return an array of stored cache ids</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of stored cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getTags" id="_getTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getTags">#</a>
<code><a href="source-class-Cache.html#282-289" title="Go to source code">getTags</a>( )</code>
 
<div class="description short">
<p>Return an array of stored tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored tags</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of stored tags (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsAvecLesTags" id="_getIdsAvecLesTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsAvecLesTags">#</a>
<code><a href="source-class-Cache.html#291-303" title="Go to source code">getIdsAvecLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which match given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which match given tags</p>
 
<p>In case of multiple tags, a logical AND is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of matching cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsSansLesTags" id="_getIdsSansLesTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsSansLesTags">#</a>
<code><a href="source-class-Cache.html#305-317" title="Go to source code">getIdsSansLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which don't match given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which don't match given tags</p>
 
<p>In case of multiple tags, a logical OR is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of not matching cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsAvecUnTag" id="_getIdsAvecUnTag">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsAvecUnTag">#</a>
<code><a href="source-class-Cache.html#319-331" title="Go to source code">getIdsAvecUnTag</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which match any given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which match any given tags</p>
 
<p>In case of multiple tags, a logical OR is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of matching any cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getPourcentageRemplissage" id="_getPourcentageRemplissage">
 
<td class="attributes"><code>
public
integer
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getPourcentageRemplissage">#</a>
<code><a href="source-class-Cache.html#333-340" title="Go to source code">getPourcentageRemplissage</a>( )</code>
 
<div class="description short">
<p>Return the filling percentage of the backend storage</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return the filling percentage of the backend storage</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>integer</code><br>integer between 0 and 100<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getMetadonnees" id="_getMetadonnees">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getMetadonnees">#</a>
<code><a href="source-class-Cache.html#342-356" title="Go to source code">getMetadonnees</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Return an array of metadatas for the given cache id</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of metadatas for the given cache id</p>
 
<p>The array will include these keys :</p>
 
<ul>
<li>expire : the expire timestamp</li>
 
<li>tags : a string array of tags</li>
 
<li>mtime : timestamp of last modification time</li>
</ul>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of metadatas (false if the cache id is not found)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="ajouterSupplementDureeDeVie" id="_ajouterSupplementDureeDeVie">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_ajouterSupplementDureeDeVie">#</a>
<code><a href="source-class-Cache.html#358-368" title="Go to source code">ajouterSupplementDureeDeVie</a>( <span>string <var>$id</var></span>, <span>integer <var>$supplement_duree_de_vie</var></span> )</code>
 
<div class="description short">
<p>Give (if possible) an extra lifetime to the given cache id</p>
 
</div>
 
<div class="description detailed hidden">
<p>Give (if possible) an extra lifetime to the given cache id</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
<dt><var>$supplement_duree_de_vie</var></dt>
<dd><code>integer</code><br>$extraLifetime</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if ok<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="validerIdOuTag" id="_validerIdOuTag">
 
<td class="attributes"><code>
protected static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_validerIdOuTag">#</a>
<code><a href="source-class-Cache.html#456-472" title="Go to source code">validerIdOuTag</a>( <span>string <var>$chaine</var></span> )</code>
 
<div class="description short">
<p>Valide un identifiant de cache ou un tag (securité, nom de fichiers fiables,
préfixes réservés...)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Valide un identifiant de cache ou un tag (securité, nom de fichiers fiables,
préfixes réservés...)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$chaine</var></dt>
<dd><code>string</code><br>$chaine Identificant de cache ou tag</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="validerTableauDeTags" id="_validerTableauDeTags">
 
<td class="attributes"><code>
protected static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_validerTableauDeTags">#</a>
<code><a href="source-class-Cache.html#474-488" title="Go to source code">validerTableauDeTags</a>( <span>array <var>$tags</var></span> )</code>
 
<div class="description short">
<p>Valide un tableau de tags (securité, nom de fichiers fiables, préfixes
réservés...)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Valide un tableau de tags (securité, nom de fichiers fiables, préfixes
réservés...)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags tableau de tags</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getTimestampExpiration" id="_getTimestampExpiration">
 
<td class="attributes"><code>
public
integer
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getTimestampExpiration">#</a>
<code><a href="source-class-Cache.html#490-505" title="Go to source code">getTimestampExpiration</a>( <span>mixed <var>$duree_de_vie</var></span> )</code>
 
<div class="description short">
<p>Calcule et retourne le timestamp d'expiration</p>
 
</div>
 
<div class="description detailed hidden">
<p>Calcule et retourne le timestamp d'expiration</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>integer</code><br>timestamp d'expiration (unix timestamp)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
<table class="summary" id="constants">
<caption>Constants summary</caption>
<tr data-order="STOCKAGE_MODE_SIMPLE" id="STOCKAGE_MODE_SIMPLE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Cache.html#18-19" title="Go to source code"><b>STOCKAGE_MODE_SIMPLE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;FichierSimple&quot;</span></code></td>
<td class="description"><div>
<a href="#STOCKAGE_MODE_SIMPLE" class="anchor">#</a>
 
<div class="description short">
<p>Socke les enregistrements du cache dans des fichiers textes de façon
extremement simple.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Socke les enregistrements du cache dans des fichiers textes de façon
extremement simple.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="STOCKAGE_MODE_FICHIER" id="STOCKAGE_MODE_FICHIER">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Cache.html#20-21" title="Go to source code"><b>STOCKAGE_MODE_FICHIER</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;Fichier&quot;</span></code></td>
<td class="description"><div>
<a href="#STOCKAGE_MODE_FICHIER" class="anchor">#</a>
 
<div class="description short">
<p>Socke les enregistrements du cache dans des fichiers textes.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Socke les enregistrements du cache dans des fichiers textes.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="STOCKAGE_MODE_SQLITE" id="STOCKAGE_MODE_SQLITE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Cache.html#22-23" title="Go to source code"><b>STOCKAGE_MODE_SQLITE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;Sqlite&quot;</span></code></td>
<td class="description"><div>
<a href="#STOCKAGE_MODE_SQLITE" class="anchor">#</a>
 
<div class="description short">
<p>Socke les enregistrements du cache dans une base de données SQLite.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Socke les enregistrements du cache dans une base de données SQLite.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="NETTOYAGE_MODE_TOUS" id="NETTOYAGE_MODE_TOUS">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Cache.html#25-26" title="Go to source code"><b>NETTOYAGE_MODE_TOUS</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;tous&quot;</span></code></td>
<td class="description"><div>
<a href="#NETTOYAGE_MODE_TOUS" class="anchor">#</a>
 
<div class="description short">
<p>'tous' (par défaut) : supprime tous les enregistrements.</p>
 
</div>
 
<div class="description detailed hidden">
<p>'tous' (par défaut) : supprime tous les enregistrements.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="NETTOYAGE_MODE_EXPIRATION" id="NETTOYAGE_MODE_EXPIRATION">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Cache.html#27-28" title="Go to source code"><b>NETTOYAGE_MODE_EXPIRATION</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;expiration&quot;</span></code></td>
<td class="description"><div>
<a href="#NETTOYAGE_MODE_EXPIRATION" class="anchor">#</a>
 
<div class="description short">
<p>'expiration' : supprime tous les enregistrements dont la date d'expériration
est dépassée.</p>
 
</div>
 
<div class="description detailed hidden">
<p>'expiration' : supprime tous les enregistrements dont la date d'expériration
est dépassée.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="NETTOYAGE_MODE_AVEC_LES_TAGS" id="NETTOYAGE_MODE_AVEC_LES_TAGS">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Cache.html#29-30" title="Go to source code"><b>NETTOYAGE_MODE_AVEC_LES_TAGS</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;avecLesTags&quot;</span></code></td>
<td class="description"><div>
<a href="#NETTOYAGE_MODE_AVEC_LES_TAGS" class="anchor">#</a>
 
<div class="description short">
<p>'avecLesTags' : supprime tous les enregistrements contenant tous les tags
indiqués.</p>
 
</div>
 
<div class="description detailed hidden">
<p>'avecLesTags' : supprime tous les enregistrements contenant tous les tags
indiqués.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="NETTOYAGE_MODE_SANS_LES_TAGS" id="NETTOYAGE_MODE_SANS_LES_TAGS">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Cache.html#31-32" title="Go to source code"><b>NETTOYAGE_MODE_SANS_LES_TAGS</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;sansLesTags&quot;</span></code></td>
<td class="description"><div>
<a href="#NETTOYAGE_MODE_SANS_LES_TAGS" class="anchor">#</a>
 
<div class="description short">
<p>'sansLesTags' : supprime tous les enregistrements contenant aucun des tags
indiqués.</p>
 
</div>
 
<div class="description detailed hidden">
<p>'sansLesTags' : supprime tous les enregistrements contenant aucun des tags
indiqués.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="NETTOYAGE_MODE_AVEC_UN_TAG" id="NETTOYAGE_MODE_AVEC_UN_TAG">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Cache.html#33-34" title="Go to source code"><b>NETTOYAGE_MODE_AVEC_UN_TAG</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;avecUnTag&quot;</span></code></td>
<td class="description"><div>
<a href="#NETTOYAGE_MODE_AVEC_UN_TAG" class="anchor">#</a>
 
<div class="description short">
<p>'avecUnTag' : supprime tous les enregistrements contenant au moins un des
tags indiqués.</p>
 
</div>
 
<div class="description detailed hidden">
<p>'avecUnTag' : supprime tous les enregistrements contenant au moins un des
tags indiqués.</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="options" id="$options">
<td class="attributes"><code>
protected
array
</code></td>
 
<td class="name">
<a href="source-class-Cache.html#43-94" title="Go to source code"><var>$options</var></a>
</td>
<td class="value"><code><span class="php-keyword1">array</span>(
<span class="php-quote">'stockage_mode'</span> =&gt; self::STOCKAGE_MODE_FICHIER,
<span class="php-quote">'stockage_chemin'</span> =&gt; <span class="php-keyword1">null</span>,
<span class="php-quote">'controle_ecriture'</span> =&gt; <span class="php-keyword1">true</span>,
<span class="php-quote">'mise_en_cache'</span> =&gt; <span class="php-keyword1">true</span>,
<span class="php-quote">'cache_id_prefixe'</span> =&gt; <span class="php-keyword1">null</span>,
<span class="php-quote">'serialisation_auto'</span> =&gt; <span class="php-keyword1">false</span>,
<span class="php-quote">'nettoyage_auto'</span> =&gt; <span class="php-num">10</span>,
<span class="php-quote">'duree_de_vie'</span> =&gt; <span class="php-num">3600</span>,
)</code></td>
<td class="description"><div>
<a href="#$options" class="anchor">#</a>
 
<div class="description short">
<p>Les options disponibles pour le cache :</p>
 
<h1>&gt; (string) stockage_mode :</h1>
 
<p>Indique le mode de stockage du cache à utiliser parmis :</p>
 
<ul>
<li>Cache::STOCKAGE_MODE_FICHIER : sous forme d'une arborescence de fichiers et
dossier</li>
 
<li>Cache::STOCKAGE_MODE_SQLITE : sous forme d'une base de données SQLite</li>
</ul>
 
</div>
 
<div class="description detailed hidden">
<p>Les options disponibles pour le cache :</p>
 
<h2>&gt; (string) stockage_mode :</h2>
 
<p>Indique le mode de stockage du cache à utiliser parmis :</p>
 
<ul>
<li>Cache::STOCKAGE_MODE_FICHIER : sous forme d'une arborescence de fichiers et
dossier</li>
 
<li>Cache::STOCKAGE_MODE_SQLITE : sous forme d'une base de données SQLite</li>
</ul>
 
<h2>&gt; (string) stockage_chemin :</h2>
 
<p>Chemin vers :</p>
 
<ul>
<li>Cache::STOCKAGE_MODE_FICHIER : le dossier devant contenir
l'arborescence.</li>
 
<li>Cache::STOCKAGE_MODE_SQLITE : le fichier contenant la base SQLite.</li>
</ul>
 
<h2>&gt; (boolean) controle_ecriture :</h2>
 
<ul>
<li>Active / Désactive le controle d'écriture (le cache est lue jute après
l'écriture du fichier pour détecter sa corruption)</li>
 
<li>Activer le controle d'écriture ralentira légèrement l'écriture du
fichier de cache mais pas sa lecture</li>
</ul>
 
<p>Le controle d'écriture peut détecter la corruption de fichier mais ce n'est
pas un système de controle parfait.</p>
 
<h2>&gt; (boolean) mise_en_cache :</h2>
 
<ul>
<li>Active / Désactive la mise en cache</li>
</ul>
 
<p>(peut être très utile pour le débogage des scripts utilisant le cache</p>
 
<h1>&gt; (string) cache_id_prefixe :</h1>
 
<ul>
<li>préfixe pour les identifiant de cache ( = espace de nom)</li>
</ul>
 
<h2>&gt; (boolean) serialisation_auto :</h2>
 
<ul>
<li>Active / Désactive la sérialisation automatique</li>
 
<li>Peut être utilisé pour sauver directement des données qui ne sont pas des
chaines (mais c'est plus lent)</li>
</ul>
 
<h2>&gt; (int) nettoyage_auto :</h2>
 
<ul>
<li>Désactive / Régler le processus de nettoyage automatique</li>
 
<li>Le processus de nettoyage automatiques détruit les fichier trop vieux (pour
la durée de vie donnée) quand un nouveau fichier de cache est écrit : 0 =&gt;
pas de nettoyage automatique 1 =&gt; nettoyage automatique systématique x
(integer) &gt; 1 =&gt; nettoyage automatique toutes les 1 fois (au hasard) sur x
écriture de fichier de cache</li>
</ul>
 
<h2>&gt; (int) duree_de_vie :</h2>
 
<ul>
<li>Durée de vie du cache (en secondes)</li>
 
<li>Si null, le cache est valide indéfiniment.</li>
</ul>
 
 
</div>
</div></td>
</tr>
<tr data-order="stockage" id="$stockage">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-Cache.html#96" title="Go to source code"><var>$stockage</var></a>
</td>
<td class="value"><code><span class="php-keyword1">null</span></code></td>
<td class="description"><div>
<a href="#$stockage" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Config.html
New file
0,0 → 1,359
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Config | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li class="active"><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Config</h1>
 
 
<div class="description">
<p>Config permet de charger automatiquement les fichiers ini du Framework et de
l'application. Elle offre l'accès en lecture seule aux paramètres de config.
C'est une Singleton. Si vous avez besoin de modifier dynamiquement des
paramètres de configuration, utiliser le @see Registe, il est fait pour
ça.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2009, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL-v3</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL-v2</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Config.php 448 2013-12-19 13:37:39Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Config.html#4-282" title="Go to source code">Config.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="charger" id="_charger">
 
<td class="attributes"><code>
public static
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_charger">#</a>
<code><a href="source-class-Config.html#232-240" title="Go to source code">charger</a>( <span>string <var>$fichier_ini</var></span> )</code>
 
<div class="description short">
<p>Charge un fichier ini dans le tableau des paramètres de l'appli.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Charge un fichier ini dans le tableau des paramètres de l'appli.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier_ini</var></dt>
<dd><code>string</code><br>$fichier_ini le nom du fichier à charger</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>le fichier ini parsé<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="get" id="_get">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_get">#</a>
<code><a href="source-class-Config.html#242-250" title="Go to source code">get</a>( <span>string <var>$param</var> = <span class="php-keyword1">null</span></span> )</code>
 
<div class="description short">
<p>Accesseur pour la valeur d'un paramètre.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Accesseur pour la valeur d'un paramètre.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$param</var></dt>
<dd><code>string</code><br>$param le nom du paramètre</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>la valeur du paramètre<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="existe" id="_existe">
 
<td class="attributes"><code>
public static
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_existe">#</a>
<code><a href="source-class-Config.html#252-260" title="Go to source code">existe</a>( <span>string <var>$param</var></span> )</code>
 
<div class="description short">
<p>Vérifie si la valeur d'un paramètre existe.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Vérifie si la valeur d'un paramètre existe.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$param</var></dt>
<dd><code>string</code><br>$param le nom du paramètre</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>vrai si le paramètre existe, false sinon<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="verifierPresenceParametres" id="_verifierPresenceParametres">
 
<td class="attributes"><code>
public static
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_verifierPresenceParametres">#</a>
<code><a href="source-class-Config.html#262-281" title="Go to source code">verifierPresenceParametres</a>( <span>array <var>$parametres</var></span> )</code>
 
<div class="description short">
<p>Vérifie que tous les paramêtres de config nécessaires au fonctionnement
d'une classe existe dans les fichiers de configurations. L'utilisation de cette
méthode depuis la classe Config évite de faire appel à une classe
supplémentaire.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Vérifie que tous les paramêtres de config nécessaires au fonctionnement
d'une classe existe dans les fichiers de configurations. L'utilisation de cette
méthode depuis la classe Config évite de faire appel à une classe
supplémentaire.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$parametres</var></dt>
<dd><code>array</code><br>$parametres tableau des noms des paramètres de la config à verifier.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true si tous les paramétres sont présents sinon false.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-GestionnaireException.html
New file
0,0 → 1,792
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class GestionnaireException | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li class="active"><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class GestionnaireException</h1>
 
 
<div class="description">
<p>Classe de gestion des exceptions. C'est un Singleton.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2009, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
<b>Author:</b>
Aurélien PERONNET &lt;<a
href="mailto:aurelien&#64;tela-botanica.org">aurelien&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jmp&#64;tela-botanica.org">jmp&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: GestionnaireException.php 367 2011-10-03 12:40:48Z jpm $$<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-GestionnaireException.html#3-246" title="Go to source code">GestionnaireException.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="initialiser" id="_initialiser">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_initialiser">#</a>
<code><a href="source-class-GestionnaireException.html#40-50" title="Go to source code">initialiser</a>( )</code>
 
<div class="description short">
<p>Initialise le Gestionnaire d'exceptions et d'erreur sans tenir comptes des
paramêtres de config.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Initialise le Gestionnaire d'exceptions et d'erreur sans tenir comptes des
paramêtres de config.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="configurer" id="_configurer">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_configurer">#</a>
<code><a href="source-class-GestionnaireException.html#52-58" title="Go to source code">configurer</a>( )</code>
 
<div class="description short">
<p>Configure le Gestionnaire d'exceptions et d'erreur à partir des paramêtres
de config.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Configure le Gestionnaire d'exceptions et d'erreur à partir des paramêtres
de config.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getExceptionsNbre" id="_getExceptionsNbre">
 
<td class="attributes"><code>
public static
integer
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getExceptionsNbre">#</a>
<code><a href="source-class-GestionnaireException.html#60-68" title="Go to source code">getExceptionsNbre</a>( )</code>
 
<div class="description short">
<p>Renvoie le nombre d'exceptions et d'erreurs levées.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Renvoie le nombre d'exceptions et d'erreurs levées.</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>integer</code><br>le nombre d'exception actuellement levées<br>
</div>
 
 
<h4>Since</h4>
<div class="list">
0.3<br>
</div>
<h4>See</h4>
<div class="list">
getExceptions() pour obtenir les exceptions formatées.<br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="getContexte" id="_getContexte">
 
<td class="attributes"><code>
public static
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getContexte">#</a>
<code><a href="source-class-GestionnaireException.html#70-76" title="Go to source code">getContexte</a>( )</code>
 
<div class="description short">
<p>Renvoie le booleen définissant si l'on affiche le contexte ou non</p>
 
</div>
 
<div class="description detailed hidden">
<p>Renvoie le booleen définissant si l'on affiche le contexte ou non</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true si on affiche le contexte sinon false.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setContexte" id="_setContexte">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setContexte">#</a>
<code><a href="source-class-GestionnaireException.html#78-84" title="Go to source code">setContexte</a>( <span>boolean <var>$contexte</var></span> )</code>
 
<div class="description short">
<p>Definit si l'on veut afficher le contexte ou non</p>
 
</div>
 
<div class="description detailed hidden">
<p>Definit si l'on veut afficher le contexte ou non</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$contexte</var></dt>
<dd><code>boolean</code><br>true si on veut afficher le contexte, false sinon, par défaut vaut false</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="gererException" id="_gererException">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_gererException">#</a>
<code><a href="source-class-GestionnaireException.html#86-97" title="Go to source code">gererException</a>( <span><code><a href="class-Exception.html">Exception</a></code> <var>$e</var></span> )</code>
 
<div class="description short">
<p>Fonction de gestion des exceptions, remplace le handler par défaut. Si une
boucle génère de multiple exception (ou erreur) identique une seule sera
stockée.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Fonction de gestion des exceptions, remplace le handler par défaut. Si une
boucle génère de multiple exception (ou erreur) identique une seule sera
stockée.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$e</var></dt>
<dd><code><code><a href="class-Exception.html">Exception</a></code></code><br>$e l'exception à traiter</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="gererErreur" id="_gererErreur">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_gererErreur">#</a>
<code><a href="source-class-GestionnaireException.html#99-114" title="Go to source code">gererErreur</a>( <span>integer <var>$niveau</var></span>, <span>string <var>$message</var></span>, <span>string <var>$fichier</var></span>, <span>integer <var>$ligne</var></span>, <span>string <var>$contexte</var></span> )</code>
 
<div class="description short">
<p>Gère les erreurs en les convertissant en exceptions (remplace la fonction
gestion d'erreurs native de php)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Gère les erreurs en les convertissant en exceptions (remplace la fonction
gestion d'erreurs native de php)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$niveau</var></dt>
<dd><code>integer</code><br>$niveau le niveau de l'erreur</dd>
<dt><var>$message</var></dt>
<dd><code>string</code><br>$message le message associé à l'erreur</dd>
<dt><var>$fichier</var></dt>
<dd><code>string</code><br>$fichier le nom du fichier où l'erreur s'est produite</dd>
<dt><var>$ligne</var></dt>
<dd><code>integer</code><br>$ligne la ligne où l'erreur s'est produite</dd>
<dt><var>$contexte</var></dt>
<dd><code>string</code><br>$contexte le contexte associé à l'erreur</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getExceptions" id="_getExceptions">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getExceptions">#</a>
<code><a href="source-class-GestionnaireException.html#116-125" title="Go to source code">getExceptions</a>( )</code>
 
<div class="description short">
<p>Renvoie les exceptions au format (X)HTML ou bien au format texte suivant le
mode d'utilisation de PHP.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Renvoie les exceptions au format (X)HTML ou bien au format texte suivant le
mode d'utilisation de PHP.</p>
 
 
<h4>Deprecated</h4>
<div class="list">
</div>
 
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>les exceptions formatées en texte ou (X)HTML.<br>
</div>
 
 
<h4>Since</h4>
<div class="list">
0.3<br>
</div>
<h4>See</h4>
<div class="list">
<code><code><a href="class-GestionnaireException.html#_getExceptionsFormatees">GestionnaireException::getExceptionsFormatees()</a></code></code><br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="getExceptionsFormatees" id="_getExceptionsFormatees">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getExceptionsFormatees">#</a>
<code><a href="source-class-GestionnaireException.html#127-148" title="Go to source code">getExceptionsFormatees</a>( )</code>
 
<div class="description short">
<p>Renvoie les exceptions au format (X)HTML ou bien au format texte suivant le
mode d'utilisation de PHP.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Renvoie les exceptions au format (X)HTML ou bien au format texte suivant le
mode d'utilisation de PHP.</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>les exceptions formatées en texte ou (X)HTML.<br>
</div>
 
 
<h4>Since</h4>
<div class="list">
0.3<br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="getExceptionsTriees" id="_getExceptionsTriees">
 
<td class="attributes"><code>
public static
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getExceptionsTriees">#</a>
<code><a href="source-class-GestionnaireException.html#150-170" title="Go to source code">getExceptionsTriees</a>( )</code>
 
<div class="description short">
<p>Renvoie le tableau d'objets Exception générées par le script PHP triées
du niveau de sévérité le plus élevé au moins élevé. Format du tableau :
array{sévérité_1 = array{Exception1, Exception2, Exception3,...},
sévérité_1 = array{Exception1, Exception2, ...}, ...}; ATTENTION : si vous
utilisez cette méthode, c'est à vous de gérer l'affichage des Exceptions. Le
gestionnaire d'exception n'enverra plus rien au navigateur ou à la console.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Renvoie le tableau d'objets Exception générées par le script PHP triées
du niveau de sévérité le plus élevé au moins élevé. Format du tableau :
array{sévérité_1 = array{Exception1, Exception2, Exception3,...},
sévérité_1 = array{Exception1, Exception2, ...}, ...}; ATTENTION : si vous
utilisez cette méthode, c'est à vous de gérer l'affichage des Exceptions. Le
gestionnaire d'exception n'enverra plus rien au navigateur ou à la console.</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>le tableau trié d'objet Exception.<br>
</div>
 
 
<h4>Since</h4>
<div class="list">
0.3<br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="formaterExceptionDebug" id="_formaterExceptionDebug">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_formaterExceptionDebug">#</a>
<code><a href="source-class-GestionnaireException.html#183-196" title="Go to source code">formaterExceptionDebug</a>( <span><code><a href="class-Exception.html">Exception</a></code> <var>$e</var></span> )</code>
 
<div class="description short">
<p>Formate en texte une exception passée en paramètre.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Formate en texte une exception passée en paramètre.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$e</var></dt>
<dd><code><code><a href="class-Exception.html">Exception</a></code></code><br>l'exception à formater.</dd>
</dl></div>
 
 
 
<h4>Since</h4>
<div class="list">
0.3<br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="formaterExceptionTxt" id="_formaterExceptionTxt">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_formaterExceptionTxt">#</a>
<code><a href="source-class-GestionnaireException.html#198-213" title="Go to source code">formaterExceptionTxt</a>( <span><code><a href="class-Exception.html">Exception</a></code> <var>$e</var></span> )</code>
 
<div class="description short">
<p>Formate en texte une exception passée en paramètre.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Formate en texte une exception passée en paramètre.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$e</var></dt>
<dd><code><code><a href="class-Exception.html">Exception</a></code></code><br>l'exception à formater.</dd>
</dl></div>
 
 
 
<h4>Since</h4>
<div class="list">
0.3<br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="formaterExceptionXhtml" id="_formaterExceptionXhtml">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_formaterExceptionXhtml">#</a>
<code><a href="source-class-GestionnaireException.html#215-233" title="Go to source code">formaterExceptionXhtml</a>( <span><code><a href="class-Exception.html">Exception</a></code> <var>$e</var></span> )</code>
 
<div class="description short">
<p>Formate en (X)HTML une exception passée en paramètre.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Formate en (X)HTML une exception passée en paramètre.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$e</var></dt>
<dd><code><code><a href="class-Exception.html">Exception</a></code></code><br>l'exception à formater.</dd>
</dl></div>
 
 
 
<h4>Since</h4>
<div class="list">
0.3<br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="__destruct" id="___destruct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___destruct">#</a>
<code><a href="source-class-GestionnaireException.html#235-244" title="Go to source code">__destruct</a>( )</code>
 
<div class="description short">
<p>Lors de la destruction de la classe si des exceptions n'ont pas été
affichées, et si le débogage est à true, elles sont affichées.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Lors de la destruction de la classe si des exceptions n'ont pas été
affichées, et si le débogage est à true, elles sont affichées.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
<table class="summary" id="constants">
<caption>Constants summary</caption>
<tr data-order="MODE_CLI" id="MODE_CLI">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-GestionnaireException.html#20" title="Go to source code"><b>MODE_CLI</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'cli'</span></code></td>
<td class="description"><div>
<a href="#MODE_CLI" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Fichier.html
New file
0,0 → 1,304
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File utilitaires/Fichier.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li class="active"><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li class="active"><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Utilitaire.html" title="Summary of Utilitaire"><span>Package</span></a>
</li>
<li>
<a href="class-Fichier.html" title="Summary of Fichier"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe fournissant des méthodes statiques de manipulation des fichiers.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> *
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * @package Utilitaire
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @version $Id: Fichier.php 351 2011-07-21 10:22:34Z jpm $
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> */</span>
</span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-keyword1">class</span> <a id="Fichier" href="#Fichier">Fichier</a> {
</span><span id="16" class="l"><a class="l" href="#16"> 16: </a> <span class="php-comment">/**
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> * Créer et stocke du contenu dans un fichier.
</span></span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-comment"> *
</span></span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-comment"> * @param string le chemin et le nom du fichier.
</span></span><span id="20" class="l"><a class="l" href="#20"> 20: </a><span class="php-comment"> * @param string le contenu à stocker dans le fichier.
</span></span><span id="21" class="l"><a class="l" href="#21"> 21: </a><span class="php-comment"> * @return string true en cas de succès sinon false.
</span></span><span id="22" class="l"><a class="l" href="#22"> 22: </a><span class="php-comment"> */</span>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_creerFichier" href="#_creerFichier">creerFichier</a>(<span class="php-var">$fichier</span>, <span class="php-var">$contenu</span>) {
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a> <span class="php-var">$erreur</span> = <span class="php-keyword1">null</span>;
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a>
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-comment">// Début de l'écriture du fichier</span>
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resource</span> = <span class="php-keyword2">fopen</span>(<span class="php-var">$fichier</span>, <span class="php-quote">'w'</span>)) {
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">fwrite</span>(<span class="php-var">$resource</span>, <span class="php-var">$contenu</span>)) {
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">fclose</span>(<span class="php-var">$resource</span>)) {
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a> <span class="php-var">$erreur</span> = <span class="php-quote">&quot;Le fichier '</span><span class="php-var">$fichier</span><span class="php-quote">' n'a pas pu être fermé.&quot;</span>;
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> }
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> } <span class="php-keyword1">else</span> {
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a> <span class="php-var">$erreur</span> = <span class="php-quote">&quot;Le contenu texte n'a pas pu être écrit dans le fichier '</span><span class="php-var">$fichier</span><span class="php-quote">'.&quot;</span>;
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> }
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> } <span class="php-keyword1">else</span> {
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a> <span class="php-var">$erreur</span> = <span class="php-quote">&quot;Le fichier '</span><span class="php-var">$fichier</span><span class="php-quote">' n'a pas pu être ouvert.&quot;</span>;
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> }
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a>
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a> <span class="php-comment">// Gestion des erreurs et du retour</span>
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_null</span>(<span class="php-var">$erreur</span>)) {
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">true</span>;
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a> } <span class="php-keyword1">else</span> {
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$erreur</span>, E_USER_WARNING);
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a> }
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> }
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a>
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-comment">/**
</span></span><span id="49" class="l"><a class="l" href="#49"> 49: </a><span class="php-comment"> * Créer et stocke du contenu dans un fichier compressé en Gzip.
</span></span><span id="50" class="l"><a class="l" href="#50"> 50: </a><span class="php-comment"> *
</span></span><span id="51" class="l"><a class="l" href="#51"> 51: </a><span class="php-comment"> * @param string le chemin et le nom du fichier.
</span></span><span id="52" class="l"><a class="l" href="#52"> 52: </a><span class="php-comment"> * @param string le contenu à stocker dans le fichier.
</span></span><span id="53" class="l"><a class="l" href="#53"> 53: </a><span class="php-comment"> * @return string true en cas de succès sinon false.
</span></span><span id="54" class="l"><a class="l" href="#54"> 54: </a><span class="php-comment"> */</span>
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_creerFichierGzip" href="#_creerFichierGzip">creerFichierGzip</a>(<span class="php-var">$fichier</span>, <span class="php-var">$contenu</span>) {
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> <span class="php-var">$erreur</span> = <span class="php-keyword1">null</span>;
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a>
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> <span class="php-comment">// Ajout de l'extension gz</span>
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">substr</span>(<span class="php-var">$fichier</span>, -<span class="php-num">3</span>) != <span class="php-quote">'.gz'</span>) {
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> <span class="php-var">$fichier</span> = <span class="php-var">$fichier</span>.<span class="php-quote">'.gz'</span>;
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> }
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a>
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a> <span class="php-comment">// Début de l'écriture du fichier compressé</span>
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-keyword1">if</span> (<span class="php-var">$resource</span> = <span class="php-keyword2">gzopen</span>(<span class="php-var">$fichier</span>, <span class="php-quote">'w9'</span>)) {
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">gzwrite</span>(<span class="php-var">$resource</span>, <span class="php-var">$contenu</span>)) {
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">gzclose</span>(<span class="php-var">$resource</span>)) {
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> <span class="php-var">$erreur</span> = <span class="php-quote">&quot;Le fichier compressé '</span><span class="php-var">$fichier</span><span class="php-quote">' n'a pas pu être fermé.&quot;</span>;
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a> }
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> } <span class="php-keyword1">else</span> {
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a> <span class="php-var">$erreur</span> = <span class="php-quote">&quot;Le contenu texte n'a pas pu être écrit dans le fichier compressé '</span><span class="php-var">$fichier</span><span class="php-quote">'.&quot;</span>;
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a> }
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a> } <span class="php-keyword1">else</span> {
</span><span id="73" class="l"><a class="l" href="#73"> 73: </a> <span class="php-var">$erreur</span> = <span class="php-quote">&quot;Le fichier compressé '</span><span class="php-var">$fichier</span><span class="php-quote">' n'a pas pu être ouvert.&quot;</span>;
</span><span id="74" class="l"><a class="l" href="#74"> 74: </a> }
</span><span id="75" class="l"><a class="l" href="#75"> 75: </a>
</span><span id="76" class="l"><a class="l" href="#76"> 76: </a> <span class="php-comment">// Gestion des erreurs et du retour</span>
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_null</span>(<span class="php-var">$erreur</span>)) {
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">true</span>;
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> } <span class="php-keyword1">else</span> {
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$erreur</span>, E_USER_WARNING);
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> }
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a> }
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a>
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a> <span class="php-comment">/**
</span></span><span id="86" class="l"><a class="l" href="#86"> 86: </a><span class="php-comment"> * Supprime récursivement un dossier et tout son contenu.
</span></span><span id="87" class="l"><a class="l" href="#87"> 87: </a><span class="php-comment"> *
</span></span><span id="88" class="l"><a class="l" href="#88"> 88: </a><span class="php-comment"> * @param string $dossier le chemin vers le dossier à supprimer.
</span></span><span id="89" class="l"><a class="l" href="#89"> 89: </a><span class="php-comment"> * @return void
</span></span><span id="90" class="l"><a class="l" href="#90"> 90: </a><span class="php-comment"> */</span>
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_supprimerDossier" href="#_supprimerDossier">supprimerDossier</a>(<span class="php-var">$dossier</span>) {
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_dir</span>(<span class="php-var">$dossier</span>)) {
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-var">$objets</span> = <span class="php-keyword2">scandir</span>(<span class="php-var">$dossier</span>);
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$objets</span> <span class="php-keyword1">as</span> <span class="php-var">$objet</span>) {
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> <span class="php-keyword1">if</span> (<span class="php-var">$objet</span> != <span class="php-quote">'.'</span> &amp;&amp; <span class="php-var">$objet</span> != <span class="php-quote">'..'</span>) {
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> <span class="php-var">$chemin</span> = <span class="php-var">$dossier</span>.<span class="php-quote">'/'</span>.<span class="php-var">$objet</span>;
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">filetype</span>(<span class="php-var">$chemin</span>) == <span class="php-quote">'dir'</span>) {
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-var">$this</span>-&gt;supprimerDossier(<span class="php-var">$chemin</span>);
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> } <span class="php-keyword1">else</span> {
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-keyword2">unlink</span>(<span class="php-var">$chemin</span>);
</span><span id="101" class="l"><a class="l" href="#101">101: </a> }
</span><span id="102" class="l"><a class="l" href="#102">102: </a> }
</span><span id="103" class="l"><a class="l" href="#103">103: </a> }
</span><span id="104" class="l"><a class="l" href="#104">104: </a> <span class="php-keyword2">reset</span>(<span class="php-var">$objets</span>);
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-keyword2">rmdir</span>(<span class="php-var">$dossier</span>);
</span><span id="106" class="l"><a class="l" href="#106">106: </a> }
</span><span id="107" class="l"><a class="l" href="#107">107: </a> }
</span><span id="108" class="l"><a class="l" href="#108">108: </a>
</span><span id="109" class="l"><a class="l" href="#109">109: </a> <span class="php-comment">/**
</span></span><span id="110" class="l"><a class="l" href="#110">110: </a><span class="php-comment"> * Convertion d'un nombre d'octet en kB, MB, GB.
</span></span><span id="111" class="l"><a class="l" href="#111">111: </a><span class="php-comment"> * @link http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html
</span></span><span id="112" class="l"><a class="l" href="#112">112: </a><span class="php-comment"> * @param integer $taille la taille en octet à convertir
</span></span><span id="113" class="l"><a class="l" href="#113">113: </a><span class="php-comment"> *
</span></span><span id="114" class="l"><a class="l" href="#114">114: </a><span class="php-comment"> * @return string la chaine représentant la taille en octets.
</span></span><span id="115" class="l"><a class="l" href="#115">115: </a><span class="php-comment"> */</span>
</span><span id="116" class="l"><a class="l" href="#116">116: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_convertirTaille" href="#_convertirTaille">convertirTaille</a>(<span class="php-var">$taille</span>) {
</span><span id="117" class="l"><a class="l" href="#117">117: </a> <span class="php-var">$unite</span> = <span class="php-keyword1">array</span>(<span class="php-quote">'B'</span>, <span class="php-quote">'kB'</span>, <span class="php-quote">'MB'</span>, <span class="php-quote">'GB'</span>);
</span><span id="118" class="l"><a class="l" href="#118">118: </a> <span class="php-keyword1">return</span> @<span class="php-keyword2">round</span>(<span class="php-var">$taille</span> / <span class="php-keyword2">pow</span>(<span class="php-num">1024</span>, (<span class="php-var">$i</span> = <span class="php-keyword2">floor</span>(<span class="php-keyword2">log</span>(<span class="php-var">$taille</span>,<span class="php-num">1024</span>)))), <span class="php-num">2</span>).<span class="php-quote">' '</span>.<span class="php-var">$unite</span>[<span class="php-var">$i</span>];
</span><span id="119" class="l"><a class="l" href="#119">119: </a> }
</span><span id="120" class="l"><a class="l" href="#120">120: </a>
</span><span id="121" class="l"><a class="l" href="#121">121: </a> <span class="php-comment">/**
</span></span><span id="122" class="l"><a class="l" href="#122">122: </a><span class="php-comment"> * Détermine le dossier système temporaire et détecte si nous y avons accès en lecture et écriture.
</span></span><span id="123" class="l"><a class="l" href="#123">123: </a><span class="php-comment"> *
</span></span><span id="124" class="l"><a class="l" href="#124">124: </a><span class="php-comment"> * Inspiré de Zend_File_Transfer_Adapter_Abstract &amp; Zend_Cache
</span></span><span id="125" class="l"><a class="l" href="#125">125: </a><span class="php-comment"> *
</span></span><span id="126" class="l"><a class="l" href="#126">126: </a><span class="php-comment"> * @return string|false le chemine vers le dossier temporaire ou false en cas d'échec.
</span></span><span id="127" class="l"><a class="l" href="#127">127: </a><span class="php-comment"> */</span>
</span><span id="128" class="l"><a class="l" href="#128">128: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getDossierTmp" href="#_getDossierTmp">getDossierTmp</a>() {
</span><span id="129" class="l"><a class="l" href="#129">129: </a> <span class="php-var">$dossier_tmp</span> = <span class="php-keyword1">false</span>;
</span><span id="130" class="l"><a class="l" href="#130">130: </a> <span class="php-keyword1">foreach</span> (<span class="php-keyword1">array</span>(<span class="php-var">$_ENV</span>, <span class="php-var">$_SERVER</span>) <span class="php-keyword1">as</span> <span class="php-var">$environnement</span>) {
</span><span id="131" class="l"><a class="l" href="#131">131: </a> <span class="php-keyword1">foreach</span> (<span class="php-keyword1">array</span>(<span class="php-quote">'TMPDIR'</span>, <span class="php-quote">'TEMP'</span>, <span class="php-quote">'TMP'</span>, <span class="php-quote">'windir'</span>, <span class="php-quote">'SystemRoot'</span>) <span class="php-keyword1">as</span> <span class="php-var">$cle</span>) {
</span><span id="132" class="l"><a class="l" href="#132">132: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$environnement</span>[<span class="php-var">$cle</span>])) {
</span><span id="133" class="l"><a class="l" href="#133">133: </a> <span class="php-keyword1">if</span> ((<span class="php-var">$cle</span> == <span class="php-quote">'windir'</span>) <span class="php-keyword1">or</span> (<span class="php-var">$cle</span> == <span class="php-quote">'SystemRoot'</span>)) {
</span><span id="134" class="l"><a class="l" href="#134">134: </a> <span class="php-var">$dossier</span> = <span class="php-keyword2">realpath</span>(<span class="php-var">$environnement</span>[<span class="php-var">$cle</span>] . <span class="php-quote">'\\temp'</span>);
</span><span id="135" class="l"><a class="l" href="#135">135: </a> } <span class="php-keyword1">else</span> {
</span><span id="136" class="l"><a class="l" href="#136">136: </a> <span class="php-var">$dossier</span> = <span class="php-keyword2">realpath</span>(<span class="php-var">$environnement</span>[<span class="php-var">$cle</span>]);
</span><span id="137" class="l"><a class="l" href="#137">137: </a> }
</span><span id="138" class="l"><a class="l" href="#138">138: </a> <span class="php-keyword1">if</span> (self::etreAccessibleEnLectureEtEcriture(<span class="php-var">$dossier</span>)) {
</span><span id="139" class="l"><a class="l" href="#139">139: </a> <span class="php-var">$dossier_tmp</span> = <span class="php-var">$dossier</span>;
</span><span id="140" class="l"><a class="l" href="#140">140: </a> <span class="php-keyword1">break</span> <span class="php-num">2</span>;
</span><span id="141" class="l"><a class="l" href="#141">141: </a> }
</span><span id="142" class="l"><a class="l" href="#142">142: </a> }
</span><span id="143" class="l"><a class="l" href="#143">143: </a> }
</span><span id="144" class="l"><a class="l" href="#144">144: </a> }
</span><span id="145" class="l"><a class="l" href="#145">145: </a>
</span><span id="146" class="l"><a class="l" href="#146">146: </a> <span class="php-keyword1">if</span> ( ! <span class="php-var">$dossier_tmp</span>) {
</span><span id="147" class="l"><a class="l" href="#147">147: </a> <span class="php-var">$dossier_televersement_tmp</span> = <span class="php-keyword2">ini_get</span>(<span class="php-quote">'upload_tmp_dir'</span>);
</span><span id="148" class="l"><a class="l" href="#148">148: </a> <span class="php-keyword1">if</span> (<span class="php-var">$dossier_televersement_tmp</span>) {
</span><span id="149" class="l"><a class="l" href="#149">149: </a> <span class="php-var">$dossier</span> = <span class="php-keyword2">realpath</span>(<span class="php-var">$dossier_televersement_tmp</span>);
</span><span id="150" class="l"><a class="l" href="#150">150: </a> <span class="php-keyword1">if</span> (self::etreAccessibleEnLectureEtEcriture(<span class="php-var">$dossier</span>)) {
</span><span id="151" class="l"><a class="l" href="#151">151: </a> <span class="php-var">$dossier_tmp</span> = <span class="php-var">$dossier</span>;
</span><span id="152" class="l"><a class="l" href="#152">152: </a> }
</span><span id="153" class="l"><a class="l" href="#153">153: </a> }
</span><span id="154" class="l"><a class="l" href="#154">154: </a> }
</span><span id="155" class="l"><a class="l" href="#155">155: </a>
</span><span id="156" class="l"><a class="l" href="#156">156: </a> <span class="php-keyword1">if</span> ( ! <span class="php-var">$dossier_tmp</span>) {
</span><span id="157" class="l"><a class="l" href="#157">157: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">function_exists</span>(<span class="php-quote">'sys_get_temp_dir'</span>)) {
</span><span id="158" class="l"><a class="l" href="#158">158: </a> <span class="php-var">$dossier</span> = <span class="php-keyword2">sys_get_temp_dir</span>();
</span><span id="159" class="l"><a class="l" href="#159">159: </a> <span class="php-keyword1">if</span> (self::etreAccessibleEnLectureEtEcriture(<span class="php-var">$dossier</span>)) {
</span><span id="160" class="l"><a class="l" href="#160">160: </a> <span class="php-var">$dossier_tmp</span> = <span class="php-var">$dossier</span>;
</span><span id="161" class="l"><a class="l" href="#161">161: </a> }
</span><span id="162" class="l"><a class="l" href="#162">162: </a> }
</span><span id="163" class="l"><a class="l" href="#163">163: </a> }
</span><span id="164" class="l"><a class="l" href="#164">164: </a>
</span><span id="165" class="l"><a class="l" href="#165">165: </a> <span class="php-keyword1">if</span> ( ! <span class="php-var">$dossier_tmp</span>) {
</span><span id="166" class="l"><a class="l" href="#166">166: </a> <span class="php-comment">// Tentative de création d'un fichier temporaire dans le dossier courrant</span>
</span><span id="167" class="l"><a class="l" href="#167">167: </a> <span class="php-var">$fichier_tmp</span> = @<span class="php-keyword2">tempnam</span>(<span class="php-keyword2">md5</span>(<span class="php-keyword2">uniqid</span>(<span class="php-keyword2">rand</span>(), <span class="php-keyword1">TRUE</span>)), <span class="php-quote">''</span>);
</span><span id="168" class="l"><a class="l" href="#168">168: </a> <span class="php-keyword1">if</span> (<span class="php-var">$fichier_tmp</span>) {
</span><span id="169" class="l"><a class="l" href="#169">169: </a> <span class="php-var">$dossier</span> = @<span class="php-keyword2">realpath</span>(<span class="php-keyword2">dirname</span>(<span class="php-var">$fichier_tmp</span>));
</span><span id="170" class="l"><a class="l" href="#170">170: </a> @<span class="php-keyword2">unlink</span>(<span class="php-var">$fichier_tmp</span>);
</span><span id="171" class="l"><a class="l" href="#171">171: </a> <span class="php-keyword1">if</span> (self::etreAccessibleEnLectureEtEcriture(<span class="php-var">$dossier</span>)) {
</span><span id="172" class="l"><a class="l" href="#172">172: </a> <span class="php-var">$dossier_tmp</span> = <span class="php-var">$dossier</span>;
</span><span id="173" class="l"><a class="l" href="#173">173: </a> }
</span><span id="174" class="l"><a class="l" href="#174">174: </a> }
</span><span id="175" class="l"><a class="l" href="#175">175: </a> }
</span><span id="176" class="l"><a class="l" href="#176">176: </a>
</span><span id="177" class="l"><a class="l" href="#177">177: </a> <span class="php-keyword1">if</span> ( ! <span class="php-var">$dossier_tmp</span> &amp;&amp; self::etreAccessibleEnLectureEtEcriture(<span class="php-quote">'/tmp'</span>)) {
</span><span id="178" class="l"><a class="l" href="#178">178: </a> <span class="php-var">$dossier_tmp</span> = <span class="php-quote">'/tmp'</span>;
</span><span id="179" class="l"><a class="l" href="#179">179: </a> }
</span><span id="180" class="l"><a class="l" href="#180">180: </a>
</span><span id="181" class="l"><a class="l" href="#181">181: </a> <span class="php-keyword1">if</span> ( ! <span class="php-var">$dossier_tmp</span> &amp;&amp; self::etreAccessibleEnLectureEtEcriture(<span class="php-quote">'\\temp'</span>)) {
</span><span id="182" class="l"><a class="l" href="#182">182: </a> <span class="php-var">$dossier_tmp</span> = <span class="php-quote">'\\temp'</span>;
</span><span id="183" class="l"><a class="l" href="#183">183: </a> }
</span><span id="184" class="l"><a class="l" href="#184">184: </a>
</span><span id="185" class="l"><a class="l" href="#185">185: </a> <span class="php-keyword1">return</span> <span class="php-var">$dossier_tmp</span>;
</span><span id="186" class="l"><a class="l" href="#186">186: </a> }
</span><span id="187" class="l"><a class="l" href="#187">187: </a>
</span><span id="188" class="l"><a class="l" href="#188">188: </a> <span class="php-comment">/**
</span></span><span id="189" class="l"><a class="l" href="#189">189: </a><span class="php-comment"> * Vérifie si le fichier ou dossier est accessible en lecture et écriture.
</span></span><span id="190" class="l"><a class="l" href="#190">190: </a><span class="php-comment"> *
</span></span><span id="191" class="l"><a class="l" href="#191">191: </a><span class="php-comment"> * @param $ressource chemin vers le dossier ou fichier à tester
</span></span><span id="192" class="l"><a class="l" href="#192">192: </a><span class="php-comment"> * @return boolean true si la ressource est accessible en lecture et écriture.
</span></span><span id="193" class="l"><a class="l" href="#193">193: </a><span class="php-comment"> */</span>
</span><span id="194" class="l"><a class="l" href="#194">194: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_etreAccessibleEnLectureEtEcriture" href="#_etreAccessibleEnLectureEtEcriture">etreAccessibleEnLectureEtEcriture</a>(<span class="php-var">$ressource</span>){
</span><span id="195" class="l"><a class="l" href="#195">195: </a> <span class="php-var">$accessible</span> = <span class="php-keyword1">false</span>;
</span><span id="196" class="l"><a class="l" href="#196">196: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_readable</span>(<span class="php-var">$ressource</span>) &amp;&amp; <span class="php-keyword2">is_writable</span>(<span class="php-var">$ressource</span>)) {
</span><span id="197" class="l"><a class="l" href="#197">197: </a> <span class="php-var">$accessible</span> = <span class="php-keyword1">true</span>;
</span><span id="198" class="l"><a class="l" href="#198">198: </a> }
</span><span id="199" class="l"><a class="l" href="#199">199: </a> <span class="php-keyword1">return</span> <span class="php-var">$accessible</span>;
</span><span id="200" class="l"><a class="l" href="#200">200: </a> }
</span><span id="201" class="l"><a class="l" href="#201">201: </a>}
</span><span id="202" class="l"><a class="l" href="#202">202: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Tableau.html
New file
0,0 → 1,199
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File utilitaires/Tableau.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li class="active"><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li class="active"><a href="class-Tableau.html">Tableau</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Utilitaire.html" title="Summary of Utilitaire"><span>Package</span></a>
</li>
<li>
<a href="class-Tableau.html" title="Summary of Tableau"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe fournissant des méthodes statiques de manipulation des tableaux (Array).
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> *
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * @package Utilitaire
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="10" class="l"><a class="l" href="#10">10: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
</span></span><span id="11" class="l"><a class="l" href="#11">11: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
</span></span><span id="12" class="l"><a class="l" href="#12">12: </a><span class="php-comment"> * @version $Id: Tableau.php 400 2011-11-25 16:26:26Z jpm $
</span></span><span id="13" class="l"><a class="l" href="#13">13: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="14" class="l"><a class="l" href="#14">14: </a><span class="php-comment"> */</span>
</span><span id="15" class="l"><a class="l" href="#15">15: </a><span class="php-keyword1">class</span> <a id="Tableau" href="#Tableau">Tableau</a> {
</span><span id="16" class="l"><a class="l" href="#16">16: </a>
</span><span id="17" class="l"><a class="l" href="#17">17: </a> <span class="php-comment">/**
</span></span><span id="18" class="l"><a class="l" href="#18">18: </a><span class="php-comment"> * Etend le tableau à étendre avec les données du tableau à copier. Si des clés sont identiques entre les deux tableaux
</span></span><span id="19" class="l"><a class="l" href="#19">19: </a><span class="php-comment"> * une erreur est déclenchée et la valeur du tableau à étendre est gardée. Si les deux tableaux ont des clés numériques
</span></span><span id="20" class="l"><a class="l" href="#20">20: </a><span class="php-comment"> * leurs valeurs sont gardées (à la différence de array_merge).
</span></span><span id="21" class="l"><a class="l" href="#21">21: </a><span class="php-comment"> * Les tableaux sont passés par références et le tableau à copier est progressivement détruit pour éviter la consomation
</span></span><span id="22" class="l"><a class="l" href="#22">22: </a><span class="php-comment"> * de mémoire.
</span></span><span id="23" class="l"><a class="l" href="#23">23: </a><span class="php-comment"> *
</span></span><span id="24" class="l"><a class="l" href="#24">24: </a><span class="php-comment"> * @param array $tableau_a_etendre
</span></span><span id="25" class="l"><a class="l" href="#25">25: </a><span class="php-comment"> * @param array $tableau_a_copier
</span></span><span id="26" class="l"><a class="l" href="#26">26: </a><span class="php-comment"> * @return void
</span></span><span id="27" class="l"><a class="l" href="#27">27: </a><span class="php-comment"> */</span>
</span><span id="28" class="l"><a class="l" href="#28">28: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_etendre" href="#_etendre">etendre</a>(<span class="php-keyword1">Array</span> &amp;<span class="php-var">$tableau_a_etendre</span>, <span class="php-keyword1">Array</span> &amp;<span class="php-var">$tableau_a_copier</span>) {
</span><span id="29" class="l"><a class="l" href="#29">29: </a> <span class="php-var">$cles_existantes</span> = <span class="php-keyword1">null</span>;
</span><span id="30" class="l"><a class="l" href="#30">30: </a> <span class="php-keyword1">foreach</span>(<span class="php-var">$tableau_a_copier</span> <span class="php-keyword1">as</span> <span class="php-var">$cle</span> =&gt; <span class="php-var">$val</span>) {
</span><span id="31" class="l"><a class="l" href="#31">31: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword1">isset</span>(<span class="php-var">$tableau_a_etendre</span>[<span class="php-var">$cle</span>])) {
</span><span id="32" class="l"><a class="l" href="#32">32: </a> <span class="php-var">$tableau_a_etendre</span>[<span class="php-var">$cle</span>] = <span class="php-var">$val</span>;
</span><span id="33" class="l"><a class="l" href="#33">33: </a> <span class="php-keyword1">unset</span>(<span class="php-var">$tableau_a_copier</span>[<span class="php-var">$cle</span>]);
</span><span id="34" class="l"><a class="l" href="#34">34: </a> } <span class="php-keyword1">else</span> {
</span><span id="35" class="l"><a class="l" href="#35">35: </a> <span class="php-var">$cles_existantes</span>[] = <span class="php-var">$cle</span>;
</span><span id="36" class="l"><a class="l" href="#36">36: </a> }
</span><span id="37" class="l"><a class="l" href="#37">37: </a> }
</span><span id="38" class="l"><a class="l" href="#38">38: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$cles_existantes</span>)) {
</span><span id="39" class="l"><a class="l" href="#39">39: </a> <span class="php-var">$e</span> = <span class="php-quote">&quot;Le tableau a étendre contenait déjà les clés suivantes : &quot;</span>.<span class="php-keyword2">implode</span>(<span class="php-quote">', '</span>, <span class="php-var">$cles_existantes</span>);
</span><span id="40" class="l"><a class="l" href="#40">40: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$e</span>, E_USER_WARNING);
</span><span id="41" class="l"><a class="l" href="#41">41: </a> }
</span><span id="42" class="l"><a class="l" href="#42">42: </a> }
</span><span id="43" class="l"><a class="l" href="#43">43: </a>
</span><span id="44" class="l"><a class="l" href="#44">44: </a> <span class="php-comment">/**
</span></span><span id="45" class="l"><a class="l" href="#45">45: </a><span class="php-comment"> * @deprecated Utiliser la méthode trierMD()
</span></span><span id="46" class="l"><a class="l" href="#46">46: </a><span class="php-comment"> * @see trierMD()
</span></span><span id="47" class="l"><a class="l" href="#47">47: </a><span class="php-comment"> */</span>
</span><span id="48" class="l"><a class="l" href="#48">48: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_trierTableauMd" href="#_trierTableauMd">trierTableauMd</a>(<span class="php-var">$array</span>, <span class="php-var">$cols</span>) {
</span><span id="49" class="l"><a class="l" href="#49">49: </a> <span class="php-keyword1">return</span> self::trierMD(<span class="php-var">$array</span>, <span class="php-var">$cols</span>);
</span><span id="50" class="l"><a class="l" href="#50">50: </a> }
</span><span id="51" class="l"><a class="l" href="#51">51: </a>
</span><span id="52" class="l"><a class="l" href="#52">52: </a> <span class="php-comment">/**
</span></span><span id="53" class="l"><a class="l" href="#53">53: </a><span class="php-comment"> * Permet de trier un tableau multi-dimenssionnel en gardant l'ordre des clés.
</span></span><span id="54" class="l"><a class="l" href="#54">54: </a><span class="php-comment"> *
</span></span><span id="55" class="l"><a class="l" href="#55">55: </a><span class="php-comment"> * @param Array $array le tableau à trier
</span></span><span id="56" class="l"><a class="l" href="#56">56: </a><span class="php-comment"> * @param Array $cols tableau indiquant en clé la colonne à trier et en valeur l'ordre avec SORT_ASC ou SORT_DESC
</span></span><span id="57" class="l"><a class="l" href="#57">57: </a><span class="php-comment"> * @return Array le tableau trié.
</span></span><span id="58" class="l"><a class="l" href="#58">58: </a><span class="php-comment"> * @author cagret at gmail dot com
</span></span><span id="59" class="l"><a class="l" href="#59">59: </a><span class="php-comment"> * @see http://fr.php.net/manual/fr/function.array-multisort.php Post du 21-Jun-2009 12:38
</span></span><span id="60" class="l"><a class="l" href="#60">60: </a><span class="php-comment"> */</span>
</span><span id="61" class="l"><a class="l" href="#61">61: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_trierMD" href="#_trierMD">trierMD</a>(<span class="php-var">$array</span>, <span class="php-var">$cols</span>) {
</span><span id="62" class="l"><a class="l" href="#62">62: </a> <span class="php-var">$colarr</span> = <span class="php-keyword1">array</span>();
</span><span id="63" class="l"><a class="l" href="#63">63: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$cols</span> <span class="php-keyword1">as</span> <span class="php-var">$col</span> =&gt; <span class="php-var">$order</span>) {
</span><span id="64" class="l"><a class="l" href="#64">64: </a> <span class="php-var">$colarr</span>[<span class="php-var">$col</span>] = <span class="php-keyword1">array</span>();
</span><span id="65" class="l"><a class="l" href="#65">65: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$array</span> <span class="php-keyword1">as</span> <span class="php-var">$k</span> =&gt; <span class="php-var">$row</span>) {
</span><span id="66" class="l"><a class="l" href="#66">66: </a> <span class="php-var">$colarr</span>[<span class="php-var">$col</span>][<span class="php-quote">'_'</span>.<span class="php-var">$k</span>] = <span class="php-keyword2">strtolower</span>(<span class="php-var">$row</span>[<span class="php-var">$col</span>]);
</span><span id="67" class="l"><a class="l" href="#67">67: </a> }
</span><span id="68" class="l"><a class="l" href="#68">68: </a> }
</span><span id="69" class="l"><a class="l" href="#69">69: </a> <span class="php-var">$params</span> = <span class="php-keyword1">array</span>();
</span><span id="70" class="l"><a class="l" href="#70">70: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$cols</span> <span class="php-keyword1">as</span> <span class="php-var">$col</span> =&gt; <span class="php-var">$order</span>) {
</span><span id="71" class="l"><a class="l" href="#71">71: </a> <span class="php-var">$params</span>[] =&amp; <span class="php-var">$colarr</span>[<span class="php-var">$col</span>];
</span><span id="72" class="l"><a class="l" href="#72">72: </a> <span class="php-var">$orders</span> = (<span class="php-keyword1">array</span>) <span class="php-var">$order</span>;
</span><span id="73" class="l"><a class="l" href="#73">73: </a> <span class="php-keyword1">foreach</span>(<span class="php-var">$orders</span> <span class="php-keyword1">as</span> <span class="php-var">$orderElement</span>) {
</span><span id="74" class="l"><a class="l" href="#74">74: </a> <span class="php-var">$params</span>[] =&amp; <span class="php-var">$orderElement</span>;
</span><span id="75" class="l"><a class="l" href="#75">75: </a> }
</span><span id="76" class="l"><a class="l" href="#76">76: </a> }
</span><span id="77" class="l"><a class="l" href="#77">77: </a> <span class="php-keyword2">call_user_func_array</span>(<span class="php-quote">'array_multisort'</span>, <span class="php-var">$params</span>);
</span><span id="78" class="l"><a class="l" href="#78">78: </a> <span class="php-var">$ret</span> = <span class="php-keyword1">array</span>();
</span><span id="79" class="l"><a class="l" href="#79">79: </a> <span class="php-var">$keys</span> = <span class="php-keyword1">array</span>();
</span><span id="80" class="l"><a class="l" href="#80">80: </a> <span class="php-var">$first</span> = <span class="php-keyword1">true</span>;
</span><span id="81" class="l"><a class="l" href="#81">81: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$colarr</span> <span class="php-keyword1">as</span> <span class="php-var">$col</span> =&gt; <span class="php-var">$arr</span>) {
</span><span id="82" class="l"><a class="l" href="#82">82: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$arr</span> <span class="php-keyword1">as</span> <span class="php-var">$k</span> =&gt; <span class="php-var">$v</span>) {
</span><span id="83" class="l"><a class="l" href="#83">83: </a> <span class="php-keyword1">if</span> (<span class="php-var">$first</span>) {
</span><span id="84" class="l"><a class="l" href="#84">84: </a> <span class="php-var">$keys</span>[<span class="php-var">$k</span>] = <span class="php-keyword2">substr</span>(<span class="php-var">$k</span>, <span class="php-num">1</span>);
</span><span id="85" class="l"><a class="l" href="#85">85: </a> }
</span><span id="86" class="l"><a class="l" href="#86">86: </a> <span class="php-var">$k</span> = <span class="php-var">$keys</span>[<span class="php-var">$k</span>];
</span><span id="87" class="l"><a class="l" href="#87">87: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword1">isset</span>(<span class="php-var">$ret</span>[<span class="php-var">$k</span>])) {
</span><span id="88" class="l"><a class="l" href="#88">88: </a> <span class="php-var">$ret</span>[<span class="php-var">$k</span>] = <span class="php-var">$array</span>[<span class="php-var">$k</span>];
</span><span id="89" class="l"><a class="l" href="#89">89: </a> }
</span><span id="90" class="l"><a class="l" href="#90">90: </a> <span class="php-var">$ret</span>[<span class="php-var">$k</span>][<span class="php-var">$col</span>] = <span class="php-var">$array</span>[<span class="php-var">$k</span>][<span class="php-var">$col</span>];
</span><span id="91" class="l"><a class="l" href="#91">91: </a> }
</span><span id="92" class="l"><a class="l" href="#92">92: </a> <span class="php-var">$first</span> = <span class="php-keyword1">false</span>;
</span><span id="93" class="l"><a class="l" href="#93">93: </a> }
</span><span id="94" class="l"><a class="l" href="#94">94: </a> <span class="php-keyword1">return</span> <span class="php-var">$ret</span>;
</span><span id="95" class="l"><a class="l" href="#95">95: </a> }
</span><span id="96" class="l"><a class="l" href="#96">96: </a>}
</span><span id="97" class="l"><a class="l" href="#97">97: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Pattern.html
New file
0,0 → 1,308
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Pattern | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li class="active"><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li class="active"><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Utilitaire.html" title="Summary of Utilitaire"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Pattern</h1>
 
 
<div class="description">
<p>Classe fournissant des constantes correspondant à des expressions
régulières de vérification très courrantes.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Utilitaire.html">Utilitaire</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2009, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL-v3</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL-v2</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Pattern.php 299 2011-01-18 14:03:46Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Pattern.html#3-23" title="Go to source code">utilitaires/Pattern.php</a><br>
</div>
 
 
 
 
 
 
 
 
 
 
 
<table class="summary" id="constants">
<caption>Constants summary</caption>
<tr data-order="PRENOM" id="PRENOM">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Pattern.html#16" title="Go to source code"><b>PRENOM</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;[\p{L}-]+&quot;</span></code></td>
<td class="description"><div>
<a href="#PRENOM" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
<tr data-order="NOM" id="NOM">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Pattern.html#17" title="Go to source code"><b>NOM</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;[\p{Lu}]+&quot;</span></code></td>
<td class="description"><div>
<a href="#NOM" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
<tr data-order="COURRIEL" id="COURRIEL">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Pattern.html#18" title="Go to source code"><b>COURRIEL</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;[a-z0-9!#</span><span class="php-var">$</span><span class="php-quote">%&amp;'*+=?^_`{|}~-]+(?:\\.[a-z0-9!#</span><span class="php-var">$</span><span class="php-quote">%&amp;'*+=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?&quot;</span></code></td>
<td class="description"><div>
<a href="#COURRIEL" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
<tr data-order="URL" id="URL">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Pattern.html#19" title="Go to source code"><b>URL</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;^(?:(?:ht|f)tp(?:s?)\\:\\/\\/|~/|/)?(?:\\w+:\\w+@)?(?:(?:[-\\w]+\\.)+(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?::[\\d]{1,5})?(?:(?:(?:/(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,=]|%[a-f\\d]{2})+)+|/)+|\\?|#)?(?:(?:\\?(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,*:]|%[a-f\\d{2}])+=(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,*:=]|%[a-f\\d]{2})*)(?:&amp;(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,*:]|%[a-f\\d{2}])+=(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,*:=]|%[a-f\\d]{2})*)*)*(?:#(?:[-\\w~!</span><span class="php-var">$</span><span class="php-quote">+|.,*:=]|%[a-f\\d]{2})*)?</span><span class="php-var">$</span><span class="php-quote">&quot;</span></code></td>
<td class="description"><div>
<a href="#URL" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
<tr data-order="HEURE_MINUTE" id="HEURE_MINUTE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Pattern.html#20" title="Go to source code"><b>HEURE_MINUTE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;^(?:[0-1][0-9]|2[0-4]):(?:[0-5][0-9]|60)</span><span class="php-var">$</span><span class="php-quote">&quot;</span></code></td>
<td class="description"><div>
<a href="#HEURE_MINUTE" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
<tr data-order="LATITUDE" id="LATITUDE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Pattern.html#21" title="Go to source code"><b>LATITUDE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;^-?([0-8]?[0-9]([.,][0-9]*)?|90)</span><span class="php-var">$</span><span class="php-quote">&quot;</span></code></td>
<td class="description"><div>
<a href="#LATITUDE" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
<tr data-order="LONGITUDE" id="LONGITUDE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Pattern.html#22" title="Go to source code"><b>LONGITUDE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">&quot;^-?((1[0-7][0-9]|[1-9]?[0-9])([.,][0-9]*)?|180)</span><span class="php-var">$</span><span class="php-quote">&quot;</span></code></td>
<td class="description"><div>
<a href="#LONGITUDE" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Log.html
New file
0,0 → 1,412
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Log | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li class="active"><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Log</h1>
 
 
<div class="description">
<p>Classe permettant de logger des messages dans les fichier situés dans le
dossier de log.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2009, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
<b>Author:</b>
Aurélien PERONNET &lt;<a
href="mailto:aurelien&#64;tela-botanica.org">aurelien&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Log.php 274 2010-12-28 15:37:22Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Log.html#3-148" title="Go to source code">Log.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="initialiser" id="_initialiser">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_initialiser">#</a>
<code><a href="source-class-Log.html#45-55" title="Go to source code">initialiser</a>( )</code>
 
<div class="description short">
<p>Initialiser les logs par défaut, sans tenir comptes des paramêtres de
config.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Initialiser les logs par défaut, sans tenir comptes des paramêtres de
config.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="configurer" id="_configurer">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_configurer">#</a>
<code><a href="source-class-Log.html#57-65" title="Go to source code">configurer</a>( )</code>
 
<div class="description short">
<p>Configure le Log à partir des paramêtres de config.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Configure le Log à partir des paramêtres de config.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="ajouterEntree" id="_ajouterEntree">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_ajouterEntree">#</a>
<code><a href="source-class-Log.html#67-82" title="Go to source code">ajouterEntree</a>( <span>string <var>$nomFichier</var></span>, <span>mixed <var>$entree</var></span>, <span>mixed <var>$mode</var> = <span class="php-quote">'a+'</span></span> )</code>
 
<div class="description short">
<p>Ajoute une entrée au log spécifié par le paramètre $nomFichier</p>
 
</div>
 
<div class="description detailed hidden">
<p>Ajoute une entrée au log spécifié par le paramètre $nomFichier</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$nomFichier</var></dt>
<dd><code>string</code><br>$nomFichier le nom du fichier dans lequel écrire</dd>
<dt><var>$entree</var></dt>
<dd></dd>
<dt><var>$mode</var></dt>
<dd></dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="viderLog" id="_viderLog">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_viderLog">#</a>
<code><a href="source-class-Log.html#84-90" title="Go to source code">viderLog</a>( <span>string <var>$nomFichier</var></span> )</code>
 
<div class="description short">
<p>Vide un fichier log indiqué</p>
 
</div>
 
<div class="description detailed hidden">
<p>Vide un fichier log indiqué</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$nomFichier</var></dt>
<dd><code>string</code><br>$nomFichier le nom du fichier à vider</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="verifierOuvrirFichier" id="_verifierOuvrirFichier">
 
<td class="attributes"><code>
public static
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_verifierOuvrirFichier">#</a>
<code><a href="source-class-Log.html#92-112" title="Go to source code">verifierOuvrirFichier</a>( <span>string <var>$nomFichier</var></span>, <span>mixed <var>$mode</var></span> )</code>
 
<div class="description short">
<p>Vérifie la présence d'un fichier dans le tableau, ses droits d'écriture,
l'ouvre si nécessaire.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Vérifie la présence d'un fichier dans le tableau, ses droits d'écriture,
l'ouvre si nécessaire.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$nomFichier</var></dt>
<dd><code>string</code><br>$nomFichier le nom du fichier dont on doit vérifier la présence</dd>
<dt><var>$mode</var></dt>
<dd></dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true si le fichier est ouvert ou maintenant accessible, false sinon<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="__destruct" id="___destruct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___destruct">#</a>
<code><a href="source-class-Log.html#142-147" title="Go to source code">__destruct</a>( )</code>
 
<div class="description short">
<p>Destructeur de classe, ferme les descripteurs ouverts.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Destructeur de classe, ferme les descripteurs ouverts.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Registre.html
New file
0,0 → 1,184
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Registre.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li class="active"><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Registre.html" title="Summary of Registre"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe Registre, qui permet un accès à différentes variables et paramètres à travers les autres classes.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * C'est un remplaçant à la variable magique $_GLOBALS de Php.
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * C'est un singleton.
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * Si vous voulez paramètré votre application via un fichier de configuration, utilisez plutôt la classe @see Config.
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> *
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @category php 5.2
</span></span><span id="10" class="l"><a class="l" href="#10">10: </a><span class="php-comment"> * @package Framework
</span></span><span id="11" class="l"><a class="l" href="#11">11: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jmp@tela-botanica.org&gt;
</span></span><span id="12" class="l"><a class="l" href="#12">12: </a><span class="php-comment"> * @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="13" class="l"><a class="l" href="#13">13: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
</span></span><span id="14" class="l"><a class="l" href="#14">14: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
</span></span><span id="15" class="l"><a class="l" href="#15">15: </a><span class="php-comment"> * @version $Id: Registre.php 301 2011-01-18 14:23:52Z jpm $
</span></span><span id="16" class="l"><a class="l" href="#16">16: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="17" class="l"><a class="l" href="#17">17: </a><span class="php-comment"> *
</span></span><span id="18" class="l"><a class="l" href="#18">18: </a><span class="php-comment">*/</span>
</span><span id="19" class="l"><a class="l" href="#19">19: </a><span class="php-keyword1">class</span> <a id="Registre" href="#Registre">Registre</a> {
</span><span id="20" class="l"><a class="l" href="#20">20: </a>
</span><span id="21" class="l"><a class="l" href="#21">21: </a> <span class="php-comment">/** Tableau associatif stockant les variables. */</span>
</span><span id="22" class="l"><a class="l" href="#22">22: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$stockage" href="#$stockage">$stockage</a></span> = <span class="php-keyword1">array</span>();
</span><span id="23" class="l"><a class="l" href="#23">23: </a>
</span><span id="24" class="l"><a class="l" href="#24">24: </a> <span class="php-comment">/**
</span></span><span id="25" class="l"><a class="l" href="#25">25: </a><span class="php-comment"> * Ajoute un objet au tableau selon un intitulé donné.
</span></span><span id="26" class="l"><a class="l" href="#26">26: </a><span class="php-comment"> * @param string l'intitulé sous lequel l'objet sera conservé
</span></span><span id="27" class="l"><a class="l" href="#27">27: </a><span class="php-comment"> * @param mixed l'objet à conserver
</span></span><span id="28" class="l"><a class="l" href="#28">28: </a><span class="php-comment"> */</span>
</span><span id="29" class="l"><a class="l" href="#29">29: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_set" href="#_set">set</a>(<span class="php-var">$intitule</span>, <span class="php-var">$objet</span>) {
</span><span id="30" class="l"><a class="l" href="#30">30: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$objet</span>) &amp;&amp; <span class="php-keyword1">isset</span>(self::<span class="php-var">$stockage</span>[<span class="php-var">$intitule</span>])) {
</span><span id="31" class="l"><a class="l" href="#31">31: </a> self::<span class="php-var">$stockage</span>[<span class="php-var">$intitule</span>] = <span class="php-keyword2">array_merge</span>((<span class="php-keyword1">array</span>) self::<span class="php-var">$stockage</span>[<span class="php-var">$intitule</span>], (<span class="php-keyword1">array</span>) <span class="php-var">$objet</span>);
</span><span id="32" class="l"><a class="l" href="#32">32: </a> <span class="php-var">$message</span> = <span class="php-quote">&quot;Le tableau </span><span class="php-var">$intitule</span><span class="php-quote"> présent dans le registre a été fusionné avec un nouveau tableau de même intitulé !&quot;</span>;
</span><span id="33" class="l"><a class="l" href="#33">33: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$message</span>, E_USER_WARNING);
</span><span id="34" class="l"><a class="l" href="#34">34: </a> } <span class="php-keyword1">else</span> {
</span><span id="35" class="l"><a class="l" href="#35">35: </a> self::<span class="php-var">$stockage</span>[<span class="php-var">$intitule</span>] = <span class="php-var">$objet</span>;
</span><span id="36" class="l"><a class="l" href="#36">36: </a> }
</span><span id="37" class="l"><a class="l" href="#37">37: </a> }
</span><span id="38" class="l"><a class="l" href="#38">38: </a>
</span><span id="39" class="l"><a class="l" href="#39">39: </a> <span class="php-comment">/**
</span></span><span id="40" class="l"><a class="l" href="#40">40: </a><span class="php-comment"> * Renvoie le contenu associé à l'intitulé donné en paramètre.
</span></span><span id="41" class="l"><a class="l" href="#41">41: </a><span class="php-comment"> * @return mixed l'objet associé à l'intitulé ou null s'il n'est pas présent
</span></span><span id="42" class="l"><a class="l" href="#42">42: </a><span class="php-comment"> */</span>
</span><span id="43" class="l"><a class="l" href="#43">43: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_get" href="#_get">get</a>(<span class="php-var">$intitule</span>) {
</span><span id="44" class="l"><a class="l" href="#44">44: </a> <span class="php-var">$retour</span> = (<span class="php-keyword1">isset</span>(self::<span class="php-var">$stockage</span>[<span class="php-var">$intitule</span>])) ? self::<span class="php-var">$stockage</span>[<span class="php-var">$intitule</span>] : <span class="php-keyword1">null</span>;
</span><span id="45" class="l"><a class="l" href="#45">45: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="46" class="l"><a class="l" href="#46">46: </a> }
</span><span id="47" class="l"><a class="l" href="#47">47: </a>
</span><span id="48" class="l"><a class="l" href="#48">48: </a> <span class="php-comment">/**
</span></span><span id="49" class="l"><a class="l" href="#49">49: </a><span class="php-comment"> * Détruit l'objet associé à l'intitulé, n'a pas d'effet si il n'y a pas d'objet associé.
</span></span><span id="50" class="l"><a class="l" href="#50">50: </a><span class="php-comment"> * @param string l'intitulé de l'entrée du registre à détruire.
</span></span><span id="51" class="l"><a class="l" href="#51">51: </a><span class="php-comment"> */</span>
</span><span id="52" class="l"><a class="l" href="#52">52: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_detruire" href="#_detruire">detruire</a>(<span class="php-var">$intitule</span>) {
</span><span id="53" class="l"><a class="l" href="#53">53: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(self::<span class="php-var">$stockage</span>[<span class="php-var">$intitule</span>])) {
</span><span id="54" class="l"><a class="l" href="#54">54: </a> <span class="php-keyword1">unset</span>(self::<span class="php-var">$stockage</span>[<span class="php-var">$intitule</span>]);
</span><span id="55" class="l"><a class="l" href="#55">55: </a> }
</span><span id="56" class="l"><a class="l" href="#56">56: </a> }
</span><span id="57" class="l"><a class="l" href="#57">57: </a>
</span><span id="58" class="l"><a class="l" href="#58">58: </a> <span class="php-comment">/**
</span></span><span id="59" class="l"><a class="l" href="#59">59: </a><span class="php-comment"> * Teste si le registre contient une donnée pour un intitulé d'entrée donné.
</span></span><span id="60" class="l"><a class="l" href="#60">60: </a><span class="php-comment"> * @param string l'intitulé de l'entrée du registre à tester.
</span></span><span id="61" class="l"><a class="l" href="#61">61: </a><span class="php-comment"> * @return boolean true si un objet associé à cet intitulé est présent, false sinon
</span></span><span id="62" class="l"><a class="l" href="#62">62: </a><span class="php-comment"> */</span>
</span><span id="63" class="l"><a class="l" href="#63">63: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_existe" href="#_existe">existe</a>(<span class="php-var">$intitule</span>) {
</span><span id="64" class="l"><a class="l" href="#64">64: </a> <span class="php-var">$retour</span> = (<span class="php-keyword1">isset</span>(self::<span class="php-var">$stockage</span>[<span class="php-var">$intitule</span>])) ? <span class="php-keyword1">true</span> : <span class="php-keyword1">false</span>;
</span><span id="65" class="l"><a class="l" href="#65">65: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="66" class="l"><a class="l" href="#66">66: </a> }
</span><span id="67" class="l"><a class="l" href="#67">67: </a>}
</span><span id="68" class="l"><a class="l" href="#68">68: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Registre.html
New file
0,0 → 1,346
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Registre | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li class="active"><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Registre</h1>
 
 
<div class="description">
<p>Classe Registre, qui permet un accès à différentes variables et
paramètres à travers les autres classes. C'est un remplaçant à la variable
magique $_GLOBALS de Php. C'est un singleton. Si vous voulez paramètré votre
application via un fichier de configuration, utilisez plutôt la classe @see
Config.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
php 5.2<br>
<b>Copyright:</b>
Copyright (c) 2009, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jmp&#64;tela-botanica.org">jmp&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Registre.php 301 2011-01-18 14:23:52Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Registre.html#3-67" title="Go to source code">Registre.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="set" id="_set">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_set">#</a>
<code><a href="source-class-Registre.html#24-37" title="Go to source code">set</a>( <span>string <var>$intitule</var></span>, <span>mixed <var>$objet</var></span> )</code>
 
<div class="description short">
<p>Ajoute un objet au tableau selon un intitulé donné.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Ajoute un objet au tableau selon un intitulé donné.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$intitule</var></dt>
<dd><code>string</code><br>l'intitulé sous lequel l'objet sera conservé</dd>
<dt><var>$objet</var></dt>
<dd><code>mixed</code><br>l'objet à conserver</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="get" id="_get">
 
<td class="attributes"><code>
public static
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_get">#</a>
<code><a href="source-class-Registre.html#39-46" title="Go to source code">get</a>( <span>mixed <var>$intitule</var></span> )</code>
 
<div class="description short">
<p>Renvoie le contenu associé à l'intitulé donné en paramètre.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Renvoie le contenu associé à l'intitulé donné en paramètre.</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>l'objet associé à l'intitulé ou null s'il n'est pas présent<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="detruire" id="_detruire">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_detruire">#</a>
<code><a href="source-class-Registre.html#48-56" title="Go to source code">detruire</a>( <span>string <var>$intitule</var></span> )</code>
 
<div class="description short">
<p>Détruit l'objet associé à l'intitulé, n'a pas d'effet si il n'y a pas
d'objet associé.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Détruit l'objet associé à l'intitulé, n'a pas d'effet si il n'y a pas
d'objet associé.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$intitule</var></dt>
<dd><code>string</code><br>l'intitulé de l'entrée du registre à détruire.</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="existe" id="_existe">
 
<td class="attributes"><code>
public static
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_existe">#</a>
<code><a href="source-class-Registre.html#58-66" title="Go to source code">existe</a>( <span>string <var>$intitule</var></span> )</code>
 
<div class="description short">
<p>Teste si le registre contient une donnée pour un intitulé d'entrée
donné.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Teste si le registre contient une donnée pour un intitulé d'entrée
donné.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$intitule</var></dt>
<dd><code>string</code><br>l'intitulé de l'entrée du registre à tester.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true si un objet associé à cet intitulé est présent, false sinon<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Debug.html
New file
0,0 → 1,308
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Debug.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li class="active"><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Debug.html" title="Summary of Debug"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe fournissant des fonctions de débogage équivalante à var_dump et print_r.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * L'affichage et l'utilisation de ces fonctions sont améliorés via cette classe.
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * Cette classe est inspirée de la classe Zend_Debug.
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> *
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @package Framework
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @version $Id: Debug.php 366 2011-09-30 08:20:45Z jpm $
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> */</span>
</span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-keyword1">class</span> <a id="Debug" href="#Debug">Debug</a> {
</span><span id="18" class="l"><a class="l" href="#18"> 18: </a>
</span><span id="19" class="l"><a class="l" href="#19"> 19: </a> <span class="php-comment">/** Paramètrer le fichier de config avec &quot;php:Debug::MODE_ECHO&quot; : les messages sont affichés en utilisant echo au moment
</span></span><span id="20" class="l"><a class="l" href="#20"> 20: </a><span class="php-comment"> * où ils sont déclenchés dans le code.*/</span>
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a> <span class="php-keyword1">const</span> <a id="MODE_ECHO" href="#MODE_ECHO">MODE_ECHO</a> = <span class="php-quote">'echo'</span>;
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> <span class="php-comment">/** Paramètrer le fichier de config avec &quot;php:Debug::MODE_NOTICE&quot; : les message sont stockés par le gestionnaire
</span></span><span id="24" class="l"><a class="l" href="#24"> 24: </a><span class="php-comment"> * d'exception sous forme d'erreur de type E_USER_NOTICE et sont renvoyés sur la sortie standard à la fin de l'execution
</span></span><span id="25" class="l"><a class="l" href="#25"> 25: </a><span class="php-comment"> * du programme (via echo).*/</span>
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-keyword1">const</span> <a id="MODE_NOTICE" href="#MODE_NOTICE">MODE_NOTICE</a> = <span class="php-quote">'e_user_notice'</span>;
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a>
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-comment">/** Paramètrer le fichier de config avec &quot;php:Debug::MODE_ENTETE_HTTP&quot; : les message sont stockés par le gestionnaire
</span></span><span id="29" class="l"><a class="l" href="#29"> 29: </a><span class="php-comment"> * d'exception sous forme d'erreur de type E_USER_NOTICE et sont renvoyés dans un entête HTTP (X_REST_DEBOGAGE_MESSAGES)
</span></span><span id="30" class="l"><a class="l" href="#30"> 30: </a><span class="php-comment"> * à la fin de l'execution du programme.
</span></span><span id="31" class="l"><a class="l" href="#31"> 31: </a><span class="php-comment"> * Surtout utile pour le Serveur REST. */</span>
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-keyword1">const</span> <a id="MODE_ENTETE_HTTP" href="#MODE_ENTETE_HTTP">MODE_ENTETE_HTTP</a> = <span class="php-quote">'entete_http'</span>;
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a>
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> <span class="php-comment">/** Mode de php (cli ou sapi) */</span>
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$mode" href="#$mode">$mode</a></span> = <span class="php-keyword1">null</span>;
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a>
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> <span class="php-comment">/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/</span>
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$parametres_obligatoires" href="#$parametres_obligatoires">$parametres_obligatoires</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'debogage'</span>, <span class="php-quote">'debogage_mode'</span>);
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a>
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> <span class="php-comment">/**
</span></span><span id="41" class="l"><a class="l" href="#41"> 41: </a><span class="php-comment"> * Accesseur pour le mode
</span></span><span id="42" class="l"><a class="l" href="#42"> 42: </a><span class="php-comment"> * @return string le mode de php
</span></span><span id="43" class="l"><a class="l" href="#43"> 43: </a><span class="php-comment"> */</span>
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getMode" href="#_getMode">getMode</a>() {
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a> <span class="php-keyword1">if</span> (self::<span class="php-var">$mode</span> === <span class="php-keyword1">null</span>) {
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> self::<span class="php-var">$mode</span> = PHP_SAPI;
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a> }
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-keyword1">return</span> self::<span class="php-var">$mode</span>;
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> }
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a>
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a> <span class="php-comment">/**
</span></span><span id="52" class="l"><a class="l" href="#52"> 52: </a><span class="php-comment"> * Equivalent de var_dump
</span></span><span id="53" class="l"><a class="l" href="#53"> 53: </a><span class="php-comment"> * @param mixed $variable la variable à dumper
</span></span><span id="54" class="l"><a class="l" href="#54"> 54: </a><span class="php-comment"> * @param string $mot_cle le mot cle à associer à la variable
</span></span><span id="55" class="l"><a class="l" href="#55"> 55: </a><span class="php-comment"> * @param boolean $echo si true on affiche le résultat, si false on ne renvoie que la chaine sans l'afficher
</span></span><span id="56" class="l"><a class="l" href="#56"> 56: </a><span class="php-comment"> * @return string la chaine à afficher representant le dump ou null si echo
</span></span><span id="57" class="l"><a class="l" href="#57"> 57: </a><span class="php-comment"> */</span>
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_dump" href="#_dump">dump</a>(<span class="php-var">$variable</span>, <span class="php-var">$mot_cle</span> = <span class="php-keyword1">null</span>, <span class="php-var">$echo</span> = <span class="php-keyword1">false</span>) {
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-comment">// var_dump de la variable dans un buffer et récupération de la sortie</span>
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> <span class="php-keyword2">ob_start</span>();
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> <span class="php-keyword2">var_dump</span>(<span class="php-var">$variable</span>);
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> <span class="php-var">$sortie</span> = <span class="php-keyword2">ob_get_clean</span>();
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a>
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-comment">// Pré-traitement de la sortie</span>
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> <span class="php-var">$sortie</span> = <span class="php-keyword2">preg_replace</span>(<span class="php-quote">&quot;/\]\=\&gt;\n(\s+)/m&quot;</span>, <span class="php-quote">&quot;] =&gt; &quot;</span>, <span class="php-var">$sortie</span>);
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a>
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> <span class="php-comment">// Traitement général du débogage</span>
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a> <span class="php-keyword1">return</span> self::traiterDebogage(<span class="php-var">$mot_cle</span>, <span class="php-var">$sortie</span>, <span class="php-var">$echo</span>);
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> }
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a>
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a> <span class="php-comment">/**
</span></span><span id="72" class="l"><a class="l" href="#72"> 72: </a><span class="php-comment"> * Equivalent de print_r.
</span></span><span id="73" class="l"><a class="l" href="#73"> 73: </a><span class="php-comment"> * @param mixed $variable la variable à afficher
</span></span><span id="74" class="l"><a class="l" href="#74"> 74: </a><span class="php-comment"> * @param string $mot_cle le mot cle à associer
</span></span><span id="75" class="l"><a class="l" href="#75"> 75: </a><span class="php-comment"> * @param boolean $echo faire un echo ou non
</span></span><span id="76" class="l"><a class="l" href="#76"> 76: </a><span class="php-comment"> * @return string la chaine contenant la variable printée ou null si echo
</span></span><span id="77" class="l"><a class="l" href="#77"> 77: </a><span class="php-comment"> */</span>
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_printr" href="#_printr">printr</a>(<span class="php-var">$variable</span>, <span class="php-var">$mot_cle</span> = <span class="php-keyword1">null</span>, <span class="php-var">$echo</span> = <span class="php-keyword1">false</span>) {
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> <span class="php-comment">// Récupération de la sortie</span>
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> <span class="php-var">$sortie</span> = <span class="php-keyword2">print_r</span>(<span class="php-var">$variable</span>, <span class="php-keyword1">true</span>);
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a>
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> <span class="php-comment">// Traitement général du débogage</span>
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a> <span class="php-keyword1">return</span> self::traiterDebogage(<span class="php-var">$mot_cle</span>, <span class="php-var">$sortie</span>, <span class="php-var">$echo</span>);
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> }
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a>
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a> <span class="php-comment">/**
</span></span><span id="87" class="l"><a class="l" href="#87"> 87: </a><span class="php-comment"> * Affichage d'informations sur l'espace mémoire occupé par une variable
</span></span><span id="88" class="l"><a class="l" href="#88"> 88: </a><span class="php-comment"> *
</span></span><span id="89" class="l"><a class="l" href="#89"> 89: </a><span class="php-comment"> * @link http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html
</span></span><span id="90" class="l"><a class="l" href="#90"> 90: </a><span class="php-comment"> * @since 0.3
</span></span><span id="91" class="l"><a class="l" href="#91"> 91: </a><span class="php-comment"> *
</span></span><span id="92" class="l"><a class="l" href="#92"> 92: </a><span class="php-comment"> * @param mixed $var la variable dont on veut connaître l'empreinte mémoire.
</span></span><span id="93" class="l"><a class="l" href="#93"> 93: </a><span class="php-comment"> * @param string $mot_cle le mot cle à associer
</span></span><span id="94" class="l"><a class="l" href="#94"> 94: </a><span class="php-comment"> * @param boolean $echo faire un echo ou non
</span></span><span id="95" class="l"><a class="l" href="#95"> 95: </a><span class="php-comment"> *
</span></span><span id="96" class="l"><a class="l" href="#96"> 96: </a><span class="php-comment"> * @return string la chaine d'information sur l'espace mémoire occupé ou bien null si echo
</span></span><span id="97" class="l"><a class="l" href="#97"> 97: </a><span class="php-comment"> */</span>
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_tailleMemoireVar" href="#_tailleMemoireVar">tailleMemoireVar</a>(<span class="php-var">$var</span>, <span class="php-var">$mot_cle</span> = <span class="php-keyword1">null</span>, <span class="php-var">$echo</span> = <span class="php-keyword1">false</span>) {
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> <span class="php-var">$memoire_depart</span> = <span class="php-keyword2">memory_get_usage</span>();
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-var">$temp</span> = <span class="php-keyword2">unserialize</span>(<span class="php-keyword2">serialize</span>(<span class="php-var">$var</span>));
</span><span id="101" class="l"><a class="l" href="#101">101: </a> <span class="php-var">$taille</span> = <span class="php-keyword2">memory_get_usage</span>() - <span class="php-var">$memoire_depart</span>;
</span><span id="102" class="l"><a class="l" href="#102">102: </a> <span class="php-var">$sortie</span> = Fichier::convertirTaille(<span class="php-var">$taille</span>);
</span><span id="103" class="l"><a class="l" href="#103">103: </a> <span class="php-keyword1">return</span> self::traiterDebogage(<span class="php-var">$mot_cle</span>, <span class="php-var">$sortie</span>, <span class="php-var">$echo</span>);
</span><span id="104" class="l"><a class="l" href="#104">104: </a> }
</span><span id="105" class="l"><a class="l" href="#105">105: </a>
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-comment">/**
</span></span><span id="107" class="l"><a class="l" href="#107">107: </a><span class="php-comment"> * Affichage d'informations sur l'espace mémoire occupé par le script PHP
</span></span><span id="108" class="l"><a class="l" href="#108">108: </a><span class="php-comment"> *
</span></span><span id="109" class="l"><a class="l" href="#109">109: </a><span class="php-comment"> * @link http://forum.webmaster-rank.info/developpement-site/code-taille-memoire-d-une-variable-en-php-t1344.html
</span></span><span id="110" class="l"><a class="l" href="#110">110: </a><span class="php-comment"> * @since 0.3
</span></span><span id="111" class="l"><a class="l" href="#111">111: </a><span class="php-comment"> *
</span></span><span id="112" class="l"><a class="l" href="#112">112: </a><span class="php-comment"> * @param string $mot_cle le mot cle à associer
</span></span><span id="113" class="l"><a class="l" href="#113">113: </a><span class="php-comment"> * @param boolean $echo faire un echo ou non
</span></span><span id="114" class="l"><a class="l" href="#114">114: </a><span class="php-comment"> *
</span></span><span id="115" class="l"><a class="l" href="#115">115: </a><span class="php-comment"> * @return string la chaine d'information sur l'espace mémoire occupé ou bien null si echo
</span></span><span id="116" class="l"><a class="l" href="#116">116: </a><span class="php-comment"> */</span>
</span><span id="117" class="l"><a class="l" href="#117">117: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_tailleMemoireScript" href="#_tailleMemoireScript">tailleMemoireScript</a>(<span class="php-var">$mot_cle</span> = <span class="php-keyword1">null</span>, <span class="php-var">$echo</span> = <span class="php-keyword1">false</span>) {
</span><span id="118" class="l"><a class="l" href="#118">118: </a> <span class="php-var">$sortie</span> = <span class="php-quote">'Mémoire -- Utilisé : '</span>.Fichier::convertirTaille(<span class="php-keyword2">memory_get_usage</span>(<span class="php-keyword1">false</span>)).
</span><span id="119" class="l"><a class="l" href="#119">119: </a> <span class="php-quote">' || Alloué : '</span>.
</span><span id="120" class="l"><a class="l" href="#120">120: </a> Fichier::convertirTaille(<span class="php-keyword2">memory_get_usage</span>(<span class="php-keyword1">true</span>)) .
</span><span id="121" class="l"><a class="l" href="#121">121: </a> <span class="php-quote">' || MAX Utilisé : '</span>.
</span><span id="122" class="l"><a class="l" href="#122">122: </a> Fichier::convertirTaille(<span class="php-keyword2">memory_get_peak_usage</span>(<span class="php-keyword1">false</span>)).
</span><span id="123" class="l"><a class="l" href="#123">123: </a> <span class="php-quote">' || MAX Alloué : '</span>.
</span><span id="124" class="l"><a class="l" href="#124">124: </a> Fichier::convertirTaille(<span class="php-keyword2">memory_get_peak_usage</span>(<span class="php-keyword1">true</span>)).
</span><span id="125" class="l"><a class="l" href="#125">125: </a> <span class="php-quote">' || MAX autorisé : '</span>.
</span><span id="126" class="l"><a class="l" href="#126">126: </a> <span class="php-keyword2">ini_get</span>(<span class="php-quote">'memory_limit'</span>);
</span><span id="127" class="l"><a class="l" href="#127">127: </a>
</span><span id="128" class="l"><a class="l" href="#128">128: </a> <span class="php-comment">// Traitement général du débogage</span>
</span><span id="129" class="l"><a class="l" href="#129">129: </a> <span class="php-keyword1">return</span> self::traiterDebogage(<span class="php-var">$mot_cle</span>, <span class="php-var">$sortie</span>, <span class="php-var">$echo</span>);
</span><span id="130" class="l"><a class="l" href="#130">130: </a> }
</span><span id="131" class="l"><a class="l" href="#131">131: </a>
</span><span id="132" class="l"><a class="l" href="#132">132: </a> <span class="php-comment">/**
</span></span><span id="133" class="l"><a class="l" href="#133">133: </a><span class="php-comment"> * Traite une chaine de débogage et les mots clés associés
</span></span><span id="134" class="l"><a class="l" href="#134">134: </a><span class="php-comment"> * @param string $mot_cle le mot à associer à la chaine
</span></span><span id="135" class="l"><a class="l" href="#135">135: </a><span class="php-comment"> * @param string $sortie le chaine de debogage
</span></span><span id="136" class="l"><a class="l" href="#136">136: </a><span class="php-comment"> * @param boolean $echo faire un echo du resultat ou non
</span></span><span id="137" class="l"><a class="l" href="#137">137: </a><span class="php-comment"> * @return string la chaine de debogage formatée ou bien null si echo
</span></span><span id="138" class="l"><a class="l" href="#138">138: </a><span class="php-comment"> */</span>
</span><span id="139" class="l"><a class="l" href="#139">139: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_traiterDebogage" href="#_traiterDebogage">traiterDebogage</a>(<span class="php-var">$mot_cle</span>, <span class="php-var">$sortie</span>, <span class="php-var">$echo</span>) {
</span><span id="140" class="l"><a class="l" href="#140">140: </a> Config::verifierPresenceParametres(self::<span class="php-var">$parametres_obligatoires</span>);
</span><span id="141" class="l"><a class="l" href="#141">141: </a> <span class="php-var">$debogage</span> = Config::get(<span class="php-quote">'debogage'</span>);
</span><span id="142" class="l"><a class="l" href="#142">142: </a> <span class="php-var">$mode</span> = Config::get(<span class="php-quote">'debogage_mode'</span>);
</span><span id="143" class="l"><a class="l" href="#143">143: </a>
</span><span id="144" class="l"><a class="l" href="#144">144: </a> <span class="php-var">$mot_cle</span> = self::formaterMotCle(<span class="php-var">$mot_cle</span>);
</span><span id="145" class="l"><a class="l" href="#145">145: </a> <span class="php-var">$sortie</span> = self::traiterSortieSuivantMode(<span class="php-var">$mot_cle</span>, <span class="php-var">$sortie</span>);
</span><span id="146" class="l"><a class="l" href="#146">146: </a>
</span><span id="147" class="l"><a class="l" href="#147">147: </a> <span class="php-comment">// Affichage et/ou retour</span>
</span><span id="148" class="l"><a class="l" href="#148">148: </a> <span class="php-keyword1">if</span> (<span class="php-var">$debogage</span> == <span class="php-keyword1">true</span>) {
</span><span id="149" class="l"><a class="l" href="#149">149: </a> <span class="php-keyword1">if</span> (<span class="php-var">$echo</span> === <span class="php-keyword1">true</span> || <span class="php-var">$mode</span> == self::MODE_ECHO) {
</span><span id="150" class="l"><a class="l" href="#150">150: </a> <span class="php-keyword1">echo</span> <span class="php-var">$sortie</span>;
</span><span id="151" class="l"><a class="l" href="#151">151: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">null</span>;
</span><span id="152" class="l"><a class="l" href="#152">152: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-var">$mode</span> == self::MODE_NOTICE || <span class="php-var">$mode</span> == self::MODE_ENTETE_HTTP) {
</span><span id="153" class="l"><a class="l" href="#153">153: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$sortie</span>, E_USER_NOTICE);
</span><span id="154" class="l"><a class="l" href="#154">154: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">null</span>;
</span><span id="155" class="l"><a class="l" href="#155">155: </a> } <span class="php-keyword1">else</span> {
</span><span id="156" class="l"><a class="l" href="#156">156: </a> <span class="php-keyword1">return</span> <span class="php-var">$sortie</span>;
</span><span id="157" class="l"><a class="l" href="#157">157: </a> }
</span><span id="158" class="l"><a class="l" href="#158">158: </a> }
</span><span id="159" class="l"><a class="l" href="#159">159: </a> }
</span><span id="160" class="l"><a class="l" href="#160">160: </a>
</span><span id="161" class="l"><a class="l" href="#161">161: </a> <span class="php-comment">/**
</span></span><span id="162" class="l"><a class="l" href="#162">162: </a><span class="php-comment"> * formate un mot clé donné
</span></span><span id="163" class="l"><a class="l" href="#163">163: </a><span class="php-comment"> * @param string $mot_cle le mot clé à formaté
</span></span><span id="164" class="l"><a class="l" href="#164">164: </a><span class="php-comment"> * @return string le mot clé formaté ou bien un chaine vide le mot clé est null ou vide
</span></span><span id="165" class="l"><a class="l" href="#165">165: </a><span class="php-comment"> */</span>
</span><span id="166" class="l"><a class="l" href="#166">166: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_formaterMotCle" href="#_formaterMotCle">formaterMotCle</a>(<span class="php-var">$mot_cle</span>) {
</span><span id="167" class="l"><a class="l" href="#167">167: </a> <span class="php-keyword1">return</span> (<span class="php-var">$mot_cle</span> === <span class="php-keyword1">null</span>) ? <span class="php-quote">''</span> : <span class="php-keyword2">rtrim</span>(<span class="php-var">$mot_cle</span>).<span class="php-quote">' '</span>;
</span><span id="168" class="l"><a class="l" href="#168">168: </a> }
</span><span id="169" class="l"><a class="l" href="#169">169: </a>
</span><span id="170" class="l"><a class="l" href="#170">170: </a> <span class="php-comment">/**
</span></span><span id="171" class="l"><a class="l" href="#171">171: </a><span class="php-comment"> * traite la sortie de la chaine de débogage suivant le mode de php
</span></span><span id="172" class="l"><a class="l" href="#172">172: </a><span class="php-comment"> * @param string $mot_cle le mot clé associé à la chaine
</span></span><span id="173" class="l"><a class="l" href="#173">173: </a><span class="php-comment"> * @param string $sortie la chaine de débogage
</span></span><span id="174" class="l"><a class="l" href="#174">174: </a><span class="php-comment"> * @return string la sortie formatée pour le mode en cours
</span></span><span id="175" class="l"><a class="l" href="#175">175: </a><span class="php-comment"> */</span>
</span><span id="176" class="l"><a class="l" href="#176">176: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_traiterSortieSuivantMode" href="#_traiterSortieSuivantMode">traiterSortieSuivantMode</a>(<span class="php-var">$mot_cle</span>, <span class="php-var">$sortie</span>) {
</span><span id="177" class="l"><a class="l" href="#177">177: </a> <span class="php-var">$mode_actuel</span> = Config::get(<span class="php-quote">'debogage_mode'</span>);
</span><span id="178" class="l"><a class="l" href="#178">178: </a> <span class="php-keyword1">if</span> (<span class="php-var">$mode_actuel</span> == self::MODE_ENTETE_HTTP) {
</span><span id="179" class="l"><a class="l" href="#179">179: </a> <span class="php-var">$cle</span> = (<span class="php-keyword1">empty</span>(<span class="php-var">$mot_cle</span>)) ? <span class="php-quote">'message'</span> : <span class="php-var">$mot_cle</span>;
</span><span id="180" class="l"><a class="l" href="#180">180: </a> <span class="php-var">$sortie</span> = <span class="php-quote">&quot;</span><span class="php-var">$cle</span><span class="php-quote">:</span><span class="php-var">$sortie</span><span class="php-quote">&quot;</span>;
</span><span id="181" class="l"><a class="l" href="#181">181: </a> } <span class="php-keyword1">else</span> {
</span><span id="182" class="l"><a class="l" href="#182">182: </a> <span class="php-var">$corps</span> = <span class="php-var">$mot_cle</span>.PHP_EOL.<span class="php-var">$sortie</span>;
</span><span id="183" class="l"><a class="l" href="#183">183: </a> <span class="php-keyword1">if</span> (self::getMode() == <span class="php-quote">'cli'</span>) {
</span><span id="184" class="l"><a class="l" href="#184">184: </a> <span class="php-var">$sortie</span> = PHP_EOL.<span class="php-var">$corps</span>.PHP_EOL;
</span><span id="185" class="l"><a class="l" href="#185">185: </a> } <span class="php-keyword1">else</span> {
</span><span id="186" class="l"><a class="l" href="#186">186: </a> <span class="php-var">$sortie</span> = <span class="php-quote">'&lt;pre&gt;'</span>.<span class="php-var">$corps</span>.<span class="php-quote">'&lt;/pre&gt;'</span>;
</span><span id="187" class="l"><a class="l" href="#187">187: </a> }
</span><span id="188" class="l"><a class="l" href="#188">188: </a> }
</span><span id="189" class="l"><a class="l" href="#189">189: </a> <span class="php-keyword1">return</span> <span class="php-var">$sortie</span>;
</span><span id="190" class="l"><a class="l" href="#190">190: </a> }
</span><span id="191" class="l"><a class="l" href="#191">191: </a>}
</span><span id="192" class="l"><a class="l" href="#192">192: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-CacheSqlite.html
New file
0,0 → 1,883
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class CacheSqlite | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li class="active"><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-CacheFichier.html">CacheFichier</a></li>
<li class="active"><a href="class-CacheSqlite.html">CacheSqlite</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-None.html" title="Summary of None"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class CacheSqlite</h1>
 
 
 
 
 
 
 
 
 
 
 
<div class="info">
 
<b>Located at</b> <a href="source-class-CacheSqlite.html#2-616" title="Go to source code">CacheSqlite.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-CacheSqlite.html#41-57" title="Go to source code">__construct</a>( <span>array <var>$options</var> = <span class="php-keyword1">array</span>()</span>, <span><code><a href="class-Cache.html">Cache</a></code> <var>$cache</var></span> )</code>
 
<div class="description short">
<p>Constructor</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constructor</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$options</var></dt>
<dd><code>array</code><br>$options Associative array of options</dd>
<dt><var>$cache</var></dt>
<dd></dd>
</dl></div>
 
 
<h4>Throws</h4>
<div class="list">
<code>Zend_cache_Exception</code><br>
</div>
 
 
 
</div>
</div></td>
</tr>
<tr data-order="__destruct" id="___destruct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___destruct">#</a>
<code><a href="source-class-CacheSqlite.html#67-74" title="Go to source code">__destruct</a>( )</code>
 
<div class="description short">
<p>Destructor</p>
 
</div>
 
<div class="description detailed hidden">
<p>Destructor</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setEmplacement" id="_setEmplacement">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setEmplacement">#</a>
<code><a href="source-class-CacheSqlite.html#88-95" title="Go to source code">setEmplacement</a>( <span>mixed <var>$emplacement</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="charger" id="_charger">
 
<td class="attributes"><code>
public
string|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_charger">#</a>
<code><a href="source-class-CacheSqlite.html#97-111" title="Go to source code">charger</a>( <span>string <var>$id</var></span>, <span>boolean <var>$ne_pas_tester_validiter_du_cache</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Test if a cache is available for the given id and (if yes) return it (false
else)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Test if a cache is available for the given id and (if yes) return it (false
else)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$ne_pas_tester_validiter_du_cache</var></dt>
<dd><code>boolean</code><br>$doNotTestCacheValidity If set to true, the cache validity won't be tested</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string|false</code><br>Cached datas<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="tester" id="_tester">
 
<td class="attributes"><code>
public
mixed|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_tester">#</a>
<code><a href="source-class-CacheSqlite.html#113-125" title="Go to source code">tester</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Test if a cache is available or not (for the given id)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Test if a cache is available or not (for the given id)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed|false</code><br>(a cache is not available) or "last modified" timestamp (int) of the available
cache record<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="sauver" id="_sauver">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_sauver">#</a>
<code><a href="source-class-CacheSqlite.html#127-162" title="Go to source code">sauver</a>( <span>string <var>$donnees</var></span>, <span>string <var>$id</var></span>, <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span>, <span>integer <var>$duree_vie_specifique</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Save some string datas into a cache record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Save some string datas into a cache record</p>
 
<p>Note : $data is always "string" (serialization is done by the core not by the
backend)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$donnees</var></dt>
<dd><code>string</code><br>$data Datas to cache</dd>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags Array of strings, the cache record will be tagged by each string entry</dd>
<dt><var>$duree_vie_specifique</var></dt>
<dd><code>integer</code><br>$specificLifetime If != false, set a specific lifetime for this cache record
(null =&gt; infinite lifetime)</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if no problem<br>
</div>
 
<h4>Throws</h4>
<div class="list">
<code>Zend_Cache_Exception</code><br>
</div>
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimer" id="_supprimer">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimer">#</a>
<code><a href="source-class-CacheSqlite.html#164-178" title="Go to source code">supprimer</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Remove a cache record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Remove a cache record</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="nettoyer" id="_nettoyer">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_nettoyer">#</a>
<code><a href="source-class-CacheSqlite.html#180-202" title="Go to source code">nettoyer</a>( <span>string <var>$mode</var> = <code><a href="class-Cache.html#NETTOYAGE_MODE_TOUS">Cache::<b>NETTOYAGE_MODE_TOUS</b></a></code></span>, <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Clean some cache records</p>
 
</div>
 
<div class="description detailed hidden">
<p>Clean some cache records</p>
 
<p>Available modes are : Zend_Cache::CLEANING_MODE_ALL (default) =&gt; remove
all cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_OLD =&gt; remove
too old cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_MATCHING_TAG
=&gt; remove cache entries matching all given tags ($tags can be an array of
strings or a single string) Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG =&gt;
remove cache entries not {matching one of the given tags} ($tags can be an array
of strings or a single string) Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG =&gt;
remove cache entries matching any given tags ($tags can be an array of strings
or a single string)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$mode</var></dt>
<dd><code>string</code><br>$mode Clean mode</dd>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags Array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIds" id="_getIds">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIds">#</a>
<code><a href="source-class-CacheSqlite.html#204-217" title="Go to source code">getIds</a>( )</code>
 
<div class="description short">
<p>Return an array of stored cache ids</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of stored cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getTags" id="_getTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getTags">#</a>
<code><a href="source-class-CacheSqlite.html#219-232" title="Go to source code">getTags</a>( )</code>
 
<div class="description short">
<p>Return an array of stored tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored tags</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of stored tags (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsAvecLesTags" id="_getIdsAvecLesTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsAvecLesTags">#</a>
<code><a href="source-class-CacheSqlite.html#234-270" title="Go to source code">getIdsAvecLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which match given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which match given tags</p>
 
<p>In case of multiple tags, a logical AND is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of matching cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsSansLesTags" id="_getIdsSansLesTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsSansLesTags">#</a>
<code><a href="source-class-CacheSqlite.html#272-302" title="Go to source code">getIdsSansLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which don't match given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which don't match given tags</p>
 
<p>In case of multiple tags, a logical OR is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of not matching cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsAvecUnTag" id="_getIdsAvecUnTag">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsAvecUnTag">#</a>
<code><a href="source-class-CacheSqlite.html#304-340" title="Go to source code">getIdsAvecUnTag</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which match any given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which match any given tags</p>
 
<p>In case of multiple tags, a logical AND is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of any matching cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getPourcentageRemplissage" id="_getPourcentageRemplissage">
 
<td class="attributes"><code>
public
integer
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getPourcentageRemplissage">#</a>
<code><a href="source-class-CacheSqlite.html#342-360" title="Go to source code">getPourcentageRemplissage</a>( )</code>
 
<div class="description short">
<p>Return the filling percentage of the backend storage</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return the filling percentage of the backend storage</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>integer</code><br>integer between 0 and 100<br>
</div>
 
<h4>Throws</h4>
<div class="list">
<code>Zend_Cache_Exception</code><br>
</div>
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getMetadonnees" id="_getMetadonnees">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getMetadonnees">#</a>
<code><a href="source-class-CacheSqlite.html#362-394" title="Go to source code">getMetadonnees</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Return an array of metadatas for the given cache id</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of metadatas for the given cache id</p>
 
<p>The array must include these keys :</p>
 
<ul>
<li>expire : the expire timestamp</li>
 
<li>tags : a string array of tags</li>
 
<li>mtime : timestamp of last modification time</li>
</ul>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of metadatas (false if the cache id is not found)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="ajouterSupplementDureeDeVie" id="_ajouterSupplementDureeDeVie">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_ajouterSupplementDureeDeVie">#</a>
<code><a href="source-class-CacheSqlite.html#396-415" title="Go to source code">ajouterSupplementDureeDeVie</a>( <span>string <var>$id</var></span>, <span>integer <var>$supplement_duree_de_vie</var></span> )</code>
 
<div class="description short">
<p>Give (if possible) an extra lifetime to the given cache id</p>
 
</div>
 
<div class="description detailed hidden">
<p>Give (if possible) an extra lifetime to the given cache id</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
<dt><var>$supplement_duree_de_vie</var></dt>
<dd><code>integer</code><br>$extraLifetime</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if ok<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="options" id="$options">
<td class="attributes"><code>
protected
array
</code></td>
 
<td class="name">
<a href="source-class-CacheSqlite.html#3-23" title="Go to source code"><var>$options</var></a>
</td>
<td class="value"><code><span class="php-keyword1">array</span>(
<span class="php-quote">'stockage_chemin'</span> =&gt; <span class="php-keyword1">null</span>,
<span class="php-quote">'defragmentation_auto'</span> =&gt; <span class="php-num">10</span>
)</code></td>
<td class="description"><div>
<a href="#$options" class="anchor">#</a>
 
<div class="description short">
<p>Options disponibles :</p>
 
</div>
 
<div class="description detailed hidden">
<p>Options disponibles :</p>
 
<h1>&gt; (string) stockage_chemin :</h1>
 
<p>Chemin vers le fichier contenant la base SQLite.</p>
 
<h1>&gt; (int) defragmentation_auto :</h1>
 
<ul>
<li>Désactive / Régler le processus de défragmentation automatique</li>
 
<li>Le processus de défragmentation automatiques réduit la taille du fichier
contenant la base de données quand un ajout ou une suppression de cache est
réalisée : 0 =&gt; pas de défragmentation automatique 1 =&gt;
défragmentation automatique systématique x (integer) &gt; 1 =&gt;
défragmentation automatique toutes les 1 fois (au hasard) sur x ajout ou
suppression de cache</li>
</ul>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Bdd.html
New file
0,0 → 1,1328
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Bdd | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li class="active"><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Bdd</h1>
 
 
<div class="description">
<p>Classe Bdd, d'accés au base de données. Elle fait office d'abstraction
légère de base de données en utilisant diverses possibilités d'accès aux
bases de données (PDO, mysql, mysqli, SQLite3). Les valeurs pour le paramètre
'bdd_abstraction' du fichier config.ini sont : pdo, mysql, mysqli, sqlite3 Vous
pouvez aussi utiliser : "php:Bdd::ABSTRACTION_PDO","php:Bdd::ABSTRACTION_MYSQL",
"php:Bdd::ABSTRACTION_MYSQLI", "php:Bdd::ABSTRACTION_SQLITE3". Elle peut être
étendue, pour ajouter le support d'autres bases de données où prendre en
compte des méthodes spécifique à un type d'abstraction.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
php 5.2<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
<b>Author:</b>
Aurélien PERONNET &lt;<a
href="mailto:aurelien&#64;tela-botanica.org">aurelien&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Located at</b> <a href="source-class-Bdd.html#3-481" title="Go to source code">Bdd.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-Bdd.html#86-103" title="Go to source code">__construct</a>( )</code>
 
<div class="description short">
<p>Constructeur par défaut, appelé à l'initialisation.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constructeur par défaut, appelé à l'initialisation.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="initialiserProtocole" id="_initialiserProtocole">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_initialiserProtocole">#</a>
<code><a href="source-class-Bdd.html#105-128" title="Go to source code">initialiserProtocole</a>( )</code>
 
<div class="description short">
<p>Initialise les constantes de classe à leur bonne valeur et déclenche une
erreur si le protocole n'est pas bien défini.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Initialise les constantes de classe à leur bonne valeur et déclenche une
erreur si le protocole n'est pas bien défini.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="connecter" id="_connecter">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_connecter">#</a>
<code><a href="source-class-Bdd.html#130-193" title="Go to source code">connecter</a>( )</code>
 
<div class="description short">
<p>Connection à la base de données en utilisant les informations fournies par
le fichier de configuration. Cette méthode est private et final car elle n'a
pas vocation a être appelée par l'utilisateur. TODO : il est peut être
nécessaire pour MYSQL, MYSQLi et SQLITE3 afin d'éviter les boucles infinis
d'erreur quand la bdd n'est pas configuré d'utiliser :
$this-&gt;connexion-&gt;query (comme pour PDO)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Connection à la base de données en utilisant les informations fournies par
le fichier de configuration. Cette méthode est private et final car elle n'a
pas vocation a être appelée par l'utilisateur. TODO : il est peut être
nécessaire pour MYSQL, MYSQLi et SQLITE3 afin d'éviter les boucles infinis
d'erreur quand la bdd n'est pas configuré d'utiliser :
$this-&gt;connexion-&gt;query (comme pour PDO)</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="ping" id="_ping">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_ping">#</a>
<code><a href="source-class-Bdd.html#195-222" title="Go to source code">ping</a>( )</code>
 
<div class="description short">
<p>Permet de tester, puis de reconnecter une connection au cas ou celle aurait
été perdue (utile dans le cas d'une connection ouverte depuis trop
longtemps)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Permet de tester, puis de reconnecter une connection au cas ou celle aurait
été perdue (utile dans le cas d'une connection ouverte depuis trop
longtemps)</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="requete" id="_requete">
 
<td class="attributes"><code>
final protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_requete">#</a>
<code><a href="source-class-Bdd.html#224-229" title="Go to source code">requete</a>( <span>mixed <var>$requete</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
<h4>Deprecated</h4>
<div class="list">
changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see
requeter<br>
</div>
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="requeter" id="_requeter">
 
<td class="attributes"><code>
public
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_requeter">#</a>
<code><a href="source-class-Bdd.html#231-261" title="Go to source code">requeter</a>( <span>string <var>$requete</var></span> )</code>
 
<div class="description short">
<p>Execute une requête et retourne le résultat tel que renvoyé par
l'abstraction courante.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Execute une requête et retourne le résultat tel que renvoyé par
l'abstraction courante.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$requete</var></dt>
<dd><code>string</code><br>la requête à effectuer</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>un objet contenant le résultat de la requête<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="requeteUn" id="_requeteUn">
 
<td class="attributes"><code>
final protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_requeteUn">#</a>
<code><a href="source-class-Bdd.html#263-268" title="Go to source code">requeteUn</a>( <span>mixed <var>$requete</var></span>, <span>mixed <var>$mode</var> = <code><a href="class-Bdd.html#MODE_ASSOC">Bdd::<b>MODE_ASSOC</b></a></code></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
<h4>Deprecated</h4>
<div class="list">
changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see
recuperer<br>
</div>
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="recuperer" id="_recuperer">
 
<td class="attributes"><code>
public
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_recuperer">#</a>
<code><a href="source-class-Bdd.html#270-307" title="Go to source code">recuperer</a>( <span>string <var>$requete</var></span>, <span>string <var>$mode</var> = <code><a href="class-Bdd.html#MODE_ASSOC">Bdd::<b>MODE_ASSOC</b></a></code></span> )</code>
 
<div class="description short">
<p>Execute une requête et retourne le premier résultat sous forme de tableau
(par défaut) ou d'objet. Les noms des champs de la base de données
correspondent aux noms des clés du tableau ou aux noms des attributs de
l'objet.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Execute une requête et retourne le premier résultat sous forme de tableau
(par défaut) ou d'objet. Les noms des champs de la base de données
correspondent aux noms des clés du tableau ou aux noms des attributs de
l'objet.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$requete</var></dt>
<dd><code>string</code><br>la requête à effectuer</dd>
<dt><var>$mode</var></dt>
<dd><code>string</code><br>le mode de retour ASSOC (Bdd::MODE_ASSOC) pour un tableau ou OBJECT
(Bdd::MODE_OBJET) pour un objet.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>un objet ou un tableau contenant le résultat de la requête<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="requeteTous" id="_requeteTous">
 
<td class="attributes"><code>
final protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_requeteTous">#</a>
<code><a href="source-class-Bdd.html#309-314" title="Go to source code">requeteTous</a>( <span>mixed <var>$requete</var></span>, <span>mixed <var>$mode</var> = <code><a href="class-Bdd.html#MODE_ASSOC">Bdd::<b>MODE_ASSOC</b></a></code></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
<h4>Deprecated</h4>
<div class="list">
changement de nom. Disparaîtra dans la version 0.4. Utiliser à la place : @see
recupererTous<br>
</div>
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="recupererTous" id="_recupererTous">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_recupererTous">#</a>
<code><a href="source-class-Bdd.html#316-370" title="Go to source code">recupererTous</a>( <span>string <var>$requete</var></span>, <span>string <var>$mode</var> = <code><a href="class-Bdd.html#MODE_ASSOC">Bdd::<b>MODE_ASSOC</b></a></code></span> )</code>
 
<div class="description short">
<p>Execute une requête et retourne un tableau de résultats. Un résultat peut
être présentés sous forme de tableau (par défaut) ou d'objet. Les noms des
champs de la base de données correspondent aux noms des clés du tableau
résultat ou aux noms des attributs de l'objet résultat.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Execute une requête et retourne un tableau de résultats. Un résultat peut
être présentés sous forme de tableau (par défaut) ou d'objet. Les noms des
champs de la base de données correspondent aux noms des clés du tableau
résultat ou aux noms des attributs de l'objet résultat.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$requete</var></dt>
<dd><code>string</code><br>la requête à effectuer</dd>
<dt><var>$mode</var></dt>
<dd><code>string</code><br>le mode de retour des résultats : ASSOC (Bdd::MODE_ASSOC) pour un tableau ou
OBJECT (Bdd::MODE_OBJET) pour un objet.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>un tableau contenant les résultats sous forme d'objets ou de tableau (par
défaut).<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="proteger" id="_proteger">
 
<td class="attributes"><code>
public
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_proteger">#</a>
<code><a href="source-class-Bdd.html#372-386" title="Go to source code">proteger</a>( <span>Mixed <var>$donnees</var></span> )</code>
 
<div class="description short">
<p>Protège une chaine de caractères ou le contenu d'un tablea avant
l'insertion dans la base de données (ajout de quotes ou guillemets).</p>
 
</div>
 
<div class="description detailed hidden">
<p>Protège une chaine de caractères ou le contenu d'un tablea avant
l'insertion dans la base de données (ajout de quotes ou guillemets).</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$donnees</var></dt>
<dd><code>Mixed</code><br>une chaine ou un tableau à protéger</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>la chaine ou le tableau à protégé<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="protegerTableau" id="_protegerTableau">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_protegerTableau">#</a>
<code><a href="source-class-Bdd.html#412-424" title="Go to source code">protegerTableau</a>( <span>array <var>$tableau</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
<h4>Deprecated</h4>
<div class="list">
changement de nom. Deviendra "private" dans la version 0.5. Utiliser à la place
: @see proteger<br>
</div>
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="recupererIdDernierAjout" id="_recupererIdDernierAjout">
 
<td class="attributes"><code>
public
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_recupererIdDernierAjout">#</a>
<code><a href="source-class-Bdd.html#426-456" title="Go to source code">recupererIdDernierAjout</a>( <span>mixed <var>$parametres</var> = <span class="php-keyword1">null</span></span> )</code>
 
<div class="description short">
<p>Retourne l'identifiant de la dernière ligne insérée, ou la dernière
valeur d'une séquence d'objets, dépendamment, dans le cas de PDO, du driver
utilisé. Les méthodes utilisées pour retourner l'identifiant peuvent avoir
des comportements différent. Consulter la documentation PHP correspondant à
l'abstraction choisie avant de l'utiliser :</p>
 
</div>
 
<div class="description detailed hidden">
<p>Retourne l'identifiant de la dernière ligne insérée, ou la dernière
valeur d'une séquence d'objets, dépendamment, dans le cas de PDO, du driver
utilisé. Les méthodes utilisées pour retourner l'identifiant peuvent avoir
des comportements différent. Consulter la documentation PHP correspondant à
l'abstraction choisie avant de l'utiliser :</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$parametres</var></dt>
<dd><code>mixed</code><br>un paramètre éventuel à transmettre (en fonction de l'abstraction de BDD
utilisée).</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>le dernier identifiant de clé primaire ajouté dans la base de données (string
ou int).<br>
</div>
 
 
<h4>Link(http://fr.php.net/manual/fr/function.mysql-insert-id.php,</h4>
<div class="list">
mysql_insert_id())<br>
</div>
<h4>Link(http://fr.php.net/manual/fr/pdo.lastinsertid.php,</h4>
<div class="list">
PDO::lastInsertId([ string $name = NULL ]))<br>
</div>
<h4>Link(http://fr.php.net/manual/fr/sqlite3.lastinsertrowid.php,</h4>
<div class="list">
SQLite3::lastInsertRowID())<br>
</div>
<h4>Link(http://php.net/manual/en/mysqli.insert-id.php,</h4>
<div class="list">
mysqli-&gt;insert_id())<br>
</div>
 
 
</div>
</div></td>
</tr>
<tr data-order="__destruct" id="___destruct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___destruct">#</a>
<code><a href="source-class-Bdd.html#458-480" title="Go to source code">__destruct</a>( )</code>
 
<div class="description short">
<p>Destructeur de classe, se contente de fermer explicitement la connexion à la
base de donnée.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Destructeur de classe, se contente de fermer explicitement la connexion à la
base de donnée.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
<table class="summary" id="constants">
<caption>Constants summary</caption>
<tr data-order="ERREUR_REQUETE_TPL" id="ERREUR_REQUETE_TPL">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Bdd.html#22-23" title="Go to source code"><b>ERREUR_REQUETE_TPL</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'Requête echec.\nFichier : %s.\nLigne : %s.\nMessage : %s.\nRequête : %s'</span></code></td>
<td class="description"><div>
<a href="#ERREUR_REQUETE_TPL" class="anchor">#</a>
 
<div class="description short">
<p>Constante stockant le squelette du message en cas d'erreur de requête
sql.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constante stockant le squelette du message en cas d'erreur de requête
sql.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="ERREUR_CONNEXION_TPL" id="ERREUR_CONNEXION_TPL">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Bdd.html#25-26" title="Go to source code"><b>ERREUR_CONNEXION_TPL</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'Erreur de connexion à la base de données, vérifiez les paramètres du fichier de configuration.\nMessage : %S.'</span></code></td>
<td class="description"><div>
<a href="#ERREUR_CONNEXION_TPL" class="anchor">#</a>
 
<div class="description short">
<p>Constante stockant le squelette du message en cas d'erreur de connexion à la
base de données.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constante stockant le squelette du message en cas d'erreur de connexion à la
base de données.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="ERREUR_SELECTION_BDD_TPL" id="ERREUR_SELECTION_BDD_TPL">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Bdd.html#28-29" title="Go to source code"><b>ERREUR_SELECTION_BDD_TPL</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'Erreur de sélection de la base de données, vérifiez les paramètres du fichier de configuration.\nMessage : %S.'</span></code></td>
<td class="description"><div>
<a href="#ERREUR_SELECTION_BDD_TPL" class="anchor">#</a>
 
<div class="description short">
<p>Constante stockant le squelette du message en cas d'erreur de sélection de
la base de données.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constante stockant le squelette du message en cas d'erreur de sélection de
la base de données.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="ABSTRACTION_PDO" id="ABSTRACTION_PDO">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Bdd.html#31-32" title="Go to source code"><b>ABSTRACTION_PDO</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'pdo'</span></code></td>
<td class="description"><div>
<a href="#ABSTRACTION_PDO" class="anchor">#</a>
 
<div class="description short">
<p>Constante stockant le code pour l'abstraction de PDO.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constante stockant le code pour l'abstraction de PDO.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="ABSTRACTION_MYSQL" id="ABSTRACTION_MYSQL">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Bdd.html#34-35" title="Go to source code"><b>ABSTRACTION_MYSQL</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'mysql'</span></code></td>
<td class="description"><div>
<a href="#ABSTRACTION_MYSQL" class="anchor">#</a>
 
<div class="description short">
<p>Constante stockant le code pour l'abstraction de mysql.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constante stockant le code pour l'abstraction de mysql.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="ABSTRACTION_MYSQLI" id="ABSTRACTION_MYSQLI">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Bdd.html#37-38" title="Go to source code"><b>ABSTRACTION_MYSQLI</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'mysqli'</span></code></td>
<td class="description"><div>
<a href="#ABSTRACTION_MYSQLI" class="anchor">#</a>
 
<div class="description short">
<p>Constante stockant le code pour l'abstraction de mysqli.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constante stockant le code pour l'abstraction de mysqli.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="ABSTRACTION_SQLITE3" id="ABSTRACTION_SQLITE3">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Bdd.html#40-41" title="Go to source code"><b>ABSTRACTION_SQLITE3</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'sqlite3'</span></code></td>
<td class="description"><div>
<a href="#ABSTRACTION_SQLITE3" class="anchor">#</a>
 
<div class="description short">
<p>Constante stockant le code pour l'abstraction de SQLite3.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constante stockant le code pour l'abstraction de SQLite3.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="MODE_ASSOC" id="MODE_ASSOC">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Bdd.html#43-44" title="Go to source code"><b>MODE_ASSOC</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'ASSOC'</span></code></td>
<td class="description"><div>
<a href="#MODE_ASSOC" class="anchor">#</a>
 
<div class="description short">
<p>Constante stockant le code pour le mode tableau associatif des résultats des
requêtes.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constante stockant le code pour le mode tableau associatif des résultats des
requêtes.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="MODE_OBJET" id="MODE_OBJET">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-Bdd.html#46-47" title="Go to source code"><b>MODE_OBJET</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'OBJECT'</span></code></td>
<td class="description"><div>
<a href="#MODE_OBJET" class="anchor">#</a>
 
<div class="description short">
<p>Constante stockant le code pour le mode objet des résultats des
requêtes.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constante stockant le code pour le mode objet des résultats des
requêtes.</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="ASSOC" id="$ASSOC">
<td class="attributes"><code>
protected
string
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#49-50" title="Go to source code"><var>$ASSOC</var></a>
</td>
<td class="value"><code><span class="php-quote">''</span></code></td>
<td class="description"><div>
<a href="#$ASSOC" class="anchor">#</a>
 
<div class="description short">
<p>Mode de fetch associatif</p>
 
</div>
 
<div class="description detailed hidden">
<p>Mode de fetch associatif</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="OBJECT" id="$OBJECT">
<td class="attributes"><code>
protected
string
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#52-53" title="Go to source code"><var>$OBJECT</var></a>
</td>
<td class="value"><code><span class="php-quote">''</span></code></td>
<td class="description"><div>
<a href="#$OBJECT" class="anchor">#</a>
 
<div class="description short">
<p>Mode de fetch objet</p>
 
</div>
 
<div class="description detailed hidden">
<p>Mode de fetch objet</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="abstraction" id="$abstraction">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#55-56" title="Go to source code"><var>$abstraction</var></a>
</td>
<td class="value"><code></code></td>
<td class="description"><div>
<a href="#$abstraction" class="anchor">#</a>
 
<div class="description short">
<p>abstraction de base de données utilisée</p>
 
</div>
 
<div class="description detailed hidden">
<p>abstraction de base de données utilisée</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="dsn" id="$dsn">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#58-59" title="Go to source code"><var>$dsn</var></a>
</td>
<td class="value"><code></code></td>
<td class="description"><div>
<a href="#$dsn" class="anchor">#</a>
 
<div class="description short">
<p>DSN pour accéder à la base de données</p>
 
</div>
 
<div class="description detailed hidden">
<p>DSN pour accéder à la base de données</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="type" id="$type">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#61-62" title="Go to source code"><var>$type</var></a>
</td>
<td class="value"><code></code></td>
<td class="description"><div>
<a href="#$type" class="anchor">#</a>
 
<div class="description short">
<p>Type de base de données (mysql, mysqli, etc ...)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Type de base de données (mysql, mysqli, etc ...)</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="hote" id="$hote">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#64-65" title="Go to source code"><var>$hote</var></a>
</td>
<td class="value"><code></code></td>
<td class="description"><div>
<a href="#$hote" class="anchor">#</a>
 
<div class="description short">
<p>Hote herbergeant la base de données</p>
 
</div>
 
<div class="description detailed hidden">
<p>Hote herbergeant la base de données</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="bdd_nom" id="$bdd_nom">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#67-68" title="Go to source code"><var>$bdd_nom</var></a>
</td>
<td class="value"><code></code></td>
<td class="description"><div>
<a href="#$bdd_nom" class="anchor">#</a>
 
<div class="description short">
<p>Nom de la base de données à laquelle le modèle doit se connecter</p>
 
</div>
 
<div class="description detailed hidden">
<p>Nom de la base de données à laquelle le modèle doit se connecter</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="utilisateur" id="$utilisateur">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#70-71" title="Go to source code"><var>$utilisateur</var></a>
</td>
<td class="value"><code></code></td>
<td class="description"><div>
<a href="#$utilisateur" class="anchor">#</a>
 
<div class="description short">
<p>Nom d'utilisateur</p>
 
</div>
 
<div class="description detailed hidden">
<p>Nom d'utilisateur</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="pass" id="$pass">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#73-74" title="Go to source code"><var>$pass</var></a>
</td>
<td class="value"><code></code></td>
<td class="description"><div>
<a href="#$pass" class="anchor">#</a>
 
<div class="description short">
<p>Mot de passe</p>
 
</div>
 
<div class="description detailed hidden">
<p>Mot de passe</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="encodage" id="$encodage">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#76-77" title="Go to source code"><var>$encodage</var></a>
</td>
<td class="value"><code><span class="php-keyword1">null</span></code></td>
<td class="description"><div>
<a href="#$encodage" class="anchor">#</a>
 
<div class="description short">
<p>Encodage de la base de données</p>
 
</div>
 
<div class="description detailed hidden">
<p>Encodage de la base de données</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="connexion" id="$connexion">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#79-80" title="Go to source code"><var>$connexion</var></a>
</td>
<td class="value"><code><span class="php-keyword1">null</span></code></td>
<td class="description"><div>
<a href="#$connexion" class="anchor">#</a>
 
<div class="description short">
<p>Connexion à la base de données</p>
 
</div>
 
<div class="description detailed hidden">
<p>Connexion à la base de données</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="parametres_obligatoires" id="$parametres_obligatoires">
<td class="attributes"><code>
protected
array
</code></td>
 
<td class="name">
<a href="source-class-Bdd.html#82-84" title="Go to source code"><var>$parametres_obligatoires</var></a>
</td>
<td class="value"><code><span class="php-keyword1">array</span>(<span class="php-quote">'bdd_abstraction'</span>, <span class="php-quote">'bdd_protocole'</span>, <span class="php-quote">'bdd_serveur'</span>, <span class="php-quote">'bdd_nom'</span>,
<span class="php-quote">'bdd_utilisateur'</span>, <span class="php-quote">'bdd_mot_de_passe'</span>, <span class="php-quote">'bdd_encodage'</span>)</code></td>
<td class="description"><div>
<a href="#$parametres_obligatoires" class="anchor">#</a>
 
<div class="description short">
<p>Tableau des noms des paramètres à définir dans le fichier de config car
obligatoirement nécessaire à cette classe.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Tableau des noms des paramètres à définir dans le fichier de config car
obligatoirement nécessaire à cette classe.</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/elementlist.js
New file
0,0 → 1,3
 
var ApiGen = ApiGen || {};
ApiGen.elements = [["c","Bdd"],["c","Cache"],["c","CacheFichier"],["c","CacheSimple"],["c","CacheSqlite"],["c","Chaine"],["c","Chronometre"],["c","Cli"],["c","Config"],["c","Controleur"],["c","Debug"],["c","Encodage"],["c","Exception"],["c","Fichier"],["c","Framework"],["c","GestionnaireException"],["c","I18n"],["c","Log"],["c","Pattern"],["c","Registre"],["c","RestClient"],["c","RestServeur"],["c","RestService"],["c","Script"],["c","SquelettePhp"],["c","Tableau"],["c","Url"]];
/branches/v0.3-aleaume/doc/ApiGen/class-Exception.html
New file
0,0 → 1,498
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Exception | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li class="active"><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
 
 
 
<h3>Exceptions</h3>
<ul>
<li class="active"><a href="class-Exception.html">Exception</a></li>
</ul>
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-PHP.html" title="Summary of PHP"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Exception</h1>
 
 
 
 
 
 
 
 
 
 
 
<div class="info">
<b>PHP Extension:</b> <a href="http://php.net/manual" title="Go to PHP documentation">Core</a><br>
 
<b>Documented at</b> <a href="http://php.net/manual/class.exception.php" title="Go to PHP documentation">php.net</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="http://php.net/manual/exception.construct.php" title="Go to PHP documentation">__construct</a>( <span>mixed <var>$message</var></span>, <span>mixed <var>$code</var></span>, <span>mixed <var>$previous</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getMessage" id="_getMessage">
 
<td class="attributes"><code>
final public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getMessage">#</a>
<code><a href="http://php.net/manual/exception.getmessage.php" title="Go to PHP documentation">getMessage</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getCode" id="_getCode">
 
<td class="attributes"><code>
final public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getCode">#</a>
<code><a href="http://php.net/manual/exception.getcode.php" title="Go to PHP documentation">getCode</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getFile" id="_getFile">
 
<td class="attributes"><code>
final public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getFile">#</a>
<code><a href="http://php.net/manual/exception.getfile.php" title="Go to PHP documentation">getFile</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getLine" id="_getLine">
 
<td class="attributes"><code>
final public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getLine">#</a>
<code><a href="http://php.net/manual/exception.getline.php" title="Go to PHP documentation">getLine</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getTrace" id="_getTrace">
 
<td class="attributes"><code>
final public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getTrace">#</a>
<code><a href="http://php.net/manual/exception.gettrace.php" title="Go to PHP documentation">getTrace</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getPrevious" id="_getPrevious">
 
<td class="attributes"><code>
final public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getPrevious">#</a>
<code><a href="http://php.net/manual/exception.getprevious.php" title="Go to PHP documentation">getPrevious</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getTraceAsString" id="_getTraceAsString">
 
<td class="attributes"><code>
final public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getTraceAsString">#</a>
<code><a href="http://php.net/manual/exception.gettraceasstring.php" title="Go to PHP documentation">getTraceAsString</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="__toString" id="___toString">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___toString">#</a>
<code><a href="http://php.net/manual/exception.tostring.php" title="Go to PHP documentation">__toString</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="message" id="$message">
<td class="attributes"><code>
protected
string
</code></td>
 
<td class="name">
<a href="http://php.net/manual/class.exception.php#exception.props.message" title="Go to PHP documentation"><var>$message</var></a>
</td>
<td class="value"><code><span class="php-quote">''</span></code></td>
<td class="description"><div>
<a href="#$message" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
<tr data-order="code" id="$code">
<td class="attributes"><code>
protected
integer
</code></td>
 
<td class="name">
<a href="http://php.net/manual/class.exception.php#exception.props.code" title="Go to PHP documentation"><var>$code</var></a>
</td>
<td class="value"><code><span class="php-num">0</span></code></td>
<td class="description"><div>
<a href="#$code" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
<tr data-order="file" id="$file">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="http://php.net/manual/class.exception.php#exception.props.file" title="Go to PHP documentation"><var>$file</var></a>
</td>
<td class="value"><code></code></td>
<td class="description"><div>
<a href="#$file" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
<tr data-order="line" id="$line">
<td class="attributes"><code>
protected
mixed
</code></td>
 
<td class="name">
<a href="http://php.net/manual/class.exception.php#exception.props.line" title="Go to PHP documentation"><var>$line</var></a>
</td>
<td class="value"><code></code></td>
<td class="description"><div>
<a href="#$line" class="anchor">#</a>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Url.html
New file
0,0 → 1,542
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Url.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li class="active"><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Url.html" title="Summary of Url"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe Url, gérant le découpage des paramètres, leurs modification etc...
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * Traduction et conversion d'une classe (NET_Url2) issue de Pear
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> *
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * @category Php 5.2
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @package Framework
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @author Christian SCHMIDT &lt;schmidt@php.net&gt; (Auteur classe originale)
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @author Aurélien PERONNET &lt;aurelien@tela-botanica.org&gt;
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @version SVN: $Id: Url.php 404 2012-02-22 15:44:24Z gduche $
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment">*/</span>
</span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-keyword1">class</span> <a id="Url" href="#Url">Url</a> {
</span><span id="19" class="l"><a class="l" href="#19"> 19: </a>
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a> <span class="php-comment">/**
</span></span><span id="21" class="l"><a class="l" href="#21"> 21: </a><span class="php-comment"> * Répresenter les tableaux dans les requêtes en utilisant la notation php []. Par défaut à true.
</span></span><span id="22" class="l"><a class="l" href="#22"> 22: </a><span class="php-comment"> */</span>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> <span class="php-keyword1">const</span> <a id="OPTION_UTILISER_CROCHETS" href="#OPTION_UTILISER_CROCHETS">OPTION_UTILISER_CROCHETS</a> = <span class="php-quote">'utiliser_crochets'</span>;
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a>
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a> <span class="php-comment">/**
</span></span><span id="26" class="l"><a class="l" href="#26"> 26: </a><span class="php-comment"> * URL-encoder les clés des variables dans les requêtes. Par défaut à true.
</span></span><span id="27" class="l"><a class="l" href="#27"> 27: </a><span class="php-comment"> */</span>
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-keyword1">const</span> <a id="OPTION_ENCODER_CLES" href="#OPTION_ENCODER_CLES">OPTION_ENCODER_CLES</a> = <span class="php-quote">'encoder_cles'</span>;
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a>
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a> <span class="php-comment">/**
</span></span><span id="31" class="l"><a class="l" href="#31"> 31: </a><span class="php-comment"> * URL-encoder les valeurs des variables dans les requêtes. Par défaut à false.
</span></span><span id="32" class="l"><a class="l" href="#32"> 32: </a><span class="php-comment"> */</span>
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a> <span class="php-keyword1">const</span> <a id="OPTION_ENCODER_VALEURS" href="#OPTION_ENCODER_VALEURS">OPTION_ENCODER_VALEURS</a> = <span class="php-quote">'encoder_valeurs'</span>;
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a>
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-comment">/**
</span></span><span id="36" class="l"><a class="l" href="#36"> 36: </a><span class="php-comment"> * Séparateurs de variables lors du parsing de la requête. Chaque caractère
</span></span><span id="37" class="l"><a class="l" href="#37"> 37: </a><span class="php-comment"> * est considéré comme un séparateur. Par défaut, spécifié par le paramêtre
</span></span><span id="38" class="l"><a class="l" href="#38"> 38: </a><span class="php-comment"> * arg_separator.input dans php.ini (par défaut &quot;&amp;&quot;).
</span></span><span id="39" class="l"><a class="l" href="#39"> 39: </a><span class="php-comment"> */</span>
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> <span class="php-keyword1">const</span> <a id="OPTION_SEPARATEUR_ENTREE" href="#OPTION_SEPARATEUR_ENTREE">OPTION_SEPARATEUR_ENTREE</a> = <span class="php-quote">'separateur_entree'</span>;
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a>
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a> <span class="php-comment">/**
</span></span><span id="43" class="l"><a class="l" href="#43"> 43: </a><span class="php-comment"> * Séparateur de variables lors de la génération de la requête. Par défaut, spécifié
</span></span><span id="44" class="l"><a class="l" href="#44"> 44: </a><span class="php-comment"> * par le paramètre arg_separator.output dans php.ini (par défaut &quot;&amp;&quot;).
</span></span><span id="45" class="l"><a class="l" href="#45"> 45: </a><span class="php-comment"> */</span>
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> <span class="php-keyword1">const</span> <a id="OPTION_SEPARATEUR_SORTIE" href="#OPTION_SEPARATEUR_SORTIE">OPTION_SEPARATEUR_SORTIE</a> = <span class="php-quote">'separateur_sortie'</span>;
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a>
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-comment">/**
</span></span><span id="49" class="l"><a class="l" href="#49"> 49: </a><span class="php-comment"> * Options par défaut correspondant au comportement de php
</span></span><span id="50" class="l"><a class="l" href="#50"> 50: </a><span class="php-comment"> * vis à vis de $_GET
</span></span><span id="51" class="l"><a class="l" href="#51"> 51: </a><span class="php-comment"> */</span>
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$options" href="#$options">$options</a></span> = <span class="php-keyword1">array</span>(
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a> self::OPTION_UTILISER_CROCHETS =&gt; <span class="php-keyword1">true</span>,
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> self::OPTION_ENCODER_CLES =&gt; <span class="php-keyword1">true</span>,
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> self::OPTION_ENCODER_VALEURS =&gt; <span class="php-keyword1">false</span>,
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> self::OPTION_SEPARATEUR_ENTREE =&gt; <span class="php-quote">'&amp;'</span>,
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> self::OPTION_SEPARATEUR_SORTIE =&gt; <span class="php-quote">'&amp;'</span>);
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a>
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-comment">/**
</span></span><span id="60" class="l"><a class="l" href="#60"> 60: </a><span class="php-comment"> * @var string|bool
</span></span><span id="61" class="l"><a class="l" href="#61"> 61: </a><span class="php-comment"> */</span>
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$schema" href="#$schema">$schema</a></span> = <span class="php-keyword1">false</span>;
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a>
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-comment">/**
</span></span><span id="65" class="l"><a class="l" href="#65"> 65: </a><span class="php-comment"> * @var string|bool
</span></span><span id="66" class="l"><a class="l" href="#66"> 66: </a><span class="php-comment"> */</span>
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$infoUtilisateur" href="#$infoUtilisateur">$infoUtilisateur</a></span> = <span class="php-keyword1">false</span>;
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a>
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> <span class="php-comment">/**
</span></span><span id="70" class="l"><a class="l" href="#70"> 70: </a><span class="php-comment"> * @var string|bool
</span></span><span id="71" class="l"><a class="l" href="#71"> 71: </a><span class="php-comment"> */</span>
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$hote" href="#$hote">$hote</a></span> = <span class="php-keyword1">false</span>;
</span><span id="73" class="l"><a class="l" href="#73"> 73: </a>
</span><span id="74" class="l"><a class="l" href="#74"> 74: </a> <span class="php-comment">/**
</span></span><span id="75" class="l"><a class="l" href="#75"> 75: </a><span class="php-comment"> * @var int|bool
</span></span><span id="76" class="l"><a class="l" href="#76"> 76: </a><span class="php-comment"> */</span>
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$port" href="#$port">$port</a></span> = <span class="php-keyword1">false</span>;
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a>
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> <span class="php-comment">/**
</span></span><span id="80" class="l"><a class="l" href="#80"> 80: </a><span class="php-comment"> * @var string
</span></span><span id="81" class="l"><a class="l" href="#81"> 81: </a><span class="php-comment"> */</span>
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$chemin" href="#$chemin">$chemin</a></span> = <span class="php-quote">''</span>;
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a>
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> <span class="php-comment">/**
</span></span><span id="85" class="l"><a class="l" href="#85"> 85: </a><span class="php-comment"> * @var string|bool
</span></span><span id="86" class="l"><a class="l" href="#86"> 86: </a><span class="php-comment"> */</span>
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$requete" href="#$requete">$requete</a></span> = <span class="php-keyword1">false</span>;
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a>
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a> <span class="php-comment">/**
</span></span><span id="90" class="l"><a class="l" href="#90"> 90: </a><span class="php-comment"> * @var string|bool
</span></span><span id="91" class="l"><a class="l" href="#91"> 91: </a><span class="php-comment"> */</span>
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$fragment" href="#$fragment">$fragment</a></span> = <span class="php-keyword1">false</span>;
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a>
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> <span class="php-comment">/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/</span>
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$parametres_obligatoires" href="#$parametres_obligatoires">$parametres_obligatoires</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'url_arg_separateur_entree'</span>, <span class="php-quote">'url_arg_separateur_sortie'</span>);
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a>
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> <span class="php-comment">/**
</span></span><span id="98" class="l"><a class="l" href="#98"> 98: </a><span class="php-comment"> * @param string $url une URL relative ou absolue
</span></span><span id="99" class="l"><a class="l" href="#99"> 99: </a><span class="php-comment"> * @param array $options
</span></span><span id="100" class="l"><a class="l" href="#100">100: </a><span class="php-comment"> */</span>
</span><span id="101" class="l"><a class="l" href="#101">101: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>(<span class="php-var">$url</span>, <span class="php-var">$options</span> = <span class="php-keyword1">null</span>) {
</span><span id="102" class="l"><a class="l" href="#102">102: </a> Config::verifierPresenceParametres(<span class="php-var">$this</span>-&gt;parametres_obligatoires);
</span><span id="103" class="l"><a class="l" href="#103">103: </a>
</span><span id="104" class="l"><a class="l" href="#104">104: </a> <span class="php-var">$this</span>-&gt;setOption(self::OPTION_SEPARATEUR_ENTREE, Config::get(<span class="php-quote">'url_arg_separateur_entree'</span>));
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-var">$this</span>-&gt;setOption(self::OPTION_SEPARATEUR_SORTIE, Config::get(<span class="php-quote">'url_arg_separateur_sortie'</span>));
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$options</span>)) {
</span><span id="107" class="l"><a class="l" href="#107">107: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$options</span> <span class="php-keyword1">as</span> <span class="php-var">$nomOption</span> =&gt; <span class="php-var">$valeur</span>) {
</span><span id="108" class="l"><a class="l" href="#108">108: </a> <span class="php-var">$this</span>-&gt;setOption(<span class="php-var">$nomOption</span>);
</span><span id="109" class="l"><a class="l" href="#109">109: </a> }
</span><span id="110" class="l"><a class="l" href="#110">110: </a> }
</span><span id="111" class="l"><a class="l" href="#111">111: </a>
</span><span id="112" class="l"><a class="l" href="#112">112: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">preg_match</span>(<span class="php-quote">'@^([a-z][a-z0-9.+-]*):@i'</span>, <span class="php-var">$url</span>, <span class="php-var">$reg</span>)) {
</span><span id="113" class="l"><a class="l" href="#113">113: </a> <span class="php-var">$this</span>-&gt;schema = <span class="php-var">$reg</span>[<span class="php-num">1</span>];
</span><span id="114" class="l"><a class="l" href="#114">114: </a> <span class="php-var">$url</span> = <span class="php-keyword2">substr</span>(<span class="php-var">$url</span>, <span class="php-keyword2">strlen</span>(<span class="php-var">$reg</span>[<span class="php-num">0</span>]));
</span><span id="115" class="l"><a class="l" href="#115">115: </a> }
</span><span id="116" class="l"><a class="l" href="#116">116: </a>
</span><span id="117" class="l"><a class="l" href="#117">117: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">preg_match</span>(<span class="php-quote">'@^//([^/#?]+)@'</span>, <span class="php-var">$url</span>, <span class="php-var">$reg</span>)) {
</span><span id="118" class="l"><a class="l" href="#118">118: </a> <span class="php-var">$this</span>-&gt;setAutorite(<span class="php-var">$reg</span>[<span class="php-num">1</span>]);
</span><span id="119" class="l"><a class="l" href="#119">119: </a> <span class="php-var">$url</span> = <span class="php-keyword2">substr</span>(<span class="php-var">$url</span>, <span class="php-keyword2">strlen</span>(<span class="php-var">$reg</span>[<span class="php-num">0</span>]));
</span><span id="120" class="l"><a class="l" href="#120">120: </a> }
</span><span id="121" class="l"><a class="l" href="#121">121: </a>
</span><span id="122" class="l"><a class="l" href="#122">122: </a> <span class="php-var">$i</span> = <span class="php-keyword2">strcspn</span>(<span class="php-var">$url</span>, <span class="php-quote">'?#'</span>);
</span><span id="123" class="l"><a class="l" href="#123">123: </a> <span class="php-var">$this</span>-&gt;chemin = <span class="php-keyword2">substr</span>(<span class="php-var">$url</span>, <span class="php-num">0</span>, <span class="php-var">$i</span>);
</span><span id="124" class="l"><a class="l" href="#124">124: </a> <span class="php-var">$url</span> = <span class="php-keyword2">substr</span>(<span class="php-var">$url</span>, <span class="php-var">$i</span>);
</span><span id="125" class="l"><a class="l" href="#125">125: </a>
</span><span id="126" class="l"><a class="l" href="#126">126: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">preg_match</span>(<span class="php-quote">'@^\?([^#]*)@'</span>, <span class="php-var">$url</span>, <span class="php-var">$reg</span>)) {
</span><span id="127" class="l"><a class="l" href="#127">127: </a> <span class="php-var">$this</span>-&gt;requete = <span class="php-var">$reg</span>[<span class="php-num">1</span>];
</span><span id="128" class="l"><a class="l" href="#128">128: </a> <span class="php-var">$url</span> = <span class="php-keyword2">substr</span>(<span class="php-var">$url</span>, <span class="php-keyword2">strlen</span>(<span class="php-var">$reg</span>[<span class="php-num">0</span>]));
</span><span id="129" class="l"><a class="l" href="#129">129: </a> }
</span><span id="130" class="l"><a class="l" href="#130">130: </a>
</span><span id="131" class="l"><a class="l" href="#131">131: </a> <span class="php-keyword1">if</span> (<span class="php-var">$url</span>) {
</span><span id="132" class="l"><a class="l" href="#132">132: </a> <span class="php-var">$this</span>-&gt;fragment = <span class="php-keyword2">substr</span>(<span class="php-var">$url</span>, <span class="php-num">1</span>);
</span><span id="133" class="l"><a class="l" href="#133">133: </a> }
</span><span id="134" class="l"><a class="l" href="#134">134: </a> }
</span><span id="135" class="l"><a class="l" href="#135">135: </a>
</span><span id="136" class="l"><a class="l" href="#136">136: </a> <span class="php-comment">/**
</span></span><span id="137" class="l"><a class="l" href="#137">137: </a><span class="php-comment"> * Renvoie la valeur de l'option specifiée.
</span></span><span id="138" class="l"><a class="l" href="#138">138: </a><span class="php-comment"> *
</span></span><span id="139" class="l"><a class="l" href="#139">139: </a><span class="php-comment"> * @param string $nomOption Nom de l'option demandée
</span></span><span id="140" class="l"><a class="l" href="#140">140: </a><span class="php-comment"> *
</span></span><span id="141" class="l"><a class="l" href="#141">141: </a><span class="php-comment"> * @return mixed
</span></span><span id="142" class="l"><a class="l" href="#142">142: </a><span class="php-comment"> */</span>
</span><span id="143" class="l"><a class="l" href="#143">143: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getOption" href="#_getOption">getOption</a>(<span class="php-var">$nomOption</span>) {
</span><span id="144" class="l"><a class="l" href="#144">144: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;options[<span class="php-var">$nomOption</span>]) ? <span class="php-var">$this</span>-&gt;options[<span class="php-var">$nomOption</span>] : <span class="php-keyword1">false</span>;
</span><span id="145" class="l"><a class="l" href="#145">145: </a> }
</span><span id="146" class="l"><a class="l" href="#146">146: </a>
</span><span id="147" class="l"><a class="l" href="#147">147: </a> <span class="php-comment">/**
</span></span><span id="148" class="l"><a class="l" href="#148">148: </a><span class="php-comment"> * Met à jour la valeur de l'option spécifiée.
</span></span><span id="149" class="l"><a class="l" href="#149">149: </a><span class="php-comment"> *
</span></span><span id="150" class="l"><a class="l" href="#150">150: </a><span class="php-comment"> * @param string $nomOption une des constantes commençant par self::OPTION_
</span></span><span id="151" class="l"><a class="l" href="#151">151: </a><span class="php-comment"> * @param mixed $valeur valeur de l'option
</span></span><span id="152" class="l"><a class="l" href="#152">152: </a><span class="php-comment"> *
</span></span><span id="153" class="l"><a class="l" href="#153">153: </a><span class="php-comment"> * @return void
</span></span><span id="154" class="l"><a class="l" href="#154">154: </a><span class="php-comment"> * @see self::OPTION_STRICTE
</span></span><span id="155" class="l"><a class="l" href="#155">155: </a><span class="php-comment"> * @see self::OPTION_UTILISER_CROCHETS
</span></span><span id="156" class="l"><a class="l" href="#156">156: </a><span class="php-comment"> * @see self::OPTION_ENCODER_CLES
</span></span><span id="157" class="l"><a class="l" href="#157">157: </a><span class="php-comment"> */</span>
</span><span id="158" class="l"><a class="l" href="#158">158: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_setOption" href="#_setOption">setOption</a>(<span class="php-var">$nomOption</span>, <span class="php-var">$valeur</span>) {
</span><span id="159" class="l"><a class="l" href="#159">159: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">array_key_exists</span>(<span class="php-var">$nomOption</span>, <span class="php-var">$this</span>-&gt;options)) {
</span><span id="160" class="l"><a class="l" href="#160">160: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="161" class="l"><a class="l" href="#161">161: </a> }
</span><span id="162" class="l"><a class="l" href="#162">162: </a> <span class="php-var">$this</span>-&gt;options[<span class="php-var">$nomOption</span>] = <span class="php-var">$valeur</span>;
</span><span id="163" class="l"><a class="l" href="#163">163: </a> }
</span><span id="164" class="l"><a class="l" href="#164">164: </a>
</span><span id="165" class="l"><a class="l" href="#165">165: </a> <span class="php-comment">/**
</span></span><span id="166" class="l"><a class="l" href="#166">166: </a><span class="php-comment"> * Renvoie la partie autorité, i.e. [ infoUtilisateur &quot;@&quot; ] hote [ &quot;:&quot; port ], ou
</span></span><span id="167" class="l"><a class="l" href="#167">167: </a><span class="php-comment"> * false si celle-ci est absente.
</span></span><span id="168" class="l"><a class="l" href="#168">168: </a><span class="php-comment"> *
</span></span><span id="169" class="l"><a class="l" href="#169">169: </a><span class="php-comment"> * @return string|bool
</span></span><span id="170" class="l"><a class="l" href="#170">170: </a><span class="php-comment"> */</span>
</span><span id="171" class="l"><a class="l" href="#171">171: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_getAutorite" href="#_getAutorite">getAutorite</a>() {
</span><span id="172" class="l"><a class="l" href="#172">172: </a> <span class="php-keyword1">if</span> (!<span class="php-var">$this</span>-&gt;hote) {
</span><span id="173" class="l"><a class="l" href="#173">173: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="174" class="l"><a class="l" href="#174">174: </a> }
</span><span id="175" class="l"><a class="l" href="#175">175: </a>
</span><span id="176" class="l"><a class="l" href="#176">176: </a> <span class="php-var">$autorite</span> = <span class="php-quote">''</span>;
</span><span id="177" class="l"><a class="l" href="#177">177: </a>
</span><span id="178" class="l"><a class="l" href="#178">178: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;infoUtilisateur !== <span class="php-keyword1">false</span>) {
</span><span id="179" class="l"><a class="l" href="#179">179: </a> <span class="php-var">$autorite</span> .= <span class="php-var">$this</span>-&gt;infoUtilisateur . <span class="php-quote">'@'</span>;
</span><span id="180" class="l"><a class="l" href="#180">180: </a> }
</span><span id="181" class="l"><a class="l" href="#181">181: </a>
</span><span id="182" class="l"><a class="l" href="#182">182: </a> <span class="php-var">$autorite</span> .= <span class="php-var">$this</span>-&gt;hote;
</span><span id="183" class="l"><a class="l" href="#183">183: </a>
</span><span id="184" class="l"><a class="l" href="#184">184: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;port !== <span class="php-keyword1">false</span>) {
</span><span id="185" class="l"><a class="l" href="#185">185: </a> <span class="php-var">$autorite</span> .= <span class="php-quote">':'</span> . <span class="php-var">$this</span>-&gt;port;
</span><span id="186" class="l"><a class="l" href="#186">186: </a> }
</span><span id="187" class="l"><a class="l" href="#187">187: </a>
</span><span id="188" class="l"><a class="l" href="#188">188: </a> <span class="php-keyword1">return</span> <span class="php-var">$autorite</span>;
</span><span id="189" class="l"><a class="l" href="#189">189: </a> }
</span><span id="190" class="l"><a class="l" href="#190">190: </a>
</span><span id="191" class="l"><a class="l" href="#191">191: </a> <span class="php-comment">/**
</span></span><span id="192" class="l"><a class="l" href="#192">192: </a><span class="php-comment"> * @param string|false $autorite
</span></span><span id="193" class="l"><a class="l" href="#193">193: </a><span class="php-comment"> *
</span></span><span id="194" class="l"><a class="l" href="#194">194: </a><span class="php-comment"> * @return void
</span></span><span id="195" class="l"><a class="l" href="#195">195: </a><span class="php-comment"> */</span>
</span><span id="196" class="l"><a class="l" href="#196">196: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_setAutorite" href="#_setAutorite">setAutorite</a>(<span class="php-var">$autorite</span>) {
</span><span id="197" class="l"><a class="l" href="#197">197: </a> <span class="php-var">$this</span>-&gt;user = <span class="php-keyword1">false</span>;
</span><span id="198" class="l"><a class="l" href="#198">198: </a> <span class="php-var">$this</span>-&gt;pass = <span class="php-keyword1">false</span>;
</span><span id="199" class="l"><a class="l" href="#199">199: </a> <span class="php-var">$this</span>-&gt;hote = <span class="php-keyword1">false</span>;
</span><span id="200" class="l"><a class="l" href="#200">200: </a> <span class="php-var">$this</span>-&gt;port = <span class="php-keyword1">false</span>;
</span><span id="201" class="l"><a class="l" href="#201">201: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">preg_match</span>(<span class="php-quote">'@^(([^\@]+)\@)?([^:]+)(:(\d*))?$@'</span>, <span class="php-var">$autorite</span>, <span class="php-var">$reg</span>)) {
</span><span id="202" class="l"><a class="l" href="#202">202: </a> <span class="php-keyword1">if</span> (<span class="php-var">$reg</span>[<span class="php-num">1</span>]) {
</span><span id="203" class="l"><a class="l" href="#203">203: </a> <span class="php-var">$this</span>-&gt;infoUtilisateur = <span class="php-var">$reg</span>[<span class="php-num">2</span>];
</span><span id="204" class="l"><a class="l" href="#204">204: </a> }
</span><span id="205" class="l"><a class="l" href="#205">205: </a>
</span><span id="206" class="l"><a class="l" href="#206">206: </a> <span class="php-var">$this</span>-&gt;hote = <span class="php-var">$reg</span>[<span class="php-num">3</span>];
</span><span id="207" class="l"><a class="l" href="#207">207: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$reg</span>[<span class="php-num">5</span>])) {
</span><span id="208" class="l"><a class="l" href="#208">208: </a> <span class="php-var">$this</span>-&gt;port = <span class="php-keyword2">intval</span>(<span class="php-var">$reg</span>[<span class="php-num">5</span>]);
</span><span id="209" class="l"><a class="l" href="#209">209: </a> }
</span><span id="210" class="l"><a class="l" href="#210">210: </a> }
</span><span id="211" class="l"><a class="l" href="#211">211: </a> }
</span><span id="212" class="l"><a class="l" href="#212">212: </a>
</span><span id="213" class="l"><a class="l" href="#213">213: </a> <span class="php-comment">/**
</span></span><span id="214" class="l"><a class="l" href="#214">214: </a><span class="php-comment"> * Renvoie vrai ou faux suivant que l'instance en cours représente une URL relative ou absolue.
</span></span><span id="215" class="l"><a class="l" href="#215">215: </a><span class="php-comment"> *
</span></span><span id="216" class="l"><a class="l" href="#216">216: </a><span class="php-comment"> * @return bool
</span></span><span id="217" class="l"><a class="l" href="#217">217: </a><span class="php-comment"> */</span>
</span><span id="218" class="l"><a class="l" href="#218">218: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_etreAbsolue" href="#_etreAbsolue">etreAbsolue</a>() {
</span><span id="219" class="l"><a class="l" href="#219">219: </a> <span class="php-keyword1">return</span> (bool) <span class="php-var">$this</span>-&gt;schema;
</span><span id="220" class="l"><a class="l" href="#220">220: </a> }
</span><span id="221" class="l"><a class="l" href="#221">221: </a>
</span><span id="222" class="l"><a class="l" href="#222">222: </a> <span class="php-comment">/**
</span></span><span id="223" class="l"><a class="l" href="#223">223: </a><span class="php-comment"> * La suppression des segments à points est décrite dans la RFC 3986, section 5.2.4, e.g.
</span></span><span id="224" class="l"><a class="l" href="#224">224: </a><span class="php-comment"> * &quot;/foo/../bar/baz&quot; =&gt; &quot;/bar/baz&quot;
</span></span><span id="225" class="l"><a class="l" href="#225">225: </a><span class="php-comment"> *
</span></span><span id="226" class="l"><a class="l" href="#226">226: </a><span class="php-comment"> * @param string $chemin un chemin
</span></span><span id="227" class="l"><a class="l" href="#227">227: </a><span class="php-comment"> *
</span></span><span id="228" class="l"><a class="l" href="#228">228: </a><span class="php-comment"> * @return string un chemin
</span></span><span id="229" class="l"><a class="l" href="#229">229: </a><span class="php-comment"> */</span>
</span><span id="230" class="l"><a class="l" href="#230">230: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_supprimerSegmentsAPoints" href="#_supprimerSegmentsAPoints">supprimerSegmentsAPoints</a>(<span class="php-var">$chemin</span>) {
</span><span id="231" class="l"><a class="l" href="#231">231: </a> <span class="php-var">$sortie</span> = <span class="php-quote">''</span>;
</span><span id="232" class="l"><a class="l" href="#232">232: </a>
</span><span id="233" class="l"><a class="l" href="#233">233: </a> <span class="php-comment">// Assurons nous de ne pas nous retrouver piégés dans une boucle infinie due à un bug de cette méthode</span>
</span><span id="234" class="l"><a class="l" href="#234">234: </a> <span class="php-var">$j</span> = <span class="php-num">0</span>;
</span><span id="235" class="l"><a class="l" href="#235">235: </a> <span class="php-keyword1">while</span> (<span class="php-var">$chemin</span> &amp;&amp; <span class="php-var">$j</span>++ &lt; <span class="php-num">100</span>) {
</span><span id="236" class="l"><a class="l" href="#236">236: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">substr</span>(<span class="php-var">$chemin</span>, <span class="php-num">0</span>, <span class="php-num">2</span>) == <span class="php-quote">'./'</span>) {<span class="php-comment">// Étape A</span>
</span><span id="237" class="l"><a class="l" href="#237">237: </a> <span class="php-var">$chemin</span> = <span class="php-keyword2">substr</span>(<span class="php-var">$chemin</span>, <span class="php-num">2</span>);
</span><span id="238" class="l"><a class="l" href="#238">238: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-keyword2">substr</span>(<span class="php-var">$chemin</span>, <span class="php-num">0</span>, <span class="php-num">3</span>) == <span class="php-quote">'../'</span>) {
</span><span id="239" class="l"><a class="l" href="#239">239: </a> <span class="php-var">$chemin</span> = <span class="php-keyword2">substr</span>(<span class="php-var">$chemin</span>, <span class="php-num">3</span>);
</span><span id="240" class="l"><a class="l" href="#240">240: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-keyword2">substr</span>(<span class="php-var">$chemin</span>, <span class="php-num">0</span>, <span class="php-num">3</span>) == <span class="php-quote">'/./'</span> || <span class="php-var">$chemin</span> == <span class="php-quote">'/.'</span>) {<span class="php-comment">// Étape B</span>
</span><span id="241" class="l"><a class="l" href="#241">241: </a> <span class="php-var">$chemin</span> = <span class="php-quote">'/'</span> . <span class="php-keyword2">substr</span>(<span class="php-var">$chemin</span>, <span class="php-num">3</span>);
</span><span id="242" class="l"><a class="l" href="#242">242: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-keyword2">substr</span>(<span class="php-var">$chemin</span>, <span class="php-num">0</span>, <span class="php-num">4</span>) == <span class="php-quote">'/../'</span> || <span class="php-var">$chemin</span> == <span class="php-quote">'/..'</span>) {<span class="php-comment">// Étape C</span>
</span><span id="243" class="l"><a class="l" href="#243">243: </a> <span class="php-var">$chemin</span> = <span class="php-quote">'/'</span> . <span class="php-keyword2">substr</span>(<span class="php-var">$chemin</span>, <span class="php-num">4</span>);
</span><span id="244" class="l"><a class="l" href="#244">244: </a> <span class="php-var">$i</span> = <span class="php-keyword2">strrpos</span>(<span class="php-var">$sortie</span>, <span class="php-quote">'/'</span>);
</span><span id="245" class="l"><a class="l" href="#245">245: </a> <span class="php-var">$sortie</span> = <span class="php-var">$i</span> === <span class="php-keyword1">false</span> ? <span class="php-quote">''</span> : <span class="php-keyword2">substr</span>(<span class="php-var">$sortie</span>, <span class="php-num">0</span>, <span class="php-var">$i</span>);
</span><span id="246" class="l"><a class="l" href="#246">246: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-var">$chemin</span> == <span class="php-quote">'.'</span> || <span class="php-var">$chemin</span> == <span class="php-quote">'..'</span>) {<span class="php-comment">// Étape D</span>
</span><span id="247" class="l"><a class="l" href="#247">247: </a> <span class="php-var">$chemin</span> = <span class="php-quote">''</span>;
</span><span id="248" class="l"><a class="l" href="#248">248: </a> } <span class="php-keyword1">else</span> {<span class="php-comment">// Étape E</span>
</span><span id="249" class="l"><a class="l" href="#249">249: </a> <span class="php-var">$i</span> = <span class="php-keyword2">strpos</span>(<span class="php-var">$chemin</span>, <span class="php-quote">'/'</span>);
</span><span id="250" class="l"><a class="l" href="#250">250: </a> <span class="php-keyword1">if</span> (<span class="php-var">$i</span> === <span class="php-num">0</span>) {
</span><span id="251" class="l"><a class="l" href="#251">251: </a> <span class="php-var">$i</span> = <span class="php-keyword2">strpos</span>(<span class="php-var">$chemin</span>, <span class="php-quote">'/'</span>, <span class="php-num">1</span>);
</span><span id="252" class="l"><a class="l" href="#252">252: </a> }
</span><span id="253" class="l"><a class="l" href="#253">253: </a> <span class="php-keyword1">if</span> (<span class="php-var">$i</span> === <span class="php-keyword1">false</span>) {
</span><span id="254" class="l"><a class="l" href="#254">254: </a> <span class="php-var">$i</span> = <span class="php-keyword2">strlen</span>(<span class="php-var">$chemin</span>);
</span><span id="255" class="l"><a class="l" href="#255">255: </a> }
</span><span id="256" class="l"><a class="l" href="#256">256: </a> <span class="php-var">$sortie</span> .= <span class="php-keyword2">substr</span>(<span class="php-var">$chemin</span>, <span class="php-num">0</span>, <span class="php-var">$i</span>);
</span><span id="257" class="l"><a class="l" href="#257">257: </a> <span class="php-var">$chemin</span> = <span class="php-keyword2">substr</span>(<span class="php-var">$chemin</span>, <span class="php-var">$i</span>);
</span><span id="258" class="l"><a class="l" href="#258">258: </a> }
</span><span id="259" class="l"><a class="l" href="#259">259: </a> }
</span><span id="260" class="l"><a class="l" href="#260">260: </a>
</span><span id="261" class="l"><a class="l" href="#261">261: </a> <span class="php-keyword1">return</span> <span class="php-var">$sortie</span>;
</span><span id="262" class="l"><a class="l" href="#262">262: </a> }
</span><span id="263" class="l"><a class="l" href="#263">263: </a>
</span><span id="264" class="l"><a class="l" href="#264">264: </a> <span class="php-comment">/**
</span></span><span id="265" class="l"><a class="l" href="#265">265: </a><span class="php-comment"> * (Re-)Création de la partie requête de l'URL à partir des données du tableau (passé en paramètre).
</span></span><span id="266" class="l"><a class="l" href="#266">266: </a><span class="php-comment"> *
</span></span><span id="267" class="l"><a class="l" href="#267">267: </a><span class="php-comment"> * @param array (nom =&gt; valeur) tableau de clés &amp; valeurs pour la partie requête de l'url.
</span></span><span id="268" class="l"><a class="l" href="#268">268: </a><span class="php-comment"> * @return void (Re-)Création de la partie requête.
</span></span><span id="269" class="l"><a class="l" href="#269">269: </a><span class="php-comment"> */</span>
</span><span id="270" class="l"><a class="l" href="#270">270: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_setRequete" href="#_setRequete">setRequete</a>(<span class="php-keyword1">Array</span> <span class="php-var">$parametres</span>) {
</span><span id="271" class="l"><a class="l" href="#271">271: </a> <span class="php-keyword1">if</span> (!<span class="php-var">$parametres</span>) {
</span><span id="272" class="l"><a class="l" href="#272">272: </a> <span class="php-var">$this</span>-&gt;requete = <span class="php-keyword1">false</span>;
</span><span id="273" class="l"><a class="l" href="#273">273: </a> } <span class="php-keyword1">else</span> {
</span><span id="274" class="l"><a class="l" href="#274">274: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$parametres</span> <span class="php-keyword1">as</span> <span class="php-var">$nom</span> =&gt; <span class="php-var">$valeur</span>) {
</span><span id="275" class="l"><a class="l" href="#275">275: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;getOption(self::OPTION_ENCODER_CLES)) {
</span><span id="276" class="l"><a class="l" href="#276">276: </a> <span class="php-var">$nom</span> = <span class="php-keyword2">rawurlencode</span>(<span class="php-var">$nom</span>);
</span><span id="277" class="l"><a class="l" href="#277">277: </a> }
</span><span id="278" class="l"><a class="l" href="#278">278: </a>
</span><span id="279" class="l"><a class="l" href="#279">279: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;getOption(self::OPTION_ENCODER_VALEURS)) {
</span><span id="280" class="l"><a class="l" href="#280">280: </a> <span class="php-var">$valeur</span> = <span class="php-keyword2">rawurlencode</span>(<span class="php-var">$valeur</span>);
</span><span id="281" class="l"><a class="l" href="#281">281: </a> }
</span><span id="282" class="l"><a class="l" href="#282">282: </a>
</span><span id="283" class="l"><a class="l" href="#283">283: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$valeur</span>)) {
</span><span id="284" class="l"><a class="l" href="#284">284: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$valeur</span> <span class="php-keyword1">as</span> <span class="php-var">$k</span> =&gt; <span class="php-var">$v</span>) {
</span><span id="285" class="l"><a class="l" href="#285">285: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;getOption(self::OPTION_UTILISER_CROCHETS)) {
</span><span id="286" class="l"><a class="l" href="#286">286: </a> <span class="php-var">$parties</span>[] = <span class="php-keyword2">sprintf</span>(<span class="php-quote">'%s[%s]=%s'</span>, <span class="php-var">$nom</span>, <span class="php-var">$k</span>, <span class="php-var">$v</span>);
</span><span id="287" class="l"><a class="l" href="#287">287: </a> } <span class="php-keyword1">else</span> {
</span><span id="288" class="l"><a class="l" href="#288">288: </a> <span class="php-var">$parties</span>[] = <span class="php-var">$nom</span>.<span class="php-quote">'='</span>.<span class="php-var">$v</span>;
</span><span id="289" class="l"><a class="l" href="#289">289: </a> }
</span><span id="290" class="l"><a class="l" href="#290">290: </a> }
</span><span id="291" class="l"><a class="l" href="#291">291: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_null</span>(<span class="php-var">$valeur</span>)) {
</span><span id="292" class="l"><a class="l" href="#292">292: </a> <span class="php-var">$parties</span>[] = <span class="php-var">$nom</span> . <span class="php-quote">'='</span> . <span class="php-var">$valeur</span>;
</span><span id="293" class="l"><a class="l" href="#293">293: </a> } <span class="php-keyword1">else</span> {
</span><span id="294" class="l"><a class="l" href="#294">294: </a> <span class="php-var">$parties</span>[] = <span class="php-var">$nom</span>;
</span><span id="295" class="l"><a class="l" href="#295">295: </a> }
</span><span id="296" class="l"><a class="l" href="#296">296: </a> }
</span><span id="297" class="l"><a class="l" href="#297">297: </a> <span class="php-var">$this</span>-&gt;requete = <span class="php-keyword2">implode</span>(<span class="php-var">$this</span>-&gt;getOption(self::OPTION_SEPARATEUR_SORTIE), <span class="php-var">$parties</span>);
</span><span id="298" class="l"><a class="l" href="#298">298: </a> }
</span><span id="299" class="l"><a class="l" href="#299">299: </a> }
</span><span id="300" class="l"><a class="l" href="#300">300: </a>
</span><span id="301" class="l"><a class="l" href="#301">301: </a> <span class="php-comment">/**
</span></span><span id="302" class="l"><a class="l" href="#302">302: </a><span class="php-comment"> * (Re-)Création de la partie requête de l'URL à partir de la fusion du tableau (passé en paramètre) et
</span></span><span id="303" class="l"><a class="l" href="#303">303: </a><span class="php-comment"> * les valeurs présentes dans $_GET.
</span></span><span id="304" class="l"><a class="l" href="#304">304: </a><span class="php-comment"> *
</span></span><span id="305" class="l"><a class="l" href="#305">305: </a><span class="php-comment"> * @param array (nom =&gt; valeur) tableau de clés &amp; valeurs pour la partie requête de l'url.
</span></span><span id="306" class="l"><a class="l" href="#306">306: </a><span class="php-comment"> * @return void (Re-)Création de la partie requête.
</span></span><span id="307" class="l"><a class="l" href="#307">307: </a><span class="php-comment"> */</span>
</span><span id="308" class="l"><a class="l" href="#308">308: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_fusionnerRequete" href="#_fusionnerRequete">fusionnerRequete</a>(<span class="php-keyword1">Array</span> <span class="php-var">$parametres</span>) {
</span><span id="309" class="l"><a class="l" href="#309">309: </a> <span class="php-keyword1">if</span> (<span class="php-var">$parametres</span>) {
</span><span id="310" class="l"><a class="l" href="#310">310: </a> <span class="php-var">$requete</span> = <span class="php-var">$parametres</span> + <span class="php-var">$_GET</span>;
</span><span id="311" class="l"><a class="l" href="#311">311: </a> <span class="php-var">$this</span>-&gt;setRequete(<span class="php-var">$requete</span>);
</span><span id="312" class="l"><a class="l" href="#312">312: </a> }
</span><span id="313" class="l"><a class="l" href="#313">313: </a> }
</span><span id="314" class="l"><a class="l" href="#314">314: </a>
</span><span id="315" class="l"><a class="l" href="#315">315: </a> <span class="php-comment">/**
</span></span><span id="316" class="l"><a class="l" href="#316">316: </a><span class="php-comment"> * Normalise les données de l'instance d'Url faisant appel à cette méthode.
</span></span><span id="317" class="l"><a class="l" href="#317">317: </a><span class="php-comment"> *
</span></span><span id="318" class="l"><a class="l" href="#318">318: </a><span class="php-comment"> * @return void l'instance d'Url courrante est normalisée.
</span></span><span id="319" class="l"><a class="l" href="#319">319: </a><span class="php-comment"> */</span>
</span><span id="320" class="l"><a class="l" href="#320">320: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_normaliser" href="#_normaliser">normaliser</a>() {
</span><span id="321" class="l"><a class="l" href="#321">321: </a> <span class="php-comment">// Voir RFC 3886, section 6</span>
</span><span id="322" class="l"><a class="l" href="#322">322: </a>
</span><span id="323" class="l"><a class="l" href="#323">323: </a> <span class="php-comment">// les cchémas sont insesibles à la casse</span>
</span><span id="324" class="l"><a class="l" href="#324">324: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;schema) {
</span><span id="325" class="l"><a class="l" href="#325">325: </a> <span class="php-var">$this</span>-&gt;schema = <span class="php-keyword2">strtolower</span>(<span class="php-var">$this</span>-&gt;schema);
</span><span id="326" class="l"><a class="l" href="#326">326: </a> }
</span><span id="327" class="l"><a class="l" href="#327">327: </a>
</span><span id="328" class="l"><a class="l" href="#328">328: </a> <span class="php-comment">// les noms d'hotes sont insensibles à la casse</span>
</span><span id="329" class="l"><a class="l" href="#329">329: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;hote) {
</span><span id="330" class="l"><a class="l" href="#330">330: </a> <span class="php-var">$this</span>-&gt;hote = <span class="php-keyword2">strtolower</span>(<span class="php-var">$this</span>-&gt;hote);
</span><span id="331" class="l"><a class="l" href="#331">331: </a> }
</span><span id="332" class="l"><a class="l" href="#332">332: </a>
</span><span id="333" class="l"><a class="l" href="#333">333: </a> <span class="php-comment">// Supprimer le numéro de port par défaut pour les schemas connus (RFC 3986, section 6.2.3)</span>
</span><span id="334" class="l"><a class="l" href="#334">334: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;port &amp;&amp; <span class="php-var">$this</span>-&gt;schema &amp;&amp; <span class="php-var">$this</span>-&gt;port == <span class="php-keyword2">getservbyname</span>(<span class="php-var">$this</span>-&gt;schema, <span class="php-quote">'tcp'</span>)) {
</span><span id="335" class="l"><a class="l" href="#335">335: </a> <span class="php-var">$this</span>-&gt;port = <span class="php-keyword1">false</span>;
</span><span id="336" class="l"><a class="l" href="#336">336: </a> }
</span><span id="337" class="l"><a class="l" href="#337">337: </a>
</span><span id="338" class="l"><a class="l" href="#338">338: </a> <span class="php-comment">// normalisation dans le cas d'un encodage avec %XX pourcentage (RFC 3986, section 6.2.2.1)</span>
</span><span id="339" class="l"><a class="l" href="#339">339: </a> <span class="php-keyword1">foreach</span> (<span class="php-keyword1">array</span>(<span class="php-quote">'infoUtilisateur'</span>, <span class="php-quote">'hote'</span>, <span class="php-quote">'chemin'</span>) <span class="php-keyword1">as</span> <span class="php-var">$partie</span>) {
</span><span id="340" class="l"><a class="l" href="#340">340: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;<span class="php-var">$partie</span>) {
</span><span id="341" class="l"><a class="l" href="#341">341: </a> <span class="php-var">$this</span>-&gt;<span class="php-var">$partie</span> = <span class="php-keyword2">preg_replace</span>(<span class="php-quote">'/%[0-9a-f]{2}/ie'</span>, <span class="php-quote">'strtoupper(&quot;\0&quot;)'</span>, <span class="php-var">$this</span>-&gt;<span class="php-var">$partie</span>);
</span><span id="342" class="l"><a class="l" href="#342">342: </a> }
</span><span id="343" class="l"><a class="l" href="#343">343: </a> }
</span><span id="344" class="l"><a class="l" href="#344">344: </a>
</span><span id="345" class="l"><a class="l" href="#345">345: </a> <span class="php-comment">// normalisation des segments du chemin (RFC 3986, section 6.2.2.3)</span>
</span><span id="346" class="l"><a class="l" href="#346">346: </a> <span class="php-var">$this</span>-&gt;chemin = self::supprimerSegmentsAPoints(<span class="php-var">$this</span>-&gt;chemin);
</span><span id="347" class="l"><a class="l" href="#347">347: </a>
</span><span id="348" class="l"><a class="l" href="#348">348: </a> <span class="php-comment">// normalisation basée sur le schéma (RFC 3986, section 6.2.3)</span>
</span><span id="349" class="l"><a class="l" href="#349">349: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;hote &amp;&amp; !<span class="php-var">$this</span>-&gt;chemin) {
</span><span id="350" class="l"><a class="l" href="#350">350: </a> <span class="php-var">$this</span>-&gt;chemin = <span class="php-quote">'/'</span>;
</span><span id="351" class="l"><a class="l" href="#351">351: </a> }
</span><span id="352" class="l"><a class="l" href="#352">352: </a> }
</span><span id="353" class="l"><a class="l" href="#353">353: </a>
</span><span id="354" class="l"><a class="l" href="#354">354: </a> <span class="php-comment">/**
</span></span><span id="355" class="l"><a class="l" href="#355">355: </a><span class="php-comment"> * Renvoie une instance d'objet Url representant l'URL canonique du script PHP en cours d'éxécution.
</span></span><span id="356" class="l"><a class="l" href="#356">356: </a><span class="php-comment"> *
</span></span><span id="357" class="l"><a class="l" href="#357">357: </a><span class="php-comment"> * @return Url retourne un objet Url ou null en cas d'erreur.
</span></span><span id="358" class="l"><a class="l" href="#358">358: </a><span class="php-comment"> */</span>
</span><span id="359" class="l"><a class="l" href="#359">359: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getCanonique" href="#_getCanonique">getCanonique</a>() {
</span><span id="360" class="l"><a class="l" href="#360">360: </a> <span class="php-var">$url</span> = <span class="php-keyword1">null</span>;
</span><span id="361" class="l"><a class="l" href="#361">361: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword1">isset</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'REQUEST_METHOD'</span>])) {
</span><span id="362" class="l"><a class="l" href="#362">362: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Le script n'a pas été appellé à travers un serveur web&quot;</span>, E_USER_WARNING);
</span><span id="363" class="l"><a class="l" href="#363">363: </a> } <span class="php-keyword1">else</span> {
</span><span id="364" class="l"><a class="l" href="#364">364: </a> <span class="php-comment">// À partir d'une URL relative</span>
</span><span id="365" class="l"><a class="l" href="#365">365: </a> <span class="php-var">$url</span> = <span class="php-keyword1">new</span> self(<span class="php-var">$_SERVER</span>[<span class="php-quote">'PHP_SELF'</span>]);
</span><span id="366" class="l"><a class="l" href="#366">366: </a> <span class="php-var">$url</span>-&gt;schema = <span class="php-keyword1">isset</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'HTTPS'</span>]) ? <span class="php-quote">'https'</span> : <span class="php-quote">'http'</span>;
</span><span id="367" class="l"><a class="l" href="#367">367: </a> <span class="php-var">$url</span>-&gt;hote = <span class="php-var">$_SERVER</span>[<span class="php-quote">'SERVER_NAME'</span>];
</span><span id="368" class="l"><a class="l" href="#368">368: </a> <span class="php-var">$port</span> = <span class="php-keyword2">intval</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'SERVER_PORT'</span>]);
</span><span id="369" class="l"><a class="l" href="#369">369: </a> <span class="php-keyword1">if</span> (<span class="php-var">$url</span>-&gt;schema == <span class="php-quote">'http'</span> &amp;&amp; <span class="php-var">$port</span> != <span class="php-num">80</span> || <span class="php-var">$url</span>-&gt;schema == <span class="php-quote">'https'</span> &amp;&amp; <span class="php-var">$port</span> != <span class="php-num">443</span>) {
</span><span id="370" class="l"><a class="l" href="#370">370: </a> <span class="php-var">$url</span>-&gt;port = <span class="php-var">$port</span>;
</span><span id="371" class="l"><a class="l" href="#371">371: </a> }
</span><span id="372" class="l"><a class="l" href="#372">372: </a> }
</span><span id="373" class="l"><a class="l" href="#373">373: </a> <span class="php-keyword1">return</span> <span class="php-var">$url</span>;
</span><span id="374" class="l"><a class="l" href="#374">374: </a> }
</span><span id="375" class="l"><a class="l" href="#375">375: </a>
</span><span id="376" class="l"><a class="l" href="#376">376: </a> <span class="php-comment">/**
</span></span><span id="377" class="l"><a class="l" href="#377">377: </a><span class="php-comment"> * Renvoie une instance d'objet Url representant l'URL utilisée pour récupérer la requête en cours.
</span></span><span id="378" class="l"><a class="l" href="#378">378: </a><span class="php-comment"> *
</span></span><span id="379" class="l"><a class="l" href="#379">379: </a><span class="php-comment"> * @return Url retourne un objet Url ou null en cas d'erreur.
</span></span><span id="380" class="l"><a class="l" href="#380">380: </a><span class="php-comment"> */</span>
</span><span id="381" class="l"><a class="l" href="#381">381: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getDemande" href="#_getDemande">getDemande</a>() {
</span><span id="382" class="l"><a class="l" href="#382">382: </a> <span class="php-var">$url</span> = <span class="php-keyword1">null</span>;
</span><span id="383" class="l"><a class="l" href="#383">383: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword1">isset</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'REQUEST_METHOD'</span>])) {
</span><span id="384" class="l"><a class="l" href="#384">384: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Le script n'a pas été appellé à travers un serveur web&quot;</span>, E_USER_WARNING);
</span><span id="385" class="l"><a class="l" href="#385">385: </a> } <span class="php-keyword1">else</span> {
</span><span id="386" class="l"><a class="l" href="#386">386: </a> <span class="php-comment">// On part d'une URL relative</span>
</span><span id="387" class="l"><a class="l" href="#387">387: </a> <span class="php-var">$url</span> = <span class="php-keyword1">new</span> self(<span class="php-var">$_SERVER</span>[<span class="php-quote">'REQUEST_URI'</span>]);
</span><span id="388" class="l"><a class="l" href="#388">388: </a> <span class="php-var">$url</span>-&gt;schema = <span class="php-keyword1">isset</span>(<span class="php-var">$_SERVER</span>[<span class="php-quote">'HTTPS'</span>]) ? <span class="php-quote">'https'</span> : <span class="php-quote">'http'</span>;
</span><span id="389" class="l"><a class="l" href="#389">389: </a> <span class="php-comment">// On met à jour les valeurs de l'hôte et si possible du port</span>
</span><span id="390" class="l"><a class="l" href="#390">390: </a> <span class="php-var">$url</span>-&gt;setAutorite(<span class="php-var">$_SERVER</span>[<span class="php-quote">'HTTP_hote'</span>]);
</span><span id="391" class="l"><a class="l" href="#391">391: </a> }
</span><span id="392" class="l"><a class="l" href="#392">392: </a> <span class="php-keyword1">return</span> <span class="php-var">$url</span>;
</span><span id="393" class="l"><a class="l" href="#393">393: </a> }
</span><span id="394" class="l"><a class="l" href="#394">394: </a>
</span><span id="395" class="l"><a class="l" href="#395">395: </a>
</span><span id="396" class="l"><a class="l" href="#396">396: </a> <span class="php-comment">/**
</span></span><span id="397" class="l"><a class="l" href="#397">397: </a><span class="php-comment"> * Renvoie un représentation sous forme de chaine de l'URL.
</span></span><span id="398" class="l"><a class="l" href="#398">398: </a><span class="php-comment"> *
</span></span><span id="399" class="l"><a class="l" href="#399">399: </a><span class="php-comment"> * @return string l'url
</span></span><span id="400" class="l"><a class="l" href="#400">400: </a><span class="php-comment"> */</span>
</span><span id="401" class="l"><a class="l" href="#401">401: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_getURL" href="#_getURL">getURL</a>() {
</span><span id="402" class="l"><a class="l" href="#402">402: </a> <span class="php-comment">// Voir RFC 3986, section 5.3</span>
</span><span id="403" class="l"><a class="l" href="#403">403: </a> <span class="php-var">$url</span> = <span class="php-quote">''</span>;
</span><span id="404" class="l"><a class="l" href="#404">404: </a>
</span><span id="405" class="l"><a class="l" href="#405">405: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;schema !== <span class="php-keyword1">false</span>) {
</span><span id="406" class="l"><a class="l" href="#406">406: </a> <span class="php-var">$url</span> .= <span class="php-var">$this</span>-&gt;schema . <span class="php-quote">':'</span>;
</span><span id="407" class="l"><a class="l" href="#407">407: </a> }
</span><span id="408" class="l"><a class="l" href="#408">408: </a>
</span><span id="409" class="l"><a class="l" href="#409">409: </a> <span class="php-var">$autorite</span> = <span class="php-var">$this</span>-&gt;getAutorite();
</span><span id="410" class="l"><a class="l" href="#410">410: </a> <span class="php-keyword1">if</span> (<span class="php-var">$autorite</span> !== <span class="php-keyword1">false</span>) {
</span><span id="411" class="l"><a class="l" href="#411">411: </a> <span class="php-var">$url</span> .= <span class="php-quote">'//'</span> . <span class="php-var">$autorite</span>;
</span><span id="412" class="l"><a class="l" href="#412">412: </a> }
</span><span id="413" class="l"><a class="l" href="#413">413: </a> <span class="php-var">$url</span> .= <span class="php-var">$this</span>-&gt;chemin;
</span><span id="414" class="l"><a class="l" href="#414">414: </a>
</span><span id="415" class="l"><a class="l" href="#415">415: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;requete !== <span class="php-keyword1">false</span>) {
</span><span id="416" class="l"><a class="l" href="#416">416: </a> <span class="php-var">$url</span> .= <span class="php-quote">'?'</span> . <span class="php-var">$this</span>-&gt;requete;
</span><span id="417" class="l"><a class="l" href="#417">417: </a> }
</span><span id="418" class="l"><a class="l" href="#418">418: </a>
</span><span id="419" class="l"><a class="l" href="#419">419: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;fragment !== <span class="php-keyword1">false</span>) {
</span><span id="420" class="l"><a class="l" href="#420">420: </a> <span class="php-var">$url</span> .= <span class="php-quote">'#'</span> . <span class="php-var">$this</span>-&gt;fragment;
</span><span id="421" class="l"><a class="l" href="#421">421: </a> }
</span><span id="422" class="l"><a class="l" href="#422">422: </a>
</span><span id="423" class="l"><a class="l" href="#423">423: </a> <span class="php-keyword1">return</span> <span class="php-var">$url</span>;
</span><span id="424" class="l"><a class="l" href="#424">424: </a> }
</span><span id="425" class="l"><a class="l" href="#425">425: </a>}
</span><span id="426" class="l"><a class="l" href="#426">426: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Script.html
New file
0,0 → 1,405
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Script.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li class="active"><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Script.html" title="Summary of Script"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Script est une classe abstraite qui doit être implémenté par les classes éxecutant des scripts en ligne de commande.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> *
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * @package Framework
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @author Delphine CAUQUIL &lt;delphine@tela-botanica.org&gt;
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @since 0.3
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @version $Id: Script.php 299 2011-01-18 14:03:46Z jpm $
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> */</span>
</span><span id="17" class="l"><a class="l" href="#17"> 17: </a>
</span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-keyword1">abstract</span> <span class="php-keyword1">class</span> <a id="Script" href="#Script">Script</a> {
</span><span id="19" class="l"><a class="l" href="#19"> 19: </a> <span class="php-comment">/** Niveau de message de type LOG */</span>
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a> <span class="php-keyword1">const</span> <a id="MSG_LOG" href="#MSG_LOG">MSG_LOG</a> = <span class="php-num">0</span>;
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a> <span class="php-comment">/** Niveau de message de type ERREUR */</span>
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a> <span class="php-keyword1">const</span> <a id="MSG_ERREUR" href="#MSG_ERREUR">MSG_ERREUR</a> = <span class="php-num">1</span>;
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> <span class="php-comment">/** Niveau de message de type AVERTISSEMENT */</span>
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a> <span class="php-keyword1">const</span> <a id="MSG_AVERTISSEMENT" href="#MSG_AVERTISSEMENT">MSG_AVERTISSEMENT</a> = <span class="php-num">2</span>;
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a> <span class="php-comment">/** Niveau de message de type INFORMATION */</span>
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-keyword1">const</span> <a id="MSG_INFO" href="#MSG_INFO">MSG_INFO</a> = <span class="php-num">3</span>;
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a>
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-comment">/** Inititulé des différents types de message. */</span>
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$msg_niveaux_txt" href="#$msg_niveaux_txt">$msg_niveaux_txt</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'LOG'</span>, <span class="php-quote">'ERREUR'</span>,<span class="php-quote">'AVERTISSEMENT'</span>, <span class="php-quote">'INFO'</span>);
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a>
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> <span class="php-comment">/**
</span></span><span id="32" class="l"><a class="l" href="#32"> 32: </a><span class="php-comment"> * Le nom du script tel que passé dans la ligne de commande.
</span></span><span id="33" class="l"><a class="l" href="#33"> 33: </a><span class="php-comment"> * @var string
</span></span><span id="34" class="l"><a class="l" href="#34"> 34: </a><span class="php-comment"> */</span>
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$script_nom" href="#$script_nom">$script_nom</a></span> = <span class="php-keyword1">null</span>;
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a>
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> <span class="php-comment">/**
</span></span><span id="38" class="l"><a class="l" href="#38"> 38: </a><span class="php-comment"> * Paramêtres par défaut disponibles pour la ligne de commande
</span></span><span id="39" class="l"><a class="l" href="#39"> 39: </a><span class="php-comment"> * le tableau se construit de la forme suivante :
</span></span><span id="40" class="l"><a class="l" href="#40"> 40: </a><span class="php-comment"> * - clé = nom du paramêtre '-foo'
</span></span><span id="41" class="l"><a class="l" href="#41"> 41: </a><span class="php-comment"> * - value = contient un nouveau tableau composé de cette façon :
</span></span><span id="42" class="l"><a class="l" href="#42"> 42: </a><span class="php-comment"> * - booléen: true si le paramêtre est obligatoire
</span></span><span id="43" class="l"><a class="l" href="#43"> 43: </a><span class="php-comment"> * - booléen ou var : true si le paramêtre nécessite un valeur à sa suite ou la valeur par défaut
</span></span><span id="44" class="l"><a class="l" href="#44"> 44: </a><span class="php-comment"> * - string: description du contenu du paramêtre
</span></span><span id="45" class="l"><a class="l" href="#45"> 45: </a><span class="php-comment"> * Les paramêtres optionels devraient être déclaré à la fin du tableau.
</span></span><span id="46" class="l"><a class="l" href="#46"> 46: </a><span class="php-comment"> * Le dernier parametre du tableau peut avoir la valeur '...',
</span></span><span id="47" class="l"><a class="l" href="#47"> 47: </a><span class="php-comment"> * il contiendra alors l'ensemble des paramêtres suivant trouvés sur la ligne de commande.
</span></span><span id="48" class="l"><a class="l" href="#48"> 48: </a><span class="php-comment"> * @var array
</span></span><span id="49" class="l"><a class="l" href="#49"> 49: </a><span class="php-comment"> */</span>
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$parametres_autorises_defaut" href="#$parametres_autorises_defaut">$parametres_autorises_defaut</a></span> = <span class="php-keyword1">array</span>(
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a> <span class="php-quote">'-a'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-keyword1">true</span>, <span class="php-keyword1">true</span>, <span class="php-quote">'Action à réaliser'</span>),
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> <span class="php-quote">'-v'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-keyword1">false</span>, <span class="php-quote">'1'</span>, <span class="php-quote">'Mode verbeux : 1 ou 2'</span>));
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a>
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> <span class="php-comment">/**
</span></span><span id="55" class="l"><a class="l" href="#55"> 55: </a><span class="php-comment"> * Paramêtres autorisés par le script.
</span></span><span id="56" class="l"><a class="l" href="#56"> 56: </a><span class="php-comment"> * le tableau est de la forme suivante :
</span></span><span id="57" class="l"><a class="l" href="#57"> 57: </a><span class="php-comment"> * - clé = nom du paramêtre '-foo'
</span></span><span id="58" class="l"><a class="l" href="#58"> 58: </a><span class="php-comment"> * - value = contient un nouveau tableau composé de cette façon :
</span></span><span id="59" class="l"><a class="l" href="#59"> 59: </a><span class="php-comment"> * - booléen: true si le paramêtre est obligatoire
</span></span><span id="60" class="l"><a class="l" href="#60"> 60: </a><span class="php-comment"> * - booléen ou var : true si le paramêtre nécessite un valeur à sa suite ou la valeur par défaut
</span></span><span id="61" class="l"><a class="l" href="#61"> 61: </a><span class="php-comment"> * - string: description du contenu du paramêtre
</span></span><span id="62" class="l"><a class="l" href="#62"> 62: </a><span class="php-comment"> * Les paramêtres optionels devraient être déclaré à la fin du tableau.
</span></span><span id="63" class="l"><a class="l" href="#63"> 63: </a><span class="php-comment"> * Le dernier parametre du tableau peut avoir la valeur '...',
</span></span><span id="64" class="l"><a class="l" href="#64"> 64: </a><span class="php-comment"> * il contiendra alors l'ensemble des paramêtres suivant trouvés sur la ligne de commande.
</span></span><span id="65" class="l"><a class="l" href="#65"> 65: </a><span class="php-comment"> * @var array
</span></span><span id="66" class="l"><a class="l" href="#66"> 66: </a><span class="php-comment"> */</span>
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$parametres_autorises" href="#$parametres_autorises">$parametres_autorises</a></span> = <span class="php-keyword1">null</span>;
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a>
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> <span class="php-comment">/**
</span></span><span id="70" class="l"><a class="l" href="#70"> 70: </a><span class="php-comment"> * Contient les valeurs des paramêtres récupérés de la ligne de commande :
</span></span><span id="71" class="l"><a class="l" href="#71"> 71: </a><span class="php-comment"> * le tableau se construit de la forme suivnate :
</span></span><span id="72" class="l"><a class="l" href="#72"> 72: </a><span class="php-comment"> * - clé = nom du paramêtre '-foo'
</span></span><span id="73" class="l"><a class="l" href="#73"> 73: </a><span class="php-comment"> * - valeur = la valeur récupérée sur la ligne de commande
</span></span><span id="74" class="l"><a class="l" href="#74"> 74: </a><span class="php-comment"> * @var array
</span></span><span id="75" class="l"><a class="l" href="#75"> 75: </a><span class="php-comment"> */</span>
</span><span id="76" class="l"><a class="l" href="#76"> 76: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$parametres_cli" href="#$parametres_cli">$parametres_cli</a></span> = <span class="php-keyword1">null</span>;
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a>
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> <span class="php-comment">/**
</span></span><span id="79" class="l"><a class="l" href="#79"> 79: </a><span class="php-comment"> * Contient le tableau des paramètres disponible après vérification :
</span></span><span id="80" class="l"><a class="l" href="#80"> 80: </a><span class="php-comment"> * le tableau est de la forme suivante :
</span></span><span id="81" class="l"><a class="l" href="#81"> 81: </a><span class="php-comment"> * - clé = nom du paramêtre '-foo'
</span></span><span id="82" class="l"><a class="l" href="#82"> 82: </a><span class="php-comment"> * - valeur = la valeur récupérée sur la ligne de commande
</span></span><span id="83" class="l"><a class="l" href="#83"> 83: </a><span class="php-comment"> * @var array
</span></span><span id="84" class="l"><a class="l" href="#84"> 84: </a><span class="php-comment"> */</span>
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$parametres" href="#$parametres">$parametres</a></span> = <span class="php-keyword1">null</span>;
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a>
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-comment">/** Tableau associatif permettant de stocker l'avancement dans une boucle.
</span></span><span id="88" class="l"><a class="l" href="#88"> 88: </a><span class="php-comment"> * La clé est un md5 du message à afficher au démarrage de la boucle.
</span></span><span id="89" class="l"><a class="l" href="#89"> 89: </a><span class="php-comment"> * @var array
</span></span><span id="90" class="l"><a class="l" href="#90"> 90: </a><span class="php-comment"> */</span>
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$avancement" href="#$avancement">$avancement</a></span> = <span class="php-keyword1">array</span>();
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a>
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-comment">/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/</span>
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$parametres_obligatoires" href="#$parametres_obligatoires">$parametres_obligatoires</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'chemin_modules'</span>, <span class="php-quote">'log_script'</span>);
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a>
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>(<span class="php-var">$script_nom</span>, <span class="php-var">$parametres_cli</span>) {
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> <span class="php-var">$this</span>-&gt;script_nom = <span class="php-var">$script_nom</span>;
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-var">$this</span>-&gt;parametres_cli = <span class="php-var">$parametres_cli</span>;
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a>
</span><span id="100" class="l"><a class="l" href="#100">100: </a> Config::verifierPresenceParametres(self::<span class="php-var">$parametres_obligatoires</span>);
</span><span id="101" class="l"><a class="l" href="#101">101: </a>
</span><span id="102" class="l"><a class="l" href="#102">102: </a> <span class="php-var">$fichier_ini_script</span> = <span class="php-var">$this</span>-&gt;getScriptChemin().<span class="php-quote">'config.ini'</span>;
</span><span id="103" class="l"><a class="l" href="#103">103: </a> Config::charger(<span class="php-var">$fichier_ini_script</span>);
</span><span id="104" class="l"><a class="l" href="#104">104: </a>
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-var">$this</span>-&gt;chargerParametresAutorises();
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-var">$this</span>-&gt;chargerParametres();
</span><span id="107" class="l"><a class="l" href="#107">107: </a> }
</span><span id="108" class="l"><a class="l" href="#108">108: </a>
</span><span id="109" class="l"><a class="l" href="#109">109: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getMsgNiveauTxt" href="#_getMsgNiveauTxt">getMsgNiveauTxt</a>(<span class="php-var">$niveau</span>) {
</span><span id="110" class="l"><a class="l" href="#110">110: </a> <span class="php-keyword1">return</span> self::<span class="php-var">$msg_niveaux_txt</span>[<span class="php-var">$niveau</span>];
</span><span id="111" class="l"><a class="l" href="#111">111: </a> }
</span><span id="112" class="l"><a class="l" href="#112">112: </a>
</span><span id="113" class="l"><a class="l" href="#113">113: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getScriptNom" href="#_getScriptNom">getScriptNom</a>() {
</span><span id="114" class="l"><a class="l" href="#114">114: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;script_nom;
</span><span id="115" class="l"><a class="l" href="#115">115: </a> }
</span><span id="116" class="l"><a class="l" href="#116">116: </a>
</span><span id="117" class="l"><a class="l" href="#117">117: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getScriptChemin" href="#_getScriptChemin">getScriptChemin</a>(<span class="php-var">$doit_exister</span> = <span class="php-keyword1">true</span>) {
</span><span id="118" class="l"><a class="l" href="#118">118: </a> <span class="php-var">$chemin</span> = Config::get(<span class="php-quote">'chemin_modules'</span>).<span class="php-var">$this</span>-&gt;getScriptNom().DS;
</span><span id="119" class="l"><a class="l" href="#119">119: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">file_exists</span>(<span class="php-var">$chemin</span>) &amp;&amp; <span class="php-var">$doit_exister</span>) {
</span><span id="120" class="l"><a class="l" href="#120">120: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Erreur: le module '&quot;</span>.<span class="php-var">$this</span>-&gt;getScriptNom().<span class="php-quote">&quot;' n'existe pas (</span><span class="php-var">$chemin</span><span class="php-quote">)\n&quot;</span>, E_USER_ERROR);
</span><span id="121" class="l"><a class="l" href="#121">121: </a> }
</span><span id="122" class="l"><a class="l" href="#122">122: </a> <span class="php-keyword1">return</span> <span class="php-var">$chemin</span>;
</span><span id="123" class="l"><a class="l" href="#123">123: </a> }
</span><span id="124" class="l"><a class="l" href="#124">124: </a>
</span><span id="125" class="l"><a class="l" href="#125">125: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getParametre" href="#_getParametre">getParametre</a>(<span class="php-var">$parametre</span>) {
</span><span id="126" class="l"><a class="l" href="#126">126: </a> <span class="php-var">$retour</span> = <span class="php-keyword1">false</span>;
</span><span id="127" class="l"><a class="l" href="#127">127: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_null</span>(<span class="php-var">$parametre</span>)) {
</span><span id="128" class="l"><a class="l" href="#128">128: </a> <span class="php-var">$parametre</span> = <span class="php-keyword2">ltrim</span>(<span class="php-var">$parametre</span>, <span class="php-quote">'-'</span>);
</span><span id="129" class="l"><a class="l" href="#129">129: </a>
</span><span id="130" class="l"><a class="l" href="#130">130: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;parametres[<span class="php-var">$parametre</span>])) {
</span><span id="131" class="l"><a class="l" href="#131">131: </a> <span class="php-var">$retour</span> = <span class="php-var">$this</span>-&gt;parametres[<span class="php-var">$parametre</span>];
</span><span id="132" class="l"><a class="l" href="#132">132: </a> } <span class="php-keyword1">else</span> {
</span><span id="133" class="l"><a class="l" href="#133">133: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Erreur: la ligne de commande ne contenait pas le paramêtre '</span><span class="php-var">$parametre</span><span class="php-quote">'\n&quot;</span>, E_USER_WARNING);
</span><span id="134" class="l"><a class="l" href="#134">134: </a> }
</span><span id="135" class="l"><a class="l" href="#135">135: </a> }
</span><span id="136" class="l"><a class="l" href="#136">136: </a> <span class="php-keyword1">return</span> <span class="php-var">$retour</span>;
</span><span id="137" class="l"><a class="l" href="#137">137: </a> }
</span><span id="138" class="l"><a class="l" href="#138">138: </a>
</span><span id="139" class="l"><a class="l" href="#139">139: </a> <span class="php-keyword1">abstract</span> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_executer" href="#_executer">executer</a>();
</span><span id="140" class="l"><a class="l" href="#140">140: </a>
</span><span id="141" class="l"><a class="l" href="#141">141: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_chargerParametresAutorises" href="#_chargerParametresAutorises">chargerParametresAutorises</a>() {
</span><span id="142" class="l"><a class="l" href="#142">142: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$this</span>-&gt;parametres_autorises_defaut <span class="php-keyword1">as</span> <span class="php-var">$c</span> =&gt; <span class="php-var">$v</span>) {
</span><span id="143" class="l"><a class="l" href="#143">143: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;parametres_autorises[<span class="php-var">$c</span>])) {
</span><span id="144" class="l"><a class="l" href="#144">144: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Erreur: le script '&quot;</span>.<span class="php-var">$this</span>-&gt;getScriptNom().<span class="php-quote">&quot;' ne peut définir le paramêtre '</span><span class="php-var">$c</span><span class="php-quote">' car il existe déjà\n&quot;</span>, E_USER_ERROR);
</span><span id="145" class="l"><a class="l" href="#145">145: </a> } <span class="php-keyword1">else</span> {
</span><span id="146" class="l"><a class="l" href="#146">146: </a> <span class="php-var">$this</span>-&gt;parametres_autorises[<span class="php-var">$c</span>] = <span class="php-var">$v</span>;
</span><span id="147" class="l"><a class="l" href="#147">147: </a> }
</span><span id="148" class="l"><a class="l" href="#148">148: </a> }
</span><span id="149" class="l"><a class="l" href="#149">149: </a> }
</span><span id="150" class="l"><a class="l" href="#150">150: </a>
</span><span id="151" class="l"><a class="l" href="#151">151: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_chargerParametres" href="#_chargerParametres">chargerParametres</a>() {
</span><span id="152" class="l"><a class="l" href="#152">152: </a> <span class="php-var">$parametres_cli</span> = <span class="php-var">$this</span>-&gt;parametres_cli;
</span><span id="153" class="l"><a class="l" href="#153">153: </a>
</span><span id="154" class="l"><a class="l" href="#154">154: </a> <span class="php-comment">// Récupération des paramêtresgetMsgNiveauTxt</span>
</span><span id="155" class="l"><a class="l" href="#155">155: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$this</span>-&gt;parametres_autorises <span class="php-keyword1">as</span> <span class="php-var">$p_nom</span> =&gt; <span class="php-var">$p_val</span>) {
</span><span id="156" class="l"><a class="l" href="#156">156: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(<span class="php-var">$parametres_cli</span>) == <span class="php-num">0</span>) {
</span><span id="157" class="l"><a class="l" href="#157">157: </a> <span class="php-keyword1">if</span> (<span class="php-var">$p_val</span>[<span class="php-num">0</span>]) {
</span><span id="158" class="l"><a class="l" href="#158">158: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Erreur: paramêtre manquant '&quot;</span>.<span class="php-var">$p_nom</span>.<span class="php-quote">&quot;' \n&quot;</span>, E_USER_WARNING);
</span><span id="159" class="l"><a class="l" href="#159">159: </a> }
</span><span id="160" class="l"><a class="l" href="#160">160: </a> }
</span><span id="161" class="l"><a class="l" href="#161">161: </a> <span class="php-keyword1">if</span> (<span class="php-var">$p_nom</span> == <span class="php-quote">'...'</span>) {
</span><span id="162" class="l"><a class="l" href="#162">162: </a> <span class="php-var">$this</span>-&gt;parametres[<span class="php-quote">'...'</span>] = <span class="php-keyword1">array</span>();
</span><span id="163" class="l"><a class="l" href="#163">163: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$parametres_cli</span> <span class="php-keyword1">as</span> <span class="php-var">$arg</span>) {
</span><span id="164" class="l"><a class="l" href="#164">164: </a> <span class="php-var">$this</span>-&gt;parametres[<span class="php-quote">'...'</span>][] = <span class="php-var">$arg</span>;
</span><span id="165" class="l"><a class="l" href="#165">165: </a> }
</span><span id="166" class="l"><a class="l" href="#166">166: </a> <span class="php-var">$parametres_cli</span> = <span class="php-keyword1">array</span>();
</span><span id="167" class="l"><a class="l" href="#167">167: </a> <span class="php-keyword1">break</span>;
</span><span id="168" class="l"><a class="l" href="#168">168: </a> } <span class="php-keyword1">else</span> {
</span><span id="169" class="l"><a class="l" href="#169">169: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$parametres_cli</span>[<span class="php-var">$p_nom</span>])) {
</span><span id="170" class="l"><a class="l" href="#170">170: </a> <span class="php-comment">// Attribution de la valeur issue de la ligne de commande</span>
</span><span id="171" class="l"><a class="l" href="#171">171: </a> <span class="php-var">$this</span>-&gt;parametres[<span class="php-keyword2">ltrim</span>(<span class="php-var">$p_nom</span>, <span class="php-quote">'-'</span>)] = <span class="php-var">$parametres_cli</span>[<span class="php-var">$p_nom</span>];
</span><span id="172" class="l"><a class="l" href="#172">172: </a> <span class="php-keyword1">unset</span>(<span class="php-var">$parametres_cli</span>[<span class="php-var">$p_nom</span>]);
</span><span id="173" class="l"><a class="l" href="#173">173: </a> } <span class="php-keyword1">else</span> {
</span><span id="174" class="l"><a class="l" href="#174">174: </a> <span class="php-comment">// Attribution de la valeur par défaut</span>
</span><span id="175" class="l"><a class="l" href="#175">175: </a> <span class="php-keyword1">if</span> (<span class="php-var">$p_val</span>[<span class="php-num">1</span>] !== <span class="php-keyword1">true</span>) {
</span><span id="176" class="l"><a class="l" href="#176">176: </a> <span class="php-var">$this</span>-&gt;parametres[<span class="php-keyword2">ltrim</span>(<span class="php-var">$p_nom</span>, <span class="php-quote">'-'</span>)] = <span class="php-var">$p_val</span>[<span class="php-num">1</span>];
</span><span id="177" class="l"><a class="l" href="#177">177: </a> <span class="php-keyword1">unset</span>(<span class="php-var">$parametres_cli</span>[<span class="php-var">$p_nom</span>]);
</span><span id="178" class="l"><a class="l" href="#178">178: </a> }
</span><span id="179" class="l"><a class="l" href="#179">179: </a> }
</span><span id="180" class="l"><a class="l" href="#180">180: </a> }
</span><span id="181" class="l"><a class="l" href="#181">181: </a> }
</span><span id="182" class="l"><a class="l" href="#182">182: </a>
</span><span id="183" class="l"><a class="l" href="#183">183: </a> <span class="php-comment">// Gestion de l'excédant de paramêtres</span>
</span><span id="184" class="l"><a class="l" href="#184">184: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(<span class="php-var">$parametres_cli</span>)) {
</span><span id="185" class="l"><a class="l" href="#185">185: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-quote">&quot;Erreur: trop de paramêtres\n&quot;</span>, E_USER_ERROR);
</span><span id="186" class="l"><a class="l" href="#186">186: </a> }
</span><span id="187" class="l"><a class="l" href="#187">187: </a> }
</span><span id="188" class="l"><a class="l" href="#188">188: </a>
</span><span id="189" class="l"><a class="l" href="#189">189: </a> <span class="php-comment">/**
</span></span><span id="190" class="l"><a class="l" href="#190">190: </a><span class="php-comment"> * Affiche un message d'erreur formaté.
</span></span><span id="191" class="l"><a class="l" href="#191">191: </a><span class="php-comment"> * Si le paramétre de verbosité (-v) vaut 1 ou plus, le message est écrit dans le fichier de log et afficher dans la console.
</span></span><span id="192" class="l"><a class="l" href="#192">192: </a><span class="php-comment"> *
</span></span><span id="193" class="l"><a class="l" href="#193">193: </a><span class="php-comment"> * @param string le message d'erreur avec des %s.
</span></span><span id="194" class="l"><a class="l" href="#194">194: </a><span class="php-comment"> * @param array le tableau des paramêtres à insérer dans le message d'erreur.
</span></span><span id="195" class="l"><a class="l" href="#195">195: </a><span class="php-comment"> * @return void.
</span></span><span id="196" class="l"><a class="l" href="#196">196: </a><span class="php-comment"> */</span>
</span><span id="197" class="l"><a class="l" href="#197">197: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_traiterErreur" href="#_traiterErreur">traiterErreur</a>(<span class="php-var">$message</span>, <span class="php-var">$tab_arguments</span> = <span class="php-keyword1">array</span>()) {
</span><span id="198" class="l"><a class="l" href="#198">198: </a> <span class="php-var">$this</span>-&gt;traiterMessage(<span class="php-var">$message</span>, <span class="php-var">$tab_arguments</span>, self::MSG_ERREUR);
</span><span id="199" class="l"><a class="l" href="#199">199: </a> }
</span><span id="200" class="l"><a class="l" href="#200">200: </a>
</span><span id="201" class="l"><a class="l" href="#201">201: </a> <span class="php-comment">/**
</span></span><span id="202" class="l"><a class="l" href="#202">202: </a><span class="php-comment"> * Affiche un message d'avertissement formaté.
</span></span><span id="203" class="l"><a class="l" href="#203">203: </a><span class="php-comment"> * Si le paramétre de verbosité (-v) vaut 1, le message est écrit dans le fichier de log.
</span></span><span id="204" class="l"><a class="l" href="#204">204: </a><span class="php-comment"> * Si le paramétre de verbosité (-v) vaut 2 ou plus, le message est écrit dans le fichier de log et afficher dans la console.
</span></span><span id="205" class="l"><a class="l" href="#205">205: </a><span class="php-comment"> *
</span></span><span id="206" class="l"><a class="l" href="#206">206: </a><span class="php-comment"> * @param string le message d'erreur avec des %s.
</span></span><span id="207" class="l"><a class="l" href="#207">207: </a><span class="php-comment"> * @param array le tableau des paramêtres à insérer dans le message d'erreur.
</span></span><span id="208" class="l"><a class="l" href="#208">208: </a><span class="php-comment"> * @return void.
</span></span><span id="209" class="l"><a class="l" href="#209">209: </a><span class="php-comment"> */</span>
</span><span id="210" class="l"><a class="l" href="#210">210: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_traiterAvertissement" href="#_traiterAvertissement">traiterAvertissement</a>(<span class="php-var">$message</span>, <span class="php-var">$tab_arguments</span> = <span class="php-keyword1">array</span>()) {
</span><span id="211" class="l"><a class="l" href="#211">211: </a> <span class="php-var">$this</span>-&gt;traiterMessage(<span class="php-var">$message</span>, <span class="php-var">$tab_arguments</span>, self::MSG_AVERTISSEMENT);
</span><span id="212" class="l"><a class="l" href="#212">212: </a> }
</span><span id="213" class="l"><a class="l" href="#213">213: </a>
</span><span id="214" class="l"><a class="l" href="#214">214: </a> <span class="php-comment">/**
</span></span><span id="215" class="l"><a class="l" href="#215">215: </a><span class="php-comment"> * Retourne un message d'information formaté.
</span></span><span id="216" class="l"><a class="l" href="#216">216: </a><span class="php-comment"> * Si le paramétre de verbosité (-v) vaut 1 ou 2 , le message est écrit dans le fichier de log.
</span></span><span id="217" class="l"><a class="l" href="#217">217: </a><span class="php-comment"> * Si le paramétre de verbosité (-v) vaut 3 ou plus, le message est écrit dans le fichier de log et afficher dans la console.
</span></span><span id="218" class="l"><a class="l" href="#218">218: </a><span class="php-comment"> *
</span></span><span id="219" class="l"><a class="l" href="#219">219: </a><span class="php-comment"> * @param string le message d'information avec des %s.
</span></span><span id="220" class="l"><a class="l" href="#220">220: </a><span class="php-comment"> * @param array le tableau des paramêtres à insérer dans le message d'erreur.
</span></span><span id="221" class="l"><a class="l" href="#221">221: </a><span class="php-comment"> * @return void.
</span></span><span id="222" class="l"><a class="l" href="#222">222: </a><span class="php-comment"> */</span>
</span><span id="223" class="l"><a class="l" href="#223">223: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_traiterInfo" href="#_traiterInfo">traiterInfo</a>(<span class="php-var">$message</span>, <span class="php-var">$tab_arguments</span> = <span class="php-keyword1">array</span>()) {
</span><span id="224" class="l"><a class="l" href="#224">224: </a> <span class="php-var">$this</span>-&gt;traiterMessage(<span class="php-var">$message</span>, <span class="php-var">$tab_arguments</span>, self::MSG_INFO);
</span><span id="225" class="l"><a class="l" href="#225">225: </a> }
</span><span id="226" class="l"><a class="l" href="#226">226: </a>
</span><span id="227" class="l"><a class="l" href="#227">227: </a> <span class="php-comment">/**
</span></span><span id="228" class="l"><a class="l" href="#228">228: </a><span class="php-comment"> * Retourne un message formaté en le stockant dans un fichier de log si nécessaire.
</span></span><span id="229" class="l"><a class="l" href="#229">229: </a><span class="php-comment"> *
</span></span><span id="230" class="l"><a class="l" href="#230">230: </a><span class="php-comment"> * @param string le message d'erreur avec des %s.
</span></span><span id="231" class="l"><a class="l" href="#231">231: </a><span class="php-comment"> * @param array le tableau des paramêtres à insérer dans le message d'erreur.
</span></span><span id="232" class="l"><a class="l" href="#232">232: </a><span class="php-comment"> * @param int le niveau de verbosité à dépasser pour afficher les messages.
</span></span><span id="233" class="l"><a class="l" href="#233">233: </a><span class="php-comment"> * @return void.
</span></span><span id="234" class="l"><a class="l" href="#234">234: </a><span class="php-comment"> */</span>
</span><span id="235" class="l"><a class="l" href="#235">235: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="_traiterMessage" href="#_traiterMessage">traiterMessage</a>(<span class="php-var">$message</span>, <span class="php-var">$tab_arguments</span>, <span class="php-var">$niveau</span> = self::MSG_LOG) {
</span><span id="236" class="l"><a class="l" href="#236">236: </a> <span class="php-var">$log</span> = <span class="php-var">$this</span>-&gt;formaterMsg(<span class="php-var">$message</span>, <span class="php-var">$tab_arguments</span>, <span class="php-var">$niveau</span>);
</span><span id="237" class="l"><a class="l" href="#237">237: </a> <span class="php-keyword1">if</span> (<span class="php-var">$this</span>-&gt;getParametre(<span class="php-quote">'v'</span>) &gt; (<span class="php-var">$niveau</span> - <span class="php-num">1</span>)) {
</span><span id="238" class="l"><a class="l" href="#238">238: </a> <span class="php-keyword1">echo</span> <span class="php-var">$log</span>;
</span><span id="239" class="l"><a class="l" href="#239">239: </a> <span class="php-keyword1">if</span> (Config::get(<span class="php-quote">'log_script'</span>)) {
</span><span id="240" class="l"><a class="l" href="#240">240: </a> <span class="php-comment">// TODO : lancer le log</span>
</span><span id="241" class="l"><a class="l" href="#241">241: </a> }
</span><span id="242" class="l"><a class="l" href="#242">242: </a> }
</span><span id="243" class="l"><a class="l" href="#243">243: </a> }
</span><span id="244" class="l"><a class="l" href="#244">244: </a>
</span><span id="245" class="l"><a class="l" href="#245">245: </a> <span class="php-comment">/**
</span></span><span id="246" class="l"><a class="l" href="#246">246: </a><span class="php-comment"> * Retourne un message d'information formaté.
</span></span><span id="247" class="l"><a class="l" href="#247">247: </a><span class="php-comment"> *
</span></span><span id="248" class="l"><a class="l" href="#248">248: </a><span class="php-comment"> * @param string le message d'information avec des %s.
</span></span><span id="249" class="l"><a class="l" href="#249">249: </a><span class="php-comment"> * @param array le tableau des paramêtres à insérer dans le message d'erreur.
</span></span><span id="250" class="l"><a class="l" href="#250">250: </a><span class="php-comment"> * @return string le message d'erreur formaté.
</span></span><span id="251" class="l"><a class="l" href="#251">251: </a><span class="php-comment"> */</span>
</span><span id="252" class="l"><a class="l" href="#252">252: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_formaterMsg" href="#_formaterMsg">formaterMsg</a>(<span class="php-var">$message</span>, <span class="php-var">$tab_arguments</span> = <span class="php-keyword1">array</span>(), <span class="php-var">$niveau</span> = <span class="php-keyword1">null</span>) {
</span><span id="253" class="l"><a class="l" href="#253">253: </a> <span class="php-var">$texte</span> = <span class="php-keyword2">vsprintf</span>(<span class="php-var">$message</span>, <span class="php-var">$tab_arguments</span>);
</span><span id="254" class="l"><a class="l" href="#254">254: </a> <span class="php-var">$prefixe</span> = <span class="php-keyword2">date</span>(<span class="php-quote">'Y-m-j_H:i:s'</span>, <span class="php-keyword2">time</span>());
</span><span id="255" class="l"><a class="l" href="#255">255: </a> <span class="php-var">$prefixe</span> .= <span class="php-keyword2">is_null</span>(<span class="php-var">$niveau</span>) ? <span class="php-quote">' : '</span> : <span class="php-quote">' - '</span>.self::getMsgNiveauTxt(<span class="php-var">$niveau</span>).<span class="php-quote">' : '</span>;
</span><span id="256" class="l"><a class="l" href="#256">256: </a> <span class="php-var">$log</span> = <span class="php-var">$prefixe</span>.<span class="php-var">$texte</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="257" class="l"><a class="l" href="#257">257: </a> <span class="php-keyword1">return</span> <span class="php-var">$log</span>;
</span><span id="258" class="l"><a class="l" href="#258">258: </a> }
</span><span id="259" class="l"><a class="l" href="#259">259: </a>
</span><span id="260" class="l"><a class="l" href="#260">260: </a> <span class="php-comment">/**
</span></span><span id="261" class="l"><a class="l" href="#261">261: </a><span class="php-comment"> * Utiliser cette méthode dans une boucle pour afficher un message suivi du nombre de tour de boucle effectué.
</span></span><span id="262" class="l"><a class="l" href="#262">262: </a><span class="php-comment"> * Vous devrez vous même gérer le retour à la ligne à la sortie de la boucle.
</span></span><span id="263" class="l"><a class="l" href="#263">263: </a><span class="php-comment"> *
</span></span><span id="264" class="l"><a class="l" href="#264">264: </a><span class="php-comment"> * @param string le message d'information.
</span></span><span id="265" class="l"><a class="l" href="#265">265: </a><span class="php-comment"> * @param int le nombre de départ à afficher.
</span></span><span id="266" class="l"><a class="l" href="#266">266: </a><span class="php-comment"> * @return void le message est affiché dans la console.
</span></span><span id="267" class="l"><a class="l" href="#267">267: </a><span class="php-comment"> */</span>
</span><span id="268" class="l"><a class="l" href="#268">268: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_afficherAvancement" href="#_afficherAvancement">afficherAvancement</a>(<span class="php-var">$message</span>, <span class="php-var">$depart</span> = <span class="php-num">0</span>) {
</span><span id="269" class="l"><a class="l" href="#269">269: </a> <span class="php-keyword1">if</span> (! <span class="php-keyword1">isset</span>(self::<span class="php-var">$avancement</span>[<span class="php-var">$message</span>])) {
</span><span id="270" class="l"><a class="l" href="#270">270: </a> self::<span class="php-var">$avancement</span>[<span class="php-var">$message</span>] = <span class="php-var">$depart</span>;
</span><span id="271" class="l"><a class="l" href="#271">271: </a> <span class="php-keyword1">echo</span> <span class="php-quote">&quot;</span><span class="php-var">$message</span><span class="php-quote"> : &quot;</span>;
</span><span id="272" class="l"><a class="l" href="#272">272: </a>
</span><span id="273" class="l"><a class="l" href="#273">273: </a> <span class="php-var">$actuel</span> =&amp; self::<span class="php-var">$avancement</span>[<span class="php-var">$message</span>];
</span><span id="274" class="l"><a class="l" href="#274">274: </a> <span class="php-keyword1">echo</span> <span class="php-var">$actuel</span>++;
</span><span id="275" class="l"><a class="l" href="#275">275: </a> } <span class="php-keyword1">else</span> {
</span><span id="276" class="l"><a class="l" href="#276">276: </a> <span class="php-var">$actuel</span> =&amp; self::<span class="php-var">$avancement</span>[<span class="php-var">$message</span>];
</span><span id="277" class="l"><a class="l" href="#277">277: </a>
</span><span id="278" class="l"><a class="l" href="#278">278: </a> <span class="php-comment">// Cas du passage de 99 (= 2 caractères) à 100 (= 3 caractères)</span>
</span><span id="279" class="l"><a class="l" href="#279">279: </a> <span class="php-var">$passage</span> = <span class="php-num">0</span>;
</span><span id="280" class="l"><a class="l" href="#280">280: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">strlen</span>((string) (<span class="php-var">$actuel</span> - <span class="php-num">1</span>)) &lt; <span class="php-keyword2">strlen</span>((string) (<span class="php-var">$actuel</span>))) {
</span><span id="281" class="l"><a class="l" href="#281">281: </a> <span class="php-var">$passage</span> = <span class="php-num">1</span>;
</span><span id="282" class="l"><a class="l" href="#282">282: </a> }
</span><span id="283" class="l"><a class="l" href="#283">283: </a>
</span><span id="284" class="l"><a class="l" href="#284">284: </a> <span class="php-keyword1">echo</span> <span class="php-keyword2">str_repeat</span>(<span class="php-keyword2">chr</span>(<span class="php-num">8</span>), (<span class="php-keyword2">strlen</span>((string) <span class="php-var">$actuel</span>) - <span class="php-var">$passage</span>));
</span><span id="285" class="l"><a class="l" href="#285">285: </a> <span class="php-keyword1">echo</span> <span class="php-var">$actuel</span>++;
</span><span id="286" class="l"><a class="l" href="#286">286: </a> }
</span><span id="287" class="l"><a class="l" href="#287">287: </a> }
</span><span id="288" class="l"><a class="l" href="#288">288: </a>}
</span><span id="289" class="l"><a class="l" href="#289">289: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/todo.html
New file
0,0 → 1,135
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Todo | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheFichier.html">CacheFichier</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-CacheSqlite.html">CacheSqlite</a></li>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
<h3>Exceptions</h3>
<ul>
<li><a href="class-Exception.html">Exception</a></li>
</ul>
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<span>Package</span> </li>
<li>
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li class="active">
<span>Todo</span> </li>
</ul>
<ul>
</ul>
</div>
 
<div id="content">
<h1>Todo</h1>
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Encodage.html
New file
0,0 → 1,159
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File utilitaires/Encodage.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li class="active"><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Chaine.html">Chaine</a></li>
<li class="active"><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Utilitaire.html" title="Summary of Utilitaire"><span>Package</span></a>
</li>
<li>
<a href="class-Encodage.html" title="Summary of Encodage"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe fournissant des méthodes statiques concernant l'encodage et le décodage des caractères de variable.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> *
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * @package Utilitaire
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="10" class="l"><a class="l" href="#10">10: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
</span></span><span id="11" class="l"><a class="l" href="#11">11: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
</span></span><span id="12" class="l"><a class="l" href="#12">12: </a><span class="php-comment"> * @version $Id: Encodage.php 299 2011-01-18 14:03:46Z jpm $
</span></span><span id="13" class="l"><a class="l" href="#13">13: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="14" class="l"><a class="l" href="#14">14: </a><span class="php-comment"> */</span>
</span><span id="15" class="l"><a class="l" href="#15">15: </a><span class="php-keyword1">class</span> <a id="Encodage" href="#Encodage">Encodage</a> {
</span><span id="16" class="l"><a class="l" href="#16">16: </a> <span class="php-comment">/**
</span></span><span id="17" class="l"><a class="l" href="#17">17: </a><span class="php-comment"> * Méthode permettant d'encoder par défaut de ISO-8859-15 vers UTF-8 une variable ou un tableau de variables.
</span></span><span id="18" class="l"><a class="l" href="#18">18: </a><span class="php-comment"> *
</span></span><span id="19" class="l"><a class="l" href="#19">19: </a><span class="php-comment"> * @param mixed la chaine ou le tableau à encoder en UTF-8 depuis ISO-8859-15.
</span></span><span id="20" class="l"><a class="l" href="#20">20: </a><span class="php-comment"> * @param string l'encodage d'origine si ce n'est pas ISO-8859-15.
</span></span><span id="21" class="l"><a class="l" href="#21">21: </a><span class="php-comment"> * @return mixed la chaine ou le tableau encodé en UTF-8.
</span></span><span id="22" class="l"><a class="l" href="#22">22: </a><span class="php-comment"> * @access protected
</span></span><span id="23" class="l"><a class="l" href="#23">23: </a><span class="php-comment"> */</span>
</span><span id="24" class="l"><a class="l" href="#24">24: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_encoderEnUtf8" href="#_encoderEnUtf8">encoderEnUtf8</a>(&amp;<span class="php-var">$variable</span>, <span class="php-var">$encodage</span> = <span class="php-quote">'ISO-8859-15'</span>) {
</span><span id="25" class="l"><a class="l" href="#25">25: </a> <span class="php-comment">//echo print_r($variable, true).&quot;\n&quot;;</span>
</span><span id="26" class="l"><a class="l" href="#26">26: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$variable</span>)) {
</span><span id="27" class="l"><a class="l" href="#27">27: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$variable</span> <span class="php-keyword1">as</span> <span class="php-var">$c</span> =&gt; <span class="php-var">$v</span>) {
</span><span id="28" class="l"><a class="l" href="#28">28: </a> <span class="php-var">$variable</span>[<span class="php-var">$c</span>] = self::encoderEnUtf8(<span class="php-var">$v</span>);
</span><span id="29" class="l"><a class="l" href="#29">29: </a> }
</span><span id="30" class="l"><a class="l" href="#30">30: </a> } <span class="php-keyword1">else</span> {
</span><span id="31" class="l"><a class="l" href="#31">31: </a> <span class="php-comment">// Nous vérifions si nous avons un bon encodage UTF-8</span>
</span><span id="32" class="l"><a class="l" href="#32">32: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_numeric</span>(<span class="php-var">$variable</span>) &amp;&amp; !<span class="php-keyword1">empty</span>(<span class="php-var">$variable</span>) &amp;&amp; !self::detecterUtf8(<span class="php-var">$variable</span>)) {
</span><span id="33" class="l"><a class="l" href="#33">33: </a> <span class="php-comment">// Les nombres, les valeurs vides et ce qui est déjà en UTF-8 ne sont pas encodés.</span>
</span><span id="34" class="l"><a class="l" href="#34">34: </a> <span class="php-var">$variable</span> = <span class="php-keyword2">mb_convert_encoding</span>(<span class="php-var">$variable</span>, <span class="php-quote">'UTF-8'</span>, <span class="php-var">$encodage</span>);
</span><span id="35" class="l"><a class="l" href="#35">35: </a> }
</span><span id="36" class="l"><a class="l" href="#36">36: </a> }
</span><span id="37" class="l"><a class="l" href="#37">37: </a> <span class="php-keyword1">return</span> <span class="php-var">$variable</span>;
</span><span id="38" class="l"><a class="l" href="#38">38: </a> }
</span><span id="39" class="l"><a class="l" href="#39">39: </a>
</span><span id="40" class="l"><a class="l" href="#40">40: </a> <span class="php-comment">/**
</span></span><span id="41" class="l"><a class="l" href="#41">41: </a><span class="php-comment"> * Méthode permettant de détecter réellement l'encodage UTF-8.
</span></span><span id="42" class="l"><a class="l" href="#42">42: </a><span class="php-comment"> * mb_detect_encoding plante si la chaine de caractère se termine par un caractère accentué.
</span></span><span id="43" class="l"><a class="l" href="#43">43: </a><span class="php-comment"> * Provient de PHPDIG.
</span></span><span id="44" class="l"><a class="l" href="#44">44: </a><span class="php-comment"> *
</span></span><span id="45" class="l"><a class="l" href="#45">45: </a><span class="php-comment"> * @param string la chaine à vérifier.
</span></span><span id="46" class="l"><a class="l" href="#46">46: </a><span class="php-comment"> * @return bool true si c'est de UTF-8, sinon false.
</span></span><span id="47" class="l"><a class="l" href="#47">47: </a><span class="php-comment"> * @access private
</span></span><span id="48" class="l"><a class="l" href="#48">48: </a><span class="php-comment"> */</span>
</span><span id="49" class="l"><a class="l" href="#49">49: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_detecterUtf8" href="#_detecterUtf8">detecterUtf8</a>(<span class="php-var">$chaine</span>) {
</span><span id="50" class="l"><a class="l" href="#50">50: </a> <span class="php-keyword1">if</span> (<span class="php-var">$chaine</span> === <span class="php-keyword2">mb_convert_encoding</span>(<span class="php-keyword2">mb_convert_encoding</span>(<span class="php-var">$chaine</span>, <span class="php-quote">'UTF-32'</span>, <span class="php-quote">'UTF-8'</span>), <span class="php-quote">'UTF-8'</span>, <span class="php-quote">'UTF-32'</span>)) {
</span><span id="51" class="l"><a class="l" href="#51">51: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">true</span>;
</span><span id="52" class="l"><a class="l" href="#52">52: </a> } <span class="php-keyword1">else</span> {
</span><span id="53" class="l"><a class="l" href="#53">53: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="54" class="l"><a class="l" href="#54">54: </a> }
</span><span id="55" class="l"><a class="l" href="#55">55: </a> }
</span><span id="56" class="l"><a class="l" href="#56">56: </a>}
</span><span id="57" class="l"><a class="l" href="#57">57: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/index.html
New file
0,0 → 1,144
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js"></script>
<script type="text/javascript" src="elementlist.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<span>Overview</span>
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheFichier.html">CacheFichier</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-CacheSqlite.html">CacheSqlite</a></li>
<li><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
<h3>Exceptions</h3>
<ul>
<li><a href="class-Exception.html">Exception</a></li>
</ul>
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text" autofocus>
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li class="active">
<span>Overview</span> </li>
<li>
<span>Package</span> </li>
<li>
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content">
<h1>TBFramework - v0.3</h1>
 
 
 
<table class="summary" id="packages">
<caption>Packages summary</caption>
<tr>
<td class="name"><a href="package-Framework.html">Framework</a></td>
</tr>
<tr>
<td class="name"><a href="package-None.html">None</a></td>
</tr>
<tr>
<td class="name"><a href="package-PHP.html">PHP</a></td>
</tr>
<tr>
<td class="name"><a href="package-Utilitaire.html">Utilitaire</a></td>
</tr>
</table>
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Script.html
New file
0,0 → 1,778
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Script | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li class="active"><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Script</h1>
 
 
<div class="description">
<p>Script est une classe abstraite qui doit être implémenté par les classes
éxecutant des scripts en ligne de commande.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Abstract</b><br>
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL-v3</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL-v2</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Author:</b>
Delphine CAUQUIL &lt;<a
href="mailto:delphine&#64;tela-botanica.org">delphine&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Script.php 299 2011-01-18 14:03:46Z jpm $<br>
<b>Since:</b>
0.3<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Script.html#4-288" title="Go to source code">Script.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-Script.html#96-107" title="Go to source code">__construct</a>( <span>mixed <var>$script_nom</var></span>, <span>mixed <var>$parametres_cli</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getScriptNom" id="_getScriptNom">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getScriptNom">#</a>
<code><a href="source-class-Script.html#113-115" title="Go to source code">getScriptNom</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getScriptChemin" id="_getScriptChemin">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getScriptChemin">#</a>
<code><a href="source-class-Script.html#117-123" title="Go to source code">getScriptChemin</a>( <span>mixed <var>$doit_exister</var> = <span class="php-keyword1">true</span></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getParametre" id="_getParametre">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getParametre">#</a>
<code><a href="source-class-Script.html#125-137" title="Go to source code">getParametre</a>( <span>mixed <var>$parametre</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="executer" id="_executer">
 
<td class="attributes"><code>
abstract public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_executer">#</a>
<code><a href="source-class-Script.html#139" title="Go to source code">executer</a>( )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="traiterErreur" id="_traiterErreur">
 
<td class="attributes"><code>
protected
void.
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_traiterErreur">#</a>
<code><a href="source-class-Script.html#189-199" title="Go to source code">traiterErreur</a>( <span>string <var>$message</var></span>, <span>array <var>$tab_arguments</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Affiche un message d'erreur formaté. Si le paramétre de verbosité (-v)
vaut 1 ou plus, le message est écrit dans le fichier de log et afficher dans la
console.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Affiche un message d'erreur formaté. Si le paramétre de verbosité (-v)
vaut 1 ou plus, le message est écrit dans le fichier de log et afficher dans la
console.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$message</var></dt>
<dd><code>string</code><br>le message d'erreur avec des %s.</dd>
<dt><var>$tab_arguments</var></dt>
<dd><code>array</code><br>le tableau des paramêtres à insérer dans le message d'erreur.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>void.</code><br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="traiterAvertissement" id="_traiterAvertissement">
 
<td class="attributes"><code>
protected
void.
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_traiterAvertissement">#</a>
<code><a href="source-class-Script.html#201-212" title="Go to source code">traiterAvertissement</a>( <span>string <var>$message</var></span>, <span>array <var>$tab_arguments</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Affiche un message d'avertissement formaté. Si le paramétre de verbosité
(-v) vaut 1, le message est écrit dans le fichier de log. Si le paramétre de
verbosité (-v) vaut 2 ou plus, le message est écrit dans le fichier de log et
afficher dans la console.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Affiche un message d'avertissement formaté. Si le paramétre de verbosité
(-v) vaut 1, le message est écrit dans le fichier de log. Si le paramétre de
verbosité (-v) vaut 2 ou plus, le message est écrit dans le fichier de log et
afficher dans la console.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$message</var></dt>
<dd><code>string</code><br>le message d'erreur avec des %s.</dd>
<dt><var>$tab_arguments</var></dt>
<dd><code>array</code><br>le tableau des paramêtres à insérer dans le message d'erreur.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>void.</code><br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="traiterInfo" id="_traiterInfo">
 
<td class="attributes"><code>
protected
void.
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_traiterInfo">#</a>
<code><a href="source-class-Script.html#214-225" title="Go to source code">traiterInfo</a>( <span>string <var>$message</var></span>, <span>array <var>$tab_arguments</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Retourne un message d'information formaté. Si le paramétre de verbosité
(-v) vaut 1 ou 2 , le message est écrit dans le fichier de log. Si le
paramétre de verbosité (-v) vaut 3 ou plus, le message est écrit dans le
fichier de log et afficher dans la console.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Retourne un message d'information formaté. Si le paramétre de verbosité
(-v) vaut 1 ou 2 , le message est écrit dans le fichier de log. Si le
paramétre de verbosité (-v) vaut 3 ou plus, le message est écrit dans le
fichier de log et afficher dans la console.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$message</var></dt>
<dd><code>string</code><br>le message d'information avec des %s.</dd>
<dt><var>$tab_arguments</var></dt>
<dd><code>array</code><br>le tableau des paramêtres à insérer dans le message d'erreur.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>void.</code><br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="formaterMsg" id="_formaterMsg">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_formaterMsg">#</a>
<code><a href="source-class-Script.html#245-258" title="Go to source code">formaterMsg</a>( <span>string <var>$message</var></span>, <span>array <var>$tab_arguments</var> = <span class="php-keyword1">array</span>()</span>, <span>mixed <var>$niveau</var> = <span class="php-keyword1">null</span></span> )</code>
 
<div class="description short">
<p>Retourne un message d'information formaté.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Retourne un message d'information formaté.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$message</var></dt>
<dd><code>string</code><br>le message d'information avec des %s.</dd>
<dt><var>$tab_arguments</var></dt>
<dd><code>array</code><br>le tableau des paramêtres à insérer dans le message d'erreur.</dd>
<dt><var>$niveau</var></dt>
<dd></dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>le message d'erreur formaté.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="afficherAvancement" id="_afficherAvancement">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_afficherAvancement">#</a>
<code><a href="source-class-Script.html#260-287" title="Go to source code">afficherAvancement</a>( <span>string <var>$message</var></span>, <span>integer <var>$depart</var> = <span class="php-num">0</span></span> )</code>
 
<div class="description short">
<p>Utiliser cette méthode dans une boucle pour afficher un message suivi du
nombre de tour de boucle effectué. Vous devrez vous même gérer le retour à
la ligne à la sortie de la boucle.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Utiliser cette méthode dans une boucle pour afficher un message suivi du
nombre de tour de boucle effectué. Vous devrez vous même gérer le retour à
la ligne à la sortie de la boucle.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$message</var></dt>
<dd><code>string</code><br>le message d'information.</dd>
<dt><var>$depart</var></dt>
<dd><code>integer</code><br>le nombre de départ à afficher.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code></code><br>le message est affiché dans la console.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
<table class="summary" id="constants">
<caption>Constants summary</caption>
<tr data-order="MSG_LOG" id="MSG_LOG">
 
<td class="attributes"><code>integer</code></td>
<td class="name"><code>
<a href="source-class-Script.html#19-20" title="Go to source code"><b>MSG_LOG</b></a>
</code></td>
<td class="value"><code><span class="php-num">0</span></code></td>
<td class="description"><div>
<a href="#MSG_LOG" class="anchor">#</a>
 
<div class="description short">
<p>Niveau de message de type LOG</p>
 
</div>
 
<div class="description detailed hidden">
<p>Niveau de message de type LOG</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="MSG_ERREUR" id="MSG_ERREUR">
 
<td class="attributes"><code>integer</code></td>
<td class="name"><code>
<a href="source-class-Script.html#21-22" title="Go to source code"><b>MSG_ERREUR</b></a>
</code></td>
<td class="value"><code><span class="php-num">1</span></code></td>
<td class="description"><div>
<a href="#MSG_ERREUR" class="anchor">#</a>
 
<div class="description short">
<p>Niveau de message de type ERREUR</p>
 
</div>
 
<div class="description detailed hidden">
<p>Niveau de message de type ERREUR</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="MSG_AVERTISSEMENT" id="MSG_AVERTISSEMENT">
 
<td class="attributes"><code>integer</code></td>
<td class="name"><code>
<a href="source-class-Script.html#23-24" title="Go to source code"><b>MSG_AVERTISSEMENT</b></a>
</code></td>
<td class="value"><code><span class="php-num">2</span></code></td>
<td class="description"><div>
<a href="#MSG_AVERTISSEMENT" class="anchor">#</a>
 
<div class="description short">
<p>Niveau de message de type AVERTISSEMENT</p>
 
</div>
 
<div class="description detailed hidden">
<p>Niveau de message de type AVERTISSEMENT</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="MSG_INFO" id="MSG_INFO">
 
<td class="attributes"><code>integer</code></td>
<td class="name"><code>
<a href="source-class-Script.html#25-26" title="Go to source code"><b>MSG_INFO</b></a>
</code></td>
<td class="value"><code><span class="php-num">3</span></code></td>
<td class="description"><div>
<a href="#MSG_INFO" class="anchor">#</a>
 
<div class="description short">
<p>Niveau de message de type INFORMATION</p>
 
</div>
 
<div class="description detailed hidden">
<p>Niveau de message de type INFORMATION</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="parametres_autorises" id="$parametres_autorises">
<td class="attributes"><code>
protected
array
</code></td>
 
<td class="name">
<a href="source-class-Script.html#54-67" title="Go to source code"><var>$parametres_autorises</var></a>
</td>
<td class="value"><code><span class="php-keyword1">null</span></code></td>
<td class="description"><div>
<a href="#$parametres_autorises" class="anchor">#</a>
 
<div class="description short">
<p>Paramêtres autorisés par le script. le tableau est de la forme suivante
:</p>
 
<ul>
<li>clé = nom du paramêtre '-foo'</li>
 
<li>value = contient un nouveau tableau composé de cette façon :
<ul>
<li>booléen: true si le paramêtre est obligatoire</li>
 
<li>booléen ou var : true si le paramêtre nécessite un valeur à sa suite ou
la valeur par défaut</li>
 
<li>string: description du contenu du paramêtre</li>
</ul>
</li>
</ul>
 
<p>Les paramêtres optionels devraient être déclaré à la fin du tableau. Le
dernier parametre du tableau peut avoir la valeur '...', il contiendra alors
l'ensemble des paramêtres suivant trouvés sur la ligne de commande.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Paramêtres autorisés par le script. le tableau est de la forme suivante
:</p>
 
<ul>
<li>clé = nom du paramêtre '-foo'</li>
 
<li>value = contient un nouveau tableau composé de cette façon : - booléen:
true si le paramêtre est obligatoire - booléen ou var : true si le paramêtre
nécessite un valeur à sa suite ou la valeur par défaut - string: description
du contenu du paramêtre</li>
</ul>
 
<p>Les paramêtres optionels devraient être déclaré à la fin du tableau. Le
dernier parametre du tableau peut avoir la valeur '...', il contiendra alors
l'ensemble des paramêtres suivant trouvés sur la ligne de commande.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="parametres" id="$parametres">
<td class="attributes"><code>
protected
array
</code></td>
 
<td class="name">
<a href="source-class-Script.html#78-85" title="Go to source code"><var>$parametres</var></a>
</td>
<td class="value"><code><span class="php-keyword1">null</span></code></td>
<td class="description"><div>
<a href="#$parametres" class="anchor">#</a>
 
<div class="description short">
<p>Contient le tableau des paramètres disponible après vérification : le
tableau est de la forme suivante :</p>
 
<ul>
<li>clé = nom du paramêtre '-foo'</li>
 
<li>valeur = la valeur récupérée sur la ligne de commande</li>
</ul>
 
</div>
 
<div class="description detailed hidden">
<p>Contient le tableau des paramètres disponible après vérification : le
tableau est de la forme suivante :</p>
 
<ul>
<li>clé = nom du paramêtre '-foo'</li>
 
<li>valeur = la valeur récupérée sur la ligne de commande</li>
</ul>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Encodage.html
New file
0,0 → 1,260
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Encodage | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li class="active"><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Chaine.html">Chaine</a></li>
<li class="active"><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Utilitaire.html" title="Summary of Utilitaire"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Encodage</h1>
 
 
<div class="description">
<p>Classe fournissant des méthodes statiques concernant l'encodage et le
décodage des caractères de variable.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Utilitaire.html">Utilitaire</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2009, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL-v3</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL-v2</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Encodage.php 299 2011-01-18 14:03:46Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Encodage.html#3-56" title="Go to source code">utilitaires/Encodage.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="encoderEnUtf8" id="_encoderEnUtf8">
 
<td class="attributes"><code>
public static
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_encoderEnUtf8">#</a>
<code><a href="source-class-Encodage.html#16-38" title="Go to source code">encoderEnUtf8</a>( <span>mixed <var>&amp; $variable</var></span>, <span>string <var>$encodage</var> = <span class="php-quote">'ISO-8859-15'</span></span> )</code>
 
<div class="description short">
<p>Méthode permettant d'encoder par défaut de ISO-8859-15 vers UTF-8 une
variable ou un tableau de variables.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Méthode permettant d'encoder par défaut de ISO-8859-15 vers UTF-8 une
variable ou un tableau de variables.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$variable</var></dt>
<dd><code>mixed</code><br>la chaine ou le tableau à encoder en UTF-8 depuis ISO-8859-15.</dd>
<dt><var>$encodage</var></dt>
<dd><code>string</code><br>l'encodage d'origine si ce n'est pas ISO-8859-15.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>la chaine ou le tableau encodé en UTF-8.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="detecterUtf8" id="_detecterUtf8">
 
<td class="attributes"><code>
public static
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_detecterUtf8">#</a>
<code><a href="source-class-Encodage.html#40-55" title="Go to source code">detecterUtf8</a>( <span>string <var>$chaine</var></span> )</code>
 
<div class="description short">
<p>Méthode permettant de détecter réellement l'encodage UTF-8.
mb_detect_encoding plante si la chaine de caractère se termine par un
caractère accentué. Provient de PHPDIG.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Méthode permettant de détecter réellement l'encodage UTF-8.
mb_detect_encoding plante si la chaine de caractère se termine par un
caractère accentué. Provient de PHPDIG.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$chaine</var></dt>
<dd><code>string</code><br>la chaine à vérifier.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true si c'est de UTF-8, sinon false.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Cli.html
New file
0,0 → 1,226
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Cli | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li class="active"><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Cli</h1>
 
 
<div class="description">
<p>CLI permet de récupérer les paramètres passés en ligne de commande pour
instancier une classe héritant de la classe abstraite Script. Elle va
déclencher l'éxecution du script via l'appel de la méthode executer(). C'est
une Singleton.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL-v3</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL-v2</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Author:</b>
Delphine CAUQUIL &lt;<a
href="mailto:delphine&#64;tela-botanica.org">delphine&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Cli.php 386 2011-10-28 15:56:25Z jpm $<br>
<b>Since:</b>
0.3<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Cli.html#4-107" title="Go to source code">Cli.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="executer" id="_executer">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_executer">#</a>
<code><a href="source-class-Cli.html#27-57" title="Go to source code">executer</a>( )</code>
 
<div class="description short">
<p>Execute la ligne de commande en récupérant le nom du script à lancer et
ses paramètres. Instancie la classe du script à lancer et appelle la méthode
executer().</p>
 
</div>
 
<div class="description detailed hidden">
<p>Execute la ligne de commande en récupérant le nom du script à lancer et
ses paramètres. Instancie la classe du script à lancer et appelle la méthode
executer().</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-CacheSimple.html
New file
0,0 → 1,295
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class CacheSimple | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li class="active"><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class CacheSimple</h1>
 
 
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://framework.zend.com/license/new-bsd">Licence New BSD</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Author:</b>
Aurélien PERONNET &lt;<a
href="mailto:aurelien&#64;tela-botanica.org">aurelien&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Located at</b> <a href="source-class-CacheSimple.html#23-123" title="Go to source code">CacheSimple.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-CacheSimple.html#35-62" title="Go to source code">__construct</a>( <span>mixed <var>$options</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="charger" id="_charger">
 
<td class="attributes"><code>
public
string|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_charger">#</a>
<code><a href="source-class-CacheSimple.html#72-87" title="Go to source code">charger</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Teste si le cache est disponible pour l'id donné et (si oui) le retourne
(sinon renvoie false)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Teste si le cache est disponible pour l'id donné et (si oui) le retourne
(sinon renvoie false)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id l'identifiant du Cache.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string|false</code><br>les données en cache.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="sauver" id="_sauver">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_sauver">#</a>
<code><a href="source-class-CacheSimple.html#89-122" title="Go to source code">sauver</a>( <span>string <var>$contenu</var></span>, <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Sauvegarde la chaine de données dans un fichier texte.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Sauvegarde la chaine de données dans un fichier texte.</p>
 
<p>Note : $contenu est toujours de type "string". C'est à vous de gérer la
sérialisation.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$contenu</var></dt>
<dd><code>string</code><br>$contenu les données à mettre en cache.</dd>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id l'identifiant du Cache.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true si aucun problème<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-I18n.html
New file
0,0 → 1,351
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File I18n.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li class="active"><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-I18n.html" title="Summary of I18n"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * I18n permet de traduire une application à partir de données stockées dans des fichiers ini.
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * Si vous souhaitez utiliser le fonctionnement par défaut vous devrez :
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * - déposer les fichiers ini dans le dossier définit par la variable de config &quot;chemin_i18n&quot;.
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * - nommer les fichiers selon la forme &quot;locale.ini&quot; (Ex.: fr.ini ou fr_CH.ini ).
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> *
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * Elle offre l'accès en lecture seule aux paramètres des fichiers ini.
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * C'est une Singleton. Une seule classe de traduction peut être instanciée par Application.
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> *
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @package Framework
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
</span></span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-comment"> * @since 0.3
</span></span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-comment"> * @version $Id: I18n.php 330 2011-02-24 18:03:07Z jpm $
</span></span><span id="20" class="l"><a class="l" href="#20"> 20: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="21" class="l"><a class="l" href="#21"> 21: </a><span class="php-comment"> */</span>
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a><span class="php-keyword1">class</span> <a id="I18n" href="#I18n">I18n</a> {
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> <span class="php-comment">/** Format de traduction utilisant les fichier .ini */</span>
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a> <span class="php-keyword1">const</span> <a id="FORMAT_INI" href="#FORMAT_INI">FORMAT_INI</a> = <span class="php-quote">'.ini'</span>;
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a>
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-comment">/** Instance de la classe pointant sur elle même (pour le pattern singleton) */</span>
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$instance" href="#$instance">$instance</a></span> = <span class="php-keyword1">null</span>;
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a>
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-comment">/** Fichiers de traduction disponibles. */</span>
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$traductions" href="#$traductions">$traductions</a></span> = <span class="php-keyword1">array</span>();
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a>
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-comment">/** Langue courrante utilisée par l'application. */</span>
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$langue" href="#$langue">$langue</a></span> = <span class="php-keyword1">null</span>;
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a>
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-comment">/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/</span>
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$parametres_obligatoires" href="#$parametres_obligatoires">$parametres_obligatoires</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'chemin_i18n'</span>, <span class="php-quote">'i18n_url_parametre'</span>, <span class="php-quote">'i18n_langue_defaut'</span>, <span class="php-quote">'debogage'</span>);
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a>
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>() {
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a> Config::verifierPresenceParametres(self::<span class="php-var">$parametres_obligatoires</span>);
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> self::trouverLangue();
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a> }
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a>
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a> <span class="php-comment">/**
</span></span><span id="44" class="l"><a class="l" href="#44"> 44: </a><span class="php-comment"> * Accesseur pour la valeur d'une traduction
</span></span><span id="45" class="l"><a class="l" href="#45"> 45: </a><span class="php-comment"> * @param string $param le nom du paramètre
</span></span><span id="46" class="l"><a class="l" href="#46"> 46: </a><span class="php-comment"> * @return string la valeur du paramètre
</span></span><span id="47" class="l"><a class="l" href="#47"> 47: </a><span class="php-comment"> */</span>
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_get" href="#_get">get</a>(<span class="php-var">$identifiant</span>, <span class="php-var">$langue</span> = <span class="php-keyword1">null</span>) {
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> self::verifierCreationInstance();
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> <span class="php-var">$texte</span> = <span class="php-quote">''</span>;
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a>
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> <span class="php-comment">// Récupération de la langue actuellement demandée</span>
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a> <span class="php-var">$langue_a_charger</span> = self::<span class="php-var">$langue</span>;
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword2">is_null</span>(<span class="php-var">$langue</span>)) {
</span><span id="55" class="l"><a class="l" href="#55"> 55: </a> <span class="php-var">$langue_a_charger</span> = <span class="php-var">$langue</span>;
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> }
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a>
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword1">isset</span>(self::<span class="php-var">$traductions</span>[<span class="php-var">$langue_a_charger</span>])) {
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-comment">// Tentative de chargement du fichier de traduction</span>
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> <span class="php-var">$chargement</span> = self::charger(<span class="php-var">$langue_a_charger</span>);
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> <span class="php-keyword1">if</span> (<span class="php-var">$chargement</span> === <span class="php-keyword1">false</span>) {
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> <span class="php-var">$m</span> = <span class="php-quote">&quot;Le fichier d'i18n pour la langue '</span><span class="php-var">$langue_a_charger</span><span class="php-quote">' demandée n'a pas été trouvé.&quot;</span>;
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a> self::ajouterErreur(<span class="php-var">$m</span>);
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> }
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> }
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a>
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> <span class="php-comment">// Recherche de la langue dans le tableau des traductions</span>
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(self::<span class="php-var">$traductions</span>[<span class="php-var">$langue_a_charger</span>]) &amp;&amp; self::<span class="php-var">$traductions</span>[<span class="php-var">$langue_a_charger</span>] !== <span class="php-keyword1">false</span>) {
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> <span class="php-comment">// Recherche de la traduction demandée</span>
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a> <span class="php-var">$valeur</span> = self::getValeur(<span class="php-var">$identifiant</span>, self::<span class="php-var">$traductions</span>[<span class="php-var">$langue_a_charger</span>]);
</span><span id="71" class="l"><a class="l" href="#71"> 71: </a> <span class="php-keyword1">if</span> (<span class="php-var">$valeur</span> !== <span class="php-keyword1">false</span>) {
</span><span id="72" class="l"><a class="l" href="#72"> 72: </a> <span class="php-var">$texte</span> = <span class="php-var">$valeur</span>;
</span><span id="73" class="l"><a class="l" href="#73"> 73: </a> } <span class="php-keyword1">else</span> {
</span><span id="74" class="l"><a class="l" href="#74"> 74: </a> <span class="php-var">$m</span> = <span class="php-quote">&quot;Le traduction n'existe pas pour l'identifiant '</span><span class="php-var">$identifiant</span><span class="php-quote">' demandé.&quot;</span>;
</span><span id="75" class="l"><a class="l" href="#75"> 75: </a> self::ajouterErreur(<span class="php-var">$m</span>);
</span><span id="76" class="l"><a class="l" href="#76"> 76: </a> }
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> }
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a>
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a> <span class="php-keyword1">return</span> <span class="php-var">$texte</span>;
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> }
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a>
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> <span class="php-comment">/**
</span></span><span id="83" class="l"><a class="l" href="#83"> 83: </a><span class="php-comment"> * Charge un fichier ini dans le tableau des paramètres de l'appli
</span></span><span id="84" class="l"><a class="l" href="#84"> 84: </a><span class="php-comment"> * @param string $fichier_ini le nom du fichier à charger
</span></span><span id="85" class="l"><a class="l" href="#85"> 85: </a><span class="php-comment"> * @return boolean true, si le fichier a été trouvé et correctement chargé, sinon false.
</span></span><span id="86" class="l"><a class="l" href="#86"> 86: </a><span class="php-comment"> */</span>
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_charger" href="#_charger">charger</a>(<span class="php-var">$langue</span>, <span class="php-var">$fichier</span> = <span class="php-keyword1">null</span>, <span class="php-var">$format</span> = self::FORMAT_INI) {
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a> self::verifierCreationInstance();
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a> <span class="php-var">$ok</span> = <span class="php-keyword1">false</span>;
</span><span id="90" class="l"><a class="l" href="#90"> 90: </a>
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> <span class="php-comment">// Création du chemin vers le fichier de traduction par défaut</span>
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_null</span>(<span class="php-var">$fichier</span>)) {
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-var">$fichier</span> = Config::get(<span class="php-quote">'chemin_i18n'</span>).<span class="php-var">$langue</span>.<span class="php-var">$format</span>;
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> }
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a>
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> <span class="php-comment">// Chargement </span>
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> <span class="php-keyword1">if</span> (<span class="php-var">$format</span> == self::FORMAT_INI) {
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-var">$ok</span> = self::chargerFichierIni(<span class="php-var">$fichier</span>, <span class="php-var">$langue</span>);
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> } <span class="php-keyword1">else</span> {
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-var">$m</span> = <span class="php-quote">&quot;Le format '</span><span class="php-var">$format</span><span class="php-quote">' de fichier de traduction n'est pas pris en compte par le Framework.&quot;</span>;
</span><span id="101" class="l"><a class="l" href="#101">101: </a> self::ajouterErreur(<span class="php-var">$m</span>);
</span><span id="102" class="l"><a class="l" href="#102">102: </a> }
</span><span id="103" class="l"><a class="l" href="#103">103: </a>
</span><span id="104" class="l"><a class="l" href="#104">104: </a> <span class="php-keyword1">return</span> <span class="php-var">$ok</span>;
</span><span id="105" class="l"><a class="l" href="#105">105: </a> }
</span><span id="106" class="l"><a class="l" href="#106">106: </a>
</span><span id="107" class="l"><a class="l" href="#107">107: </a> <span class="php-comment">/**
</span></span><span id="108" class="l"><a class="l" href="#108">108: </a><span class="php-comment"> * Définit la langue utiliser pour rechercher une traduction.
</span></span><span id="109" class="l"><a class="l" href="#109">109: </a><span class="php-comment"> * @param string $fichier_ini le nom du fichier à charger
</span></span><span id="110" class="l"><a class="l" href="#110">110: </a><span class="php-comment"> * @return array le fichier ini parsé
</span></span><span id="111" class="l"><a class="l" href="#111">111: </a><span class="php-comment"> */</span>
</span><span id="112" class="l"><a class="l" href="#112">112: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_setLangue" href="#_setLangue">setLangue</a>(<span class="php-var">$langue</span>) {
</span><span id="113" class="l"><a class="l" href="#113">113: </a> self::verifierCreationInstance();
</span><span id="114" class="l"><a class="l" href="#114">114: </a> self::<span class="php-var">$langue</span> = <span class="php-var">$langue</span>;
</span><span id="115" class="l"><a class="l" href="#115">115: </a> }
</span><span id="116" class="l"><a class="l" href="#116">116: </a>
</span><span id="117" class="l"><a class="l" href="#117">117: </a> <span class="php-comment">/**
</span></span><span id="118" class="l"><a class="l" href="#118">118: </a><span class="php-comment"> * Renvoie la valeur demandé grâce une chaine de paramètres
</span></span><span id="119" class="l"><a class="l" href="#119">119: </a><span class="php-comment"> * @param string $param la chaine identifiante
</span></span><span id="120" class="l"><a class="l" href="#120">120: </a><span class="php-comment"> * @param array $i18n le tableau de traductions
</span></span><span id="121" class="l"><a class="l" href="#121">121: </a><span class="php-comment"> * @return mixed la valeur correspondante à la chaine identifiante si elle est trouvée, sinon false.
</span></span><span id="122" class="l"><a class="l" href="#122">122: </a><span class="php-comment"> */</span>
</span><span id="123" class="l"><a class="l" href="#123">123: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getValeur" href="#_getValeur">getValeur</a>(<span class="php-var">$param</span>, <span class="php-var">$i18n</span>) {
</span><span id="124" class="l"><a class="l" href="#124">124: </a> <span class="php-keyword1">if</span> (<span class="php-var">$param</span> === <span class="php-keyword1">null</span>) {
</span><span id="125" class="l"><a class="l" href="#125">125: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="126" class="l"><a class="l" href="#126">126: </a> } <span class="php-keyword1">else</span> {
</span><span id="127" class="l"><a class="l" href="#127">127: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$i18n</span>[<span class="php-var">$param</span>])) {
</span><span id="128" class="l"><a class="l" href="#128">128: </a> <span class="php-keyword1">return</span> <span class="php-var">$i18n</span>[<span class="php-var">$param</span>];
</span><span id="129" class="l"><a class="l" href="#129">129: </a> } <span class="php-keyword1">else</span> <span class="php-keyword1">if</span> (<span class="php-keyword2">strpos</span>(<span class="php-var">$param</span>, <span class="php-quote">'.'</span>) !== <span class="php-keyword1">false</span>) {
</span><span id="130" class="l"><a class="l" href="#130">130: </a> <span class="php-var">$pieces</span> = <span class="php-keyword2">explode</span>(<span class="php-quote">'.'</span>, <span class="php-var">$param</span>, <span class="php-num">2</span>);
</span><span id="131" class="l"><a class="l" href="#131">131: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">strlen</span>(<span class="php-var">$pieces</span>[<span class="php-num">0</span>]) &amp;&amp; <span class="php-keyword2">strlen</span>(<span class="php-var">$pieces</span>[<span class="php-num">1</span>])) {
</span><span id="132" class="l"><a class="l" href="#132">132: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$i18n</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]])) {
</span><span id="133" class="l"><a class="l" href="#133">133: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$i18n</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]])) {
</span><span id="134" class="l"><a class="l" href="#134">134: </a> <span class="php-keyword1">return</span> self::getValeur(<span class="php-var">$pieces</span>[<span class="php-num">1</span>], <span class="php-var">$i18n</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]]);
</span><span id="135" class="l"><a class="l" href="#135">135: </a> }
</span><span id="136" class="l"><a class="l" href="#136">136: </a> }
</span><span id="137" class="l"><a class="l" href="#137">137: </a> }
</span><span id="138" class="l"><a class="l" href="#138">138: </a> } <span class="php-keyword1">else</span> {
</span><span id="139" class="l"><a class="l" href="#139">139: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">false</span>;
</span><span id="140" class="l"><a class="l" href="#140">140: </a> }
</span><span id="141" class="l"><a class="l" href="#141">141: </a> }
</span><span id="142" class="l"><a class="l" href="#142">142: </a> }
</span><span id="143" class="l"><a class="l" href="#143">143: </a>
</span><span id="144" class="l"><a class="l" href="#144">144: </a> <span class="php-comment">/**
</span></span><span id="145" class="l"><a class="l" href="#145">145: </a><span class="php-comment"> * Parse le fichier ini donné en paramètre
</span></span><span id="146" class="l"><a class="l" href="#146">146: </a><span class="php-comment"> * @param string $fichier_ini nom du fichier ini à parser
</span></span><span id="147" class="l"><a class="l" href="#147">147: </a><span class="php-comment"> * @param string $langue la langue correspondant au fichier
</span></span><span id="148" class="l"><a class="l" href="#148">148: </a><span class="php-comment"> * @return boolean true si le chargement c'est bien passé, sinon false.
</span></span><span id="149" class="l"><a class="l" href="#149">149: </a><span class="php-comment"> */</span>
</span><span id="150" class="l"><a class="l" href="#150">150: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_chargerFichierIni" href="#_chargerFichierIni">chargerFichierIni</a>(<span class="php-var">$fichier_ini</span>, <span class="php-var">$langue</span>) {
</span><span id="151" class="l"><a class="l" href="#151">151: </a> self::<span class="php-var">$traductions</span>[<span class="php-var">$langue</span>] = <span class="php-keyword1">false</span>;
</span><span id="152" class="l"><a class="l" href="#152">152: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">file_exists</span>(<span class="php-var">$fichier_ini</span>)) {
</span><span id="153" class="l"><a class="l" href="#153">153: </a> <span class="php-var">$ini</span> = <span class="php-keyword2">parse_ini_file</span>(<span class="php-var">$fichier_ini</span>, <span class="php-keyword1">true</span>);
</span><span id="154" class="l"><a class="l" href="#154">154: </a> <span class="php-var">$ini</span> = self::analyserTableauIni(<span class="php-var">$ini</span>);
</span><span id="155" class="l"><a class="l" href="#155">155: </a> self::<span class="php-var">$traductions</span>[<span class="php-var">$langue</span>] = <span class="php-var">$ini</span>;
</span><span id="156" class="l"><a class="l" href="#156">156: </a> }
</span><span id="157" class="l"><a class="l" href="#157">157: </a> <span class="php-keyword1">return</span> (self::<span class="php-var">$traductions</span>[<span class="php-var">$langue</span>] === <span class="php-keyword1">false</span>) ? <span class="php-keyword1">false</span> : <span class="php-keyword1">true</span>;
</span><span id="158" class="l"><a class="l" href="#158">158: </a> }
</span><span id="159" class="l"><a class="l" href="#159">159: </a>
</span><span id="160" class="l"><a class="l" href="#160">160: </a> <span class="php-comment">/**
</span></span><span id="161" class="l"><a class="l" href="#161">161: </a><span class="php-comment"> * Analyse un tableau de traductions pour évaluer les clés.
</span></span><span id="162" class="l"><a class="l" href="#162">162: </a><span class="php-comment"> * @param array $i18n le tableau de traductions
</span></span><span id="163" class="l"><a class="l" href="#163">163: </a><span class="php-comment"> * @return array le tableau analysé et modifié si nécessaire.
</span></span><span id="164" class="l"><a class="l" href="#164">164: </a><span class="php-comment"> */</span>
</span><span id="165" class="l"><a class="l" href="#165">165: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_analyserTableauIni" href="#_analyserTableauIni">analyserTableauIni</a>(<span class="php-var">$i18n</span> = <span class="php-keyword1">array</span>()) {
</span><span id="166" class="l"><a class="l" href="#166">166: </a> <span class="php-comment">//ATTENTION : il est important de passer la valeur par référence car nous la modifions dynamiquement dans la boucle</span>
</span><span id="167" class="l"><a class="l" href="#167">167: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$i18n</span> <span class="php-keyword1">as</span> <span class="php-var">$cle</span> =&gt; &amp;<span class="php-var">$valeur</span>) {
</span><span id="168" class="l"><a class="l" href="#168">168: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_array</span>(<span class="php-var">$valeur</span>)) {
</span><span id="169" class="l"><a class="l" href="#169">169: </a> <span class="php-var">$i18n</span>[<span class="php-var">$cle</span>] = self::analyserTableauIni(<span class="php-var">$valeur</span>);
</span><span id="170" class="l"><a class="l" href="#170">170: </a> } <span class="php-keyword1">else</span> {
</span><span id="171" class="l"><a class="l" href="#171">171: </a> <span class="php-var">$i18n</span> = self::evaluerCle(<span class="php-var">$i18n</span>, <span class="php-var">$cle</span>, <span class="php-var">$valeur</span>);
</span><span id="172" class="l"><a class="l" href="#172">172: </a> }
</span><span id="173" class="l"><a class="l" href="#173">173: </a> }
</span><span id="174" class="l"><a class="l" href="#174">174: </a> <span class="php-keyword1">return</span> <span class="php-var">$i18n</span>;
</span><span id="175" class="l"><a class="l" href="#175">175: </a> }
</span><span id="176" class="l"><a class="l" href="#176">176: </a>
</span><span id="177" class="l"><a class="l" href="#177">177: </a> <span class="php-comment">/**
</span></span><span id="178" class="l"><a class="l" href="#178">178: </a><span class="php-comment"> * Dans le cas des chaines de traduction à sous clé (ex.: cle.souscle), cette méthode
</span></span><span id="179" class="l"><a class="l" href="#179">179: </a><span class="php-comment"> * évalue les valeurs correspondantes et créée les sous tableaux associés.
</span></span><span id="180" class="l"><a class="l" href="#180">180: </a><span class="php-comment"> * @param array $i18n tableau de traductions (par référence)
</span></span><span id="181" class="l"><a class="l" href="#181">181: </a><span class="php-comment"> * @param string $cle la cle dans le tableau
</span></span><span id="182" class="l"><a class="l" href="#182">182: </a><span class="php-comment"> * @param string $valeur la valeur à affecter
</span></span><span id="183" class="l"><a class="l" href="#183">183: </a><span class="php-comment"> */</span>
</span><span id="184" class="l"><a class="l" href="#184">184: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_evaluerCle" href="#_evaluerCle">evaluerCle</a>(<span class="php-var">$i18n</span>, <span class="php-var">$cle</span>, <span class="php-var">$valeur</span>) {
</span><span id="185" class="l"><a class="l" href="#185">185: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">strpos</span>(<span class="php-var">$cle</span>, <span class="php-quote">'.'</span>) !== <span class="php-keyword1">false</span>) {
</span><span id="186" class="l"><a class="l" href="#186">186: </a> <span class="php-keyword1">unset</span>(<span class="php-var">$i18n</span>[<span class="php-var">$cle</span>]);
</span><span id="187" class="l"><a class="l" href="#187">187: </a> <span class="php-var">$pieces</span> = <span class="php-keyword2">explode</span>(<span class="php-quote">'.'</span>, <span class="php-var">$cle</span>, <span class="php-num">2</span>);
</span><span id="188" class="l"><a class="l" href="#188">188: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">strlen</span>(<span class="php-var">$pieces</span>[<span class="php-num">0</span>]) &amp;&amp; <span class="php-keyword2">strlen</span>(<span class="php-var">$pieces</span>[<span class="php-num">1</span>])) {
</span><span id="189" class="l"><a class="l" href="#189">189: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$i18n</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]]) &amp;&amp; !<span class="php-keyword2">is_array</span>(<span class="php-var">$i18n</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]])) {
</span><span id="190" class="l"><a class="l" href="#190">190: </a> <span class="php-var">$m</span> = <span class="php-quote">&quot;Ne peut pas créer de sous-clé pour '</span><span class="php-var">{$pieces[0]}</span><span class="php-quote">' car la clé existe déjà&quot;</span>;
</span><span id="191" class="l"><a class="l" href="#191">191: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$m</span>, E_USER_WARNING);
</span><span id="192" class="l"><a class="l" href="#192">192: </a> } <span class="php-keyword1">else</span> {
</span><span id="193" class="l"><a class="l" href="#193">193: </a> <span class="php-var">$i18n</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]][<span class="php-var">$pieces</span>[<span class="php-num">1</span>]] = <span class="php-var">$valeur</span>;
</span><span id="194" class="l"><a class="l" href="#194">194: </a> <span class="php-var">$i18n</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]] = self::evaluerCle(<span class="php-var">$i18n</span>[<span class="php-var">$pieces</span>[<span class="php-num">0</span>]], <span class="php-var">$pieces</span>[<span class="php-num">1</span>], <span class="php-var">$valeur</span>);
</span><span id="195" class="l"><a class="l" href="#195">195: </a> }
</span><span id="196" class="l"><a class="l" href="#196">196: </a> } <span class="php-keyword1">else</span> {
</span><span id="197" class="l"><a class="l" href="#197">197: </a> <span class="php-var">$m</span> = <span class="php-quote">&quot;Clé invalide '</span><span class="php-var">$cle</span><span class="php-quote">'&quot;</span>;
</span><span id="198" class="l"><a class="l" href="#198">198: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$m</span>, E_USER_WARNING);
</span><span id="199" class="l"><a class="l" href="#199">199: </a> }
</span><span id="200" class="l"><a class="l" href="#200">200: </a> } <span class="php-keyword1">else</span> {
</span><span id="201" class="l"><a class="l" href="#201">201: </a> <span class="php-var">$i18n</span>[<span class="php-var">$cle</span>] = <span class="php-var">$valeur</span>;
</span><span id="202" class="l"><a class="l" href="#202">202: </a> }
</span><span id="203" class="l"><a class="l" href="#203">203: </a> <span class="php-keyword1">return</span> <span class="php-var">$i18n</span>;
</span><span id="204" class="l"><a class="l" href="#204">204: </a> }
</span><span id="205" class="l"><a class="l" href="#205">205: </a>
</span><span id="206" class="l"><a class="l" href="#206">206: </a> <span class="php-comment">/**
</span></span><span id="207" class="l"><a class="l" href="#207">207: </a><span class="php-comment"> * Cherche l'information sur la langue demandée par l'application
</span></span><span id="208" class="l"><a class="l" href="#208">208: </a><span class="php-comment"> */</span>
</span><span id="209" class="l"><a class="l" href="#209">209: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_trouverLangue" href="#_trouverLangue">trouverLangue</a>() {
</span><span id="210" class="l"><a class="l" href="#210">210: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$_GET</span>[Config::get(<span class="php-quote">'i18n_url_parametre'</span>)])) {
</span><span id="211" class="l"><a class="l" href="#211">211: </a> self::<span class="php-var">$langue</span> = <span class="php-var">$_GET</span>[Config::get(<span class="php-quote">'i18n_url_parametre'</span>)];
</span><span id="212" class="l"><a class="l" href="#212">212: </a> } <span class="php-keyword1">else</span> {
</span><span id="213" class="l"><a class="l" href="#213">213: </a> self::<span class="php-var">$langue</span> = Config::get(<span class="php-quote">'i18n_langue_defaut'</span>);
</span><span id="214" class="l"><a class="l" href="#214">214: </a> }
</span><span id="215" class="l"><a class="l" href="#215">215: </a> }
</span><span id="216" class="l"><a class="l" href="#216">216: </a>
</span><span id="217" class="l"><a class="l" href="#217">217: </a> <span class="php-comment">/**
</span></span><span id="218" class="l"><a class="l" href="#218">218: </a><span class="php-comment"> * Vérifie si l'instance de classe à été crée, si non la crée
</span></span><span id="219" class="l"><a class="l" href="#219">219: </a><span class="php-comment"> */</span>
</span><span id="220" class="l"><a class="l" href="#220">220: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_verifierCreationInstance" href="#_verifierCreationInstance">verifierCreationInstance</a>() {
</span><span id="221" class="l"><a class="l" href="#221">221: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">empty</span>(self::<span class="php-var">$instance</span>)) {
</span><span id="222" class="l"><a class="l" href="#222">222: </a> self::<span class="php-var">$instance</span> = <span class="php-keyword1">new</span> I18n();
</span><span id="223" class="l"><a class="l" href="#223">223: </a> }
</span><span id="224" class="l"><a class="l" href="#224">224: </a> }
</span><span id="225" class="l"><a class="l" href="#225">225: </a>
</span><span id="226" class="l"><a class="l" href="#226">226: </a> <span class="php-comment">/**
</span></span><span id="227" class="l"><a class="l" href="#227">227: </a><span class="php-comment"> * Ajouter une message d'erreur
</span></span><span id="228" class="l"><a class="l" href="#228">228: </a><span class="php-comment"> */</span>
</span><span id="229" class="l"><a class="l" href="#229">229: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_ajouterErreur" href="#_ajouterErreur">ajouterErreur</a>(<span class="php-var">$m</span>, <span class="php-var">$e</span> = E_USER_WARNING) {
</span><span id="230" class="l"><a class="l" href="#230">230: </a> <span class="php-keyword1">if</span> (Config::get(<span class="php-quote">'debogage'</span>) === <span class="php-keyword1">true</span>) {
</span><span id="231" class="l"><a class="l" href="#231">231: </a> <span class="php-keyword2">trigger_error</span>(<span class="php-var">$m</span>, <span class="php-var">$e</span>);
</span><span id="232" class="l"><a class="l" href="#232">232: </a> }
</span><span id="233" class="l"><a class="l" href="#233">233: </a> }
</span><span id="234" class="l"><a class="l" href="#234">234: </a>}
</span><span id="235" class="l"><a class="l" href="#235">235: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-I18n.html
New file
0,0 → 1,356
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class I18n | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li class="active"><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class I18n</h1>
 
 
<div class="description">
<p>I18n permet de traduire une application à partir de données stockées dans
des fichiers ini. Si vous souhaitez utiliser le fonctionnement par défaut vous
devrez :</p>
 
<ul>
<li>déposer les fichiers ini dans le dossier définit par la variable de config
"chemin_i18n".</li>
 
<li>nommer les fichiers selon la forme "locale.ini" (Ex.: fr.ini ou fr_CH.ini
).</li>
</ul>
 
<p>Elle offre l'accès en lecture seule aux paramètres des fichiers ini. C'est
une Singleton. Une seule classe de traduction peut être instanciée par
Application.</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a><br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: I18n.php 330 2011-02-24 18:03:07Z jpm $<br>
<b>Since:</b>
0.3<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-I18n.html#3-234" title="Go to source code">I18n.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="get" id="_get">
 
<td class="attributes"><code>
public static
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_get">#</a>
<code><a href="source-class-I18n.html#43-80" title="Go to source code">get</a>( <span>string <var>$identifiant</var></span>, <span>mixed <var>$langue</var> = <span class="php-keyword1">null</span></span> )</code>
 
<div class="description short">
<p>Accesseur pour la valeur d'une traduction</p>
 
</div>
 
<div class="description detailed hidden">
<p>Accesseur pour la valeur d'une traduction</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$identifiant</var></dt>
<dd><code>string</code><br>$param le nom du paramètre</dd>
<dt><var>$langue</var></dt>
<dd></dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>la valeur du paramètre<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="charger" id="_charger">
 
<td class="attributes"><code>
public static
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_charger">#</a>
<code><a href="source-class-I18n.html#82-105" title="Go to source code">charger</a>( <span>string <var>$langue</var></span>, <span>mixed <var>$fichier</var> = <span class="php-keyword1">null</span></span>, <span>mixed <var>$format</var> = <code><a href="class-I18n.html#FORMAT_INI">I18n::<b>FORMAT_INI</b></a></code></span> )</code>
 
<div class="description short">
<p>Charge un fichier ini dans le tableau des paramètres de l'appli</p>
 
</div>
 
<div class="description detailed hidden">
<p>Charge un fichier ini dans le tableau des paramètres de l'appli</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$langue</var></dt>
<dd><code>string</code><br>$fichier_ini le nom du fichier à charger</dd>
<dt><var>$fichier</var></dt>
<dd></dd>
<dt><var>$format</var></dt>
<dd></dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true, si le fichier a été trouvé et correctement chargé, sinon false.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setLangue" id="_setLangue">
 
<td class="attributes"><code>
public static
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setLangue">#</a>
<code><a href="source-class-I18n.html#107-115" title="Go to source code">setLangue</a>( <span>string <var>$langue</var></span> )</code>
 
<div class="description short">
<p>Définit la langue utiliser pour rechercher une traduction.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Définit la langue utiliser pour rechercher une traduction.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$langue</var></dt>
<dd><code>string</code><br>$fichier_ini le nom du fichier à charger</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>le fichier ini parsé<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
<table class="summary" id="constants">
<caption>Constants summary</caption>
<tr data-order="FORMAT_INI" id="FORMAT_INI">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-I18n.html#23-24" title="Go to source code"><b>FORMAT_INI</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'.ini'</span></code></td>
<td class="description"><div>
<a href="#FORMAT_INI" class="anchor">#</a>
 
<div class="description short">
<p>Format de traduction utilisant les fichier .ini</p>
 
</div>
 
<div class="description detailed hidden">
<p>Format de traduction utilisant les fichier .ini</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Chronometre.html
New file
0,0 → 1,254
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Chronometre.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li class="active"><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Chronometre.html" title="Summary of Chronometre"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/** Chronometre permet de stocker et d'afficher les temps d'éxécution de script.
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> *
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * Cette classe permet de réaliser un ensemble de mesure de temps prises à différents endroits d'un script.
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * Ces mesures peuvent ensuite être affichées au sein d'un tableau XHTML.
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> *
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @package Framework
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @version $Id: Chronometre.php 327 2011-02-08 17:54:34Z jpm $
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> */</span>
</span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-keyword1">class</span> <a id="Chronometre" href="#Chronometre">Chronometre</a> {
</span><span id="18" class="l"><a class="l" href="#18"> 18: </a> <span class="php-comment">/*** Attributs : ***/</span>
</span><span id="19" class="l"><a class="l" href="#19"> 19: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$pointArretNumero" href="#$pointArretNumero">$pointArretNumero</a></span> = <span class="php-num">1</span>;
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$temps" href="#$temps">$temps</a></span> = <span class="php-keyword1">array</span>();
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a>
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a> <span class="php-comment">/** Accesseurs :
</span></span><span id="23" class="l"><a class="l" href="#23"> 23: </a><span class="php-comment"> *
</span></span><span id="24" class="l"><a class="l" href="#24"> 24: </a><span class="php-comment"> * @param string $cle la cle associée à un chronomètre particulier
</span></span><span id="25" class="l"><a class="l" href="#25"> 25: </a><span class="php-comment"> *
</span></span><span id="26" class="l"><a class="l" href="#26"> 26: </a><span class="php-comment"> * @return int le temps écoulé
</span></span><span id="27" class="l"><a class="l" href="#27"> 27: </a><span class="php-comment"> */</span>
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getTemps" href="#_getTemps">getTemps</a>(<span class="php-var">$cle</span> = <span class="php-keyword1">null</span>) {
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_null</span>(<span class="php-var">$cle</span>)) {
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a> <span class="php-var">$temps</span> = self::<span class="php-var">$temps</span>;
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a> } <span class="php-keyword1">else</span> {
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-keyword1">foreach</span> (self::<span class="php-var">$temps</span> <span class="php-keyword1">as</span> <span class="php-var">$temps_enrg</span>) {
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a> <span class="php-keyword1">if</span> (<span class="php-keyword1">isset</span>(<span class="php-var">$temps_enrg</span>[<span class="php-var">$cle</span>])) {
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a> <span class="php-var">$temps</span> = <span class="php-var">$temps_enrg</span>;
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-keyword1">break</span>;
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a> }
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a> }
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a> }
</span><span id="39" class="l"><a class="l" href="#39"> 39: </a> <span class="php-keyword1">return</span> <span class="php-var">$temps</span>;
</span><span id="40" class="l"><a class="l" href="#40"> 40: </a> }
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a>
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a> <span class="php-comment">/** Setteur pour la variable temps
</span></span><span id="43" class="l"><a class="l" href="#43"> 43: </a><span class="php-comment"> *
</span></span><span id="44" class="l"><a class="l" href="#44"> 44: </a><span class="php-comment"> * @param array() $moment ajoute des points de chronométrage au tableau _temps
</span></span><span id="45" class="l"><a class="l" href="#45"> 45: </a><span class="php-comment"> *
</span></span><span id="46" class="l"><a class="l" href="#46"> 46: </a><span class="php-comment"> * @return null
</span></span><span id="47" class="l"><a class="l" href="#47"> 47: </a><span class="php-comment"> */</span>
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_setTemps" href="#_setTemps">setTemps</a>(<span class="php-var">$cle</span>, <span class="php-var">$moment</span>) {
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-keyword2">array_push</span>(self::<span class="php-var">$temps</span>, <span class="php-keyword1">array</span>(<span class="php-var">$cle</span> =&gt; <span class="php-var">$moment</span>));
</span><span id="50" class="l"><a class="l" href="#50"> 50: </a> }
</span><span id="51" class="l"><a class="l" href="#51"> 51: </a>
</span><span id="52" class="l"><a class="l" href="#52"> 52: </a> <span class="php-comment">/*** Méthodes : ***/</span>
</span><span id="53" class="l"><a class="l" href="#53"> 53: </a>
</span><span id="54" class="l"><a class="l" href="#54"> 54: </a> <span class="php-comment">/**
</span></span><span id="55" class="l"><a class="l" href="#55"> 55: </a><span class="php-comment"> * Effectue un chronometrage.
</span></span><span id="56" class="l"><a class="l" href="#56"> 56: </a><span class="php-comment"> * Vous pouvez indiquer le nom du point de chronométrage.
</span></span><span id="57" class="l"><a class="l" href="#57"> 57: </a><span class="php-comment"> * Si vous n'indiquez rien, un nombre sera généré en débutant à 1.
</span></span><span id="58" class="l"><a class="l" href="#58"> 58: </a><span class="php-comment"> *
</span></span><span id="59" class="l"><a class="l" href="#59"> 59: </a><span class="php-comment"> * @param string le nom du point de chronométrage
</span></span><span id="60" class="l"><a class="l" href="#60"> 60: </a><span class="php-comment"> * @return null
</span></span><span id="61" class="l"><a class="l" href="#61"> 61: </a><span class="php-comment"> */</span>
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_chrono" href="#_chrono">chrono</a>(<span class="php-var">$cle</span> = <span class="php-keyword1">null</span>) {
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a> <span class="php-keyword1">if</span> (<span class="php-var">$cle</span> == <span class="php-keyword1">null</span>) {
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> <span class="php-var">$cle</span> = (<span class="php-keyword2">count</span>(self::<span class="php-var">$temps</span>) == <span class="php-num">0</span>) ? <span class="php-quote">'Début'</span> : self::<span class="php-var">$pointArretNumero</span>++;
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> }
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a> <span class="php-var">$moment</span> = <span class="php-keyword2">microtime</span>();
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> self::setTemps(<span class="php-var">$cle</span>, <span class="php-var">$moment</span>);
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a> }
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a>
</span><span id="70" class="l"><a class="l" href="#70"> 70: </a> <span class="php-comment">/**
</span></span><span id="71" class="l"><a class="l" href="#71"> 71: </a><span class="php-comment"> * Permet d'afficher les temps d'éxécution de différentes parties d'un script.
</span></span><span id="72" class="l"><a class="l" href="#72"> 72: </a><span class="php-comment"> *
</span></span><span id="73" class="l"><a class="l" href="#73"> 73: </a><span class="php-comment"> * Cette fonction permet d'afficher un ensemble de mesure de temps prises à différents endroits d'un script.
</span></span><span id="74" class="l"><a class="l" href="#74"> 74: </a><span class="php-comment"> * Ces mesures sont affichées au sein d'un tableau XHTML dont on peut controler l'indentation des balises.
</span></span><span id="75" class="l"><a class="l" href="#75"> 75: </a><span class="php-comment"> * Pour un site en production, il suffit d'ajouter un style #chrono {display:none;} dans la css.
</span></span><span id="76" class="l"><a class="l" href="#76"> 76: </a><span class="php-comment"> * De cette façon, le tableau ne s'affichera pas. Le webmaster lui pourra rajouter sa propre feuille de style
</span></span><span id="77" class="l"><a class="l" href="#77"> 77: </a><span class="php-comment"> * affichant le tableau.
</span></span><span id="78" class="l"><a class="l" href="#78"> 78: </a><span class="php-comment"> * Le développeur initial de cette fonction est Loic d'Anterroches.
</span></span><span id="79" class="l"><a class="l" href="#79"> 79: </a><span class="php-comment"> * Elle a été modifiée par Jean-Pascal Milcent.
</span></span><span id="80" class="l"><a class="l" href="#80"> 80: </a><span class="php-comment"> *
</span></span><span id="81" class="l"><a class="l" href="#81"> 81: </a><span class="php-comment"> * @author Loic d'Anterroches
</span></span><span id="82" class="l"><a class="l" href="#82"> 82: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="83" class="l"><a class="l" href="#83"> 83: </a><span class="php-comment"> * @param string l'eventuel nom du point de chronométrage de fin.
</span></span><span id="84" class="l"><a class="l" href="#84"> 84: </a><span class="php-comment"> * @return string la chaine XHTML de mesure des temps.
</span></span><span id="85" class="l"><a class="l" href="#85"> 85: </a><span class="php-comment"> */</span>
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_afficherChrono" href="#_afficherChrono">afficherChrono</a>(<span class="php-var">$cle</span> = <span class="php-keyword1">null</span>) {
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">count</span>(self::<span class="php-var">$temps</span>) == <span class="php-num">0</span>) {
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a> <span class="php-var">$sortie</span> = <span class="php-quote">&quot;Aucun chronométrage à l'aide de Chronometre::chrono() n'a été réalisé.&quot;</span>;
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a> } <span class="php-keyword1">else</span> {
</span><span id="90" class="l"><a class="l" href="#90"> 90: </a> <span class="php-comment">// Création du chrono de fin</span>
</span><span id="91" class="l"><a class="l" href="#91"> 91: </a> self::chrono(<span class="php-quote">'Fin'</span>);
</span><span id="92" class="l"><a class="l" href="#92"> 92: </a>
</span><span id="93" class="l"><a class="l" href="#93"> 93: </a> <span class="php-var">$total_tps_ecoule</span> = <span class="php-num">0</span>;
</span><span id="94" class="l"><a class="l" href="#94"> 94: </a> <span class="php-var">$tps_debut</span> = <span class="php-keyword1">null</span>;
</span><span id="95" class="l"><a class="l" href="#95"> 95: </a> <span class="php-var">$tbody</span> = <span class="php-quote">''</span>;
</span><span id="96" class="l"><a class="l" href="#96"> 96: </a> <span class="php-keyword1">foreach</span> (self::getTemps() <span class="php-keyword1">as</span> <span class="php-var">$temps</span>) {
</span><span id="97" class="l"><a class="l" href="#97"> 97: </a> <span class="php-keyword1">foreach</span> (<span class="php-var">$temps</span> <span class="php-keyword1">as</span> <span class="php-var">$cle</span> =&gt; <span class="php-var">$valeur</span>) {
</span><span id="98" class="l"><a class="l" href="#98"> 98: </a> <span class="php-comment">// Récupération de la premiére mesure</span>
</span><span id="99" class="l"><a class="l" href="#99"> 99: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">is_null</span>(<span class="php-var">$tps_debut</span>)) {
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-var">$tps_debut</span> = self::getMicroTime(<span class="php-var">$valeur</span>);
</span><span id="101" class="l"><a class="l" href="#101">101: </a> }
</span><span id="102" class="l"><a class="l" href="#102">102: </a> <span class="php-comment">// Récupération de la mesure courrante</span>
</span><span id="103" class="l"><a class="l" href="#103">103: </a> <span class="php-var">$tps_fin</span> = self::getMicroTime(<span class="php-var">$valeur</span>);
</span><span id="104" class="l"><a class="l" href="#104">104: </a>
</span><span id="105" class="l"><a class="l" href="#105">105: </a> <span class="php-var">$tps_ecoule</span> = <span class="php-keyword2">abs</span>(<span class="php-var">$tps_fin</span> - <span class="php-var">$tps_debut</span>);
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-var">$total_tps_ecoule</span> += <span class="php-var">$tps_ecoule</span>;
</span><span id="107" class="l"><a class="l" href="#107">107: </a> <span class="php-var">$tps_debut</span> = <span class="php-var">$tps_fin</span>;
</span><span id="108" class="l"><a class="l" href="#108">108: </a>
</span><span id="109" class="l"><a class="l" href="#109">109: </a> <span class="php-comment">// Gestion affichage</span>
</span><span id="110" class="l"><a class="l" href="#110">110: </a> <span class="php-var">$total_tps_ecoule_fmt</span> = <span class="php-keyword2">number_format</span>(<span class="php-var">$total_tps_ecoule</span>, <span class="php-num">3</span>, <span class="php-quote">','</span>, <span class="php-quote">' '</span>);
</span><span id="111" class="l"><a class="l" href="#111">111: </a> <span class="php-var">$tps_ecoule_fmt</span> = <span class="php-keyword2">number_format</span>(<span class="php-var">$tps_ecoule</span>, <span class="php-num">3</span>, <span class="php-quote">','</span>, <span class="php-quote">' '</span>);
</span><span id="112" class="l"><a class="l" href="#112">112: </a> <span class="php-var">$tbody</span> .= <span class="php-quote">'&lt;tr&gt;&lt;th&gt;'</span>.<span class="php-var">$cle</span>.<span class="php-quote">'&lt;/th&gt;&lt;td&gt;'</span>.<span class="php-var">$tps_ecoule_fmt</span>.<span class="php-quote">'&lt;/td&gt;&lt;td&gt;'</span>.<span class="php-var">$total_tps_ecoule_fmt</span>.<span class="php-quote">'&lt;/td&gt;&lt;/tr&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="113" class="l"><a class="l" href="#113">113: </a> }
</span><span id="114" class="l"><a class="l" href="#114">114: </a> }
</span><span id="115" class="l"><a class="l" href="#115">115: </a> <span class="php-var">$total_tps_ecoule_final_fmt</span> = <span class="php-keyword2">number_format</span>(<span class="php-var">$total_tps_ecoule</span>, <span class="php-num">3</span>, <span class="php-quote">','</span>, <span class="php-quote">' '</span>);
</span><span id="116" class="l"><a class="l" href="#116">116: </a> <span class="php-comment">// Début création de l'affichage</span>
</span><span id="117" class="l"><a class="l" href="#117">117: </a> <span class="php-var">$sortie</span> = <span class="php-quote">'&lt;table id=&quot;chrono&quot; lang=&quot;fr&quot; summary=&quot;Résultat duchronométrage du programme affichant la page actuelle.&quot;&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>.
</span><span id="118" class="l"><a class="l" href="#118">118: </a> <span class="php-quote">'&lt;caption&gt;Chronométrage&lt;/caption&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>.
</span><span id="119" class="l"><a class="l" href="#119">119: </a> <span class="php-quote">'&lt;thead&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>.
</span><span id="120" class="l"><a class="l" href="#120">120: </a> <span class="php-quote">' &lt;tr&gt;&lt;th&gt;Action&lt;/th&gt;&lt;th title=&quot;Temps écoulé vis à vis de l\'action précédente&quot;&gt;Temps écoulé (en s.)&lt;/th&gt;&lt;th&gt;Cumul du temps écoulé (en s.)&lt;/th&gt;&lt;/tr&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>.
</span><span id="121" class="l"><a class="l" href="#121">121: </a> <span class="php-quote">'&lt;/thead&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>.
</span><span id="122" class="l"><a class="l" href="#122">122: </a> <span class="php-quote">'&lt;tbody&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>.
</span><span id="123" class="l"><a class="l" href="#123">123: </a> <span class="php-var">$tbody</span>.
</span><span id="124" class="l"><a class="l" href="#124">124: </a> <span class="php-quote">'&lt;/tbody&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>.
</span><span id="125" class="l"><a class="l" href="#125">125: </a> <span class="php-quote">'&lt;tfoot&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>.
</span><span id="126" class="l"><a class="l" href="#126">126: </a> <span class="php-quote">' &lt;tr&gt;&lt;th&gt;Total du temps écoulé (en s.)&lt;/th&gt;&lt;td colspan=&quot;2&quot;&gt;'</span>.<span class="php-var">$total_tps_ecoule_final_fmt</span>.<span class="php-quote">'&lt;/td&gt;&lt;/tr&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>.
</span><span id="127" class="l"><a class="l" href="#127">127: </a> <span class="php-quote">'&lt;/tfoot&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>.
</span><span id="128" class="l"><a class="l" href="#128">128: </a> <span class="php-quote">'&lt;/table&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="129" class="l"><a class="l" href="#129">129: </a> }
</span><span id="130" class="l"><a class="l" href="#130">130: </a> <span class="php-keyword1">return</span> <span class="php-var">$sortie</span>;
</span><span id="131" class="l"><a class="l" href="#131">131: </a> }
</span><span id="132" class="l"><a class="l" href="#132">132: </a>
</span><span id="133" class="l"><a class="l" href="#133">133: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_getMicroTime" href="#_getMicroTime">getMicroTime</a>(<span class="php-var">$utps</span>) {
</span><span id="134" class="l"><a class="l" href="#134">134: </a> <span class="php-keyword1">list</span>(<span class="php-var">$usec</span>, <span class="php-var">$sec</span>) = <span class="php-keyword2">explode</span>(<span class="php-quote">' '</span>, <span class="php-var">$utps</span>);
</span><span id="135" class="l"><a class="l" href="#135">135: </a> <span class="php-keyword1">return</span> ((float)<span class="php-var">$usec</span> + (float)<span class="php-var">$sec</span>);
</span><span id="136" class="l"><a class="l" href="#136">136: </a> }
</span><span id="137" class="l"><a class="l" href="#137">137: </a>}
</span><span id="138" class="l"><a class="l" href="#138">138: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/package-None.html
New file
0,0 → 1,118
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>No package | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li class="active"><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-CacheFichier.html">CacheFichier</a></li>
<li><a href="class-CacheSqlite.html">CacheSqlite</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li class="active">
<span>Package</span> </li>
<li>
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="package">
<h1>No package</h1>
 
 
 
<table class="summary" id="classes">
<caption>Classes summary</caption>
<tr>
<td class="name"><a href="class-CacheFichier.html">CacheFichier</a></td>
<td></td>
</tr>
<tr>
<td class="name"><a href="class-CacheSqlite.html">CacheSqlite</a></td>
<td></td>
</tr>
</table>
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Chaine.html
New file
0,0 → 1,170
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File utilitaires/Chaine.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li class="active"><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li class="active"><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Utilitaire.html" title="Summary of Utilitaire"><span>Package</span></a>
</li>
<li>
<a href="class-Chaine.html" title="Summary of Chaine"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe fournissant des méthodes statiques de manipulation des chaînes de caractères (String).
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> *
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * @category PHP 5.2
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> * @package Utilitaire
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="10" class="l"><a class="l" href="#10">10: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
</span></span><span id="11" class="l"><a class="l" href="#11">11: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
</span></span><span id="12" class="l"><a class="l" href="#12">12: </a><span class="php-comment"> * @version $Id: Chaine.php 343 2011-06-09 14:59:36Z jpm $
</span></span><span id="13" class="l"><a class="l" href="#13">13: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="14" class="l"><a class="l" href="#14">14: </a><span class="php-comment"> */</span>
</span><span id="15" class="l"><a class="l" href="#15">15: </a><span class="php-keyword1">class</span> <a id="Chaine" href="#Chaine">Chaine</a> {
</span><span id="16" class="l"><a class="l" href="#16">16: </a>
</span><span id="17" class="l"><a class="l" href="#17">17: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$caracteres_accentues" href="#$caracteres_accentues">$caracteres_accentues</a></span> = <span class="php-keyword1">array</span>(
</span><span id="18" class="l"><a class="l" href="#18">18: </a> <span class="php-quote">'À'</span>, <span class="php-quote">'Á'</span>, <span class="php-quote">'Â'</span>, <span class="php-quote">'Ã'</span>, <span class="php-quote">'Ä'</span>, <span class="php-quote">'Å'</span>, <span class="php-quote">'Æ'</span>, <span class="php-quote">'Ç'</span>, <span class="php-quote">'È'</span>, <span class="php-quote">'É'</span>, <span class="php-quote">'Ê'</span>, <span class="php-quote">'Ë'</span>, <span class="php-quote">'Ì'</span>, <span class="php-quote">'Í'</span>, <span class="php-quote">'Î'</span>,
</span><span id="19" class="l"><a class="l" href="#19">19: </a> <span class="php-quote">'Ï'</span>, <span class="php-quote">'Ð'</span>, <span class="php-quote">'Ñ'</span>, <span class="php-quote">'Ò'</span>, <span class="php-quote">'Ó'</span>, <span class="php-quote">'Ô'</span>, <span class="php-quote">'Õ'</span>, <span class="php-quote">'Ö'</span>, <span class="php-quote">'Ø'</span>, <span class="php-quote">'Ù'</span>, <span class="php-quote">'Ú'</span>, <span class="php-quote">'Û'</span>, <span class="php-quote">'Ü'</span>, <span class="php-quote">'Ý'</span>, <span class="php-quote">'ß'</span>,
</span><span id="20" class="l"><a class="l" href="#20">20: </a> <span class="php-quote">'à'</span>, <span class="php-quote">'á'</span>, <span class="php-quote">'â'</span>, <span class="php-quote">'ã'</span>, <span class="php-quote">'ä'</span>, <span class="php-quote">'å'</span>, <span class="php-quote">'æ'</span>, <span class="php-quote">'ç'</span>, <span class="php-quote">'è'</span>, <span class="php-quote">'é'</span>, <span class="php-quote">'ê'</span>, <span class="php-quote">'ë'</span>, <span class="php-quote">'ì'</span>, <span class="php-quote">'í'</span>, <span class="php-quote">'î'</span>,
</span><span id="21" class="l"><a class="l" href="#21">21: </a> <span class="php-quote">'ï'</span>, <span class="php-quote">'ñ'</span>, <span class="php-quote">'ò'</span>, <span class="php-quote">'ó'</span>, <span class="php-quote">'ô'</span>, <span class="php-quote">'õ'</span>, <span class="php-quote">'ö'</span>, <span class="php-quote">'ø'</span>, <span class="php-quote">'ù'</span>, <span class="php-quote">'ú'</span>, <span class="php-quote">'û'</span>, <span class="php-quote">'ü'</span>, <span class="php-quote">'ý'</span>, <span class="php-quote">'ÿ'</span>, <span class="php-quote">'Ā'</span>,
</span><span id="22" class="l"><a class="l" href="#22">22: </a> <span class="php-quote">'ā'</span>, <span class="php-quote">'Ă'</span>, <span class="php-quote">'ă'</span>, <span class="php-quote">'Ą'</span>, <span class="php-quote">'ą'</span>, <span class="php-quote">'Ć'</span>, <span class="php-quote">'ć'</span>, <span class="php-quote">'Ĉ'</span>, <span class="php-quote">'ĉ'</span>, <span class="php-quote">'Ċ'</span>, <span class="php-quote">'ċ'</span>, <span class="php-quote">'Č'</span>, <span class="php-quote">'č'</span>, <span class="php-quote">'Ď'</span>, <span class="php-quote">'ď'</span>,
</span><span id="23" class="l"><a class="l" href="#23">23: </a> <span class="php-quote">'Đ'</span>, <span class="php-quote">'đ'</span>, <span class="php-quote">'Ē'</span>, <span class="php-quote">'ē'</span>, <span class="php-quote">'Ĕ'</span>, <span class="php-quote">'ĕ'</span>, <span class="php-quote">'Ė'</span>, <span class="php-quote">'ė'</span>, <span class="php-quote">'Ę'</span>, <span class="php-quote">'ę'</span>, <span class="php-quote">'Ě'</span>, <span class="php-quote">'ě'</span>, <span class="php-quote">'Ĝ'</span>, <span class="php-quote">'ĝ'</span>, <span class="php-quote">'Ğ'</span>,
</span><span id="24" class="l"><a class="l" href="#24">24: </a> <span class="php-quote">'ğ'</span>, <span class="php-quote">'Ġ'</span>, <span class="php-quote">'ġ'</span>, <span class="php-quote">'Ģ'</span>, <span class="php-quote">'ģ'</span>, <span class="php-quote">'Ĥ'</span>, <span class="php-quote">'ĥ'</span>, <span class="php-quote">'Ħ'</span>, <span class="php-quote">'ħ'</span>, <span class="php-quote">'Ĩ'</span>, <span class="php-quote">'ĩ'</span>, <span class="php-quote">'Ī'</span>, <span class="php-quote">'ī'</span>, <span class="php-quote">'Ĭ'</span>, <span class="php-quote">'ĭ'</span>,
</span><span id="25" class="l"><a class="l" href="#25">25: </a> <span class="php-quote">'Į'</span>, <span class="php-quote">'į'</span>, <span class="php-quote">'İ'</span>, <span class="php-quote">'ı'</span>, <span class="php-quote">'IJ'</span>, <span class="php-quote">'ij'</span>, <span class="php-quote">'Ĵ'</span>, <span class="php-quote">'ĵ'</span>, <span class="php-quote">'Ķ'</span>, <span class="php-quote">'ķ'</span>, <span class="php-quote">'Ĺ'</span>, <span class="php-quote">'ĺ'</span>, <span class="php-quote">'Ļ'</span>, <span class="php-quote">'ļ'</span>, <span class="php-quote">'Ľ'</span>,
</span><span id="26" class="l"><a class="l" href="#26">26: </a> <span class="php-quote">'ľ'</span>, <span class="php-quote">'Ŀ'</span>, <span class="php-quote">'ŀ'</span>, <span class="php-quote">'Ł'</span>, <span class="php-quote">'ł'</span>, <span class="php-quote">'Ń'</span>, <span class="php-quote">'ń'</span>, <span class="php-quote">'Ņ'</span>, <span class="php-quote">'ņ'</span>, <span class="php-quote">'Ň'</span>, <span class="php-quote">'ň'</span>, <span class="php-quote">'ʼn'</span>, <span class="php-quote">'Ō'</span>, <span class="php-quote">'ō'</span>, <span class="php-quote">'Ŏ'</span>,
</span><span id="27" class="l"><a class="l" href="#27">27: </a> <span class="php-quote">'ŏ'</span>, <span class="php-quote">'Ő'</span>, <span class="php-quote">'ő'</span>, <span class="php-quote">'Œ'</span>, <span class="php-quote">'œ'</span>, <span class="php-quote">'Ŕ'</span>, <span class="php-quote">'ŕ'</span>, <span class="php-quote">'Ŗ'</span>, <span class="php-quote">'ŗ'</span>, <span class="php-quote">'Ř'</span>, <span class="php-quote">'ř'</span>, <span class="php-quote">'Ś'</span>, <span class="php-quote">'ś'</span>, <span class="php-quote">'Ŝ'</span>, <span class="php-quote">'ŝ'</span>,
</span><span id="28" class="l"><a class="l" href="#28">28: </a> <span class="php-quote">'Ş'</span>, <span class="php-quote">'ş'</span>, <span class="php-quote">'Š'</span>, <span class="php-quote">'š'</span>, <span class="php-quote">'Ţ'</span>, <span class="php-quote">'ţ'</span>, <span class="php-quote">'Ť'</span>, <span class="php-quote">'ť'</span>, <span class="php-quote">'Ŧ'</span>, <span class="php-quote">'ŧ'</span>, <span class="php-quote">'Ũ'</span>, <span class="php-quote">'ũ'</span>, <span class="php-quote">'Ū'</span>, <span class="php-quote">'ū'</span>, <span class="php-quote">'Ŭ'</span>,
</span><span id="29" class="l"><a class="l" href="#29">29: </a> <span class="php-quote">'ŭ'</span>, <span class="php-quote">'Ů'</span>, <span class="php-quote">'ů'</span>, <span class="php-quote">'Ű'</span>, <span class="php-quote">'ű'</span>, <span class="php-quote">'Ų'</span>, <span class="php-quote">'ų'</span>, <span class="php-quote">'Ŵ'</span>, <span class="php-quote">'ŵ'</span>, <span class="php-quote">'Ŷ'</span>, <span class="php-quote">'ŷ'</span>, <span class="php-quote">'Ÿ'</span>, <span class="php-quote">'Ź'</span>, <span class="php-quote">'ź'</span>, <span class="php-quote">'Ż'</span>,
</span><span id="30" class="l"><a class="l" href="#30">30: </a> <span class="php-quote">'ż'</span>, <span class="php-quote">'Ž'</span>, <span class="php-quote">'ž'</span>, <span class="php-quote">'ſ'</span>, <span class="php-quote">'ƒ'</span>, <span class="php-quote">'Ơ'</span>, <span class="php-quote">'ơ'</span>, <span class="php-quote">'Ư'</span>, <span class="php-quote">'ư'</span>, <span class="php-quote">'Ǎ'</span>, <span class="php-quote">'ǎ'</span>, <span class="php-quote">'Ǐ'</span>, <span class="php-quote">'ǐ'</span>, <span class="php-quote">'Ǒ'</span>, <span class="php-quote">'ǒ'</span>,
</span><span id="31" class="l"><a class="l" href="#31">31: </a> <span class="php-quote">'Ǔ'</span>, <span class="php-quote">'ǔ'</span>, <span class="php-quote">'Ǖ'</span>, <span class="php-quote">'ǖ'</span>, <span class="php-quote">'Ǘ'</span>, <span class="php-quote">'ǘ'</span>, <span class="php-quote">'Ǚ'</span>, <span class="php-quote">'ǚ'</span>, <span class="php-quote">'Ǜ'</span>, <span class="php-quote">'ǜ'</span>, <span class="php-quote">'Ǻ'</span>, <span class="php-quote">'ǻ'</span>, <span class="php-quote">'Ǽ'</span>, <span class="php-quote">'ǽ'</span>, <span class="php-quote">'Ǿ'</span>, <span class="php-quote">'ǿ'</span>);
</span><span id="32" class="l"><a class="l" href="#32">32: </a>
</span><span id="33" class="l"><a class="l" href="#33">33: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$caracteres_normaux" href="#$caracteres_normaux">$caracteres_normaux</a></span> = <span class="php-keyword1">array</span>(
</span><span id="34" class="l"><a class="l" href="#34">34: </a> <span class="php-quote">'A'</span>, <span class="php-quote">'A'</span>, <span class="php-quote">'A'</span>, <span class="php-quote">'A'</span>, <span class="php-quote">'A'</span>, <span class="php-quote">'A'</span>, <span class="php-quote">'AE'</span>, <span class="php-quote">'C'</span>, <span class="php-quote">'E'</span>, <span class="php-quote">'E'</span>, <span class="php-quote">'E'</span>, <span class="php-quote">'E'</span>, <span class="php-quote">'I'</span>, <span class="php-quote">'I'</span>, <span class="php-quote">'I'</span>,
</span><span id="35" class="l"><a class="l" href="#35">35: </a> <span class="php-quote">'I'</span>, <span class="php-quote">'D'</span>, <span class="php-quote">'N'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'Y'</span>, <span class="php-quote">'s'</span>,
</span><span id="36" class="l"><a class="l" href="#36">36: </a> <span class="php-quote">'a'</span>, <span class="php-quote">'a'</span>, <span class="php-quote">'a'</span>, <span class="php-quote">'a'</span>, <span class="php-quote">'a'</span>, <span class="php-quote">'a'</span>, <span class="php-quote">'ae'</span>, <span class="php-quote">'c'</span>, <span class="php-quote">'e'</span>, <span class="php-quote">'e'</span>, <span class="php-quote">'e'</span>, <span class="php-quote">'e'</span>, <span class="php-quote">'i'</span>, <span class="php-quote">'i'</span>, <span class="php-quote">'i'</span>,
</span><span id="37" class="l"><a class="l" href="#37">37: </a> <span class="php-quote">'i'</span>, <span class="php-quote">'n'</span>, <span class="php-quote">'o'</span>, <span class="php-quote">'o'</span>, <span class="php-quote">'o'</span>, <span class="php-quote">'o'</span>, <span class="php-quote">'o'</span>, <span class="php-quote">'o'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'y'</span>, <span class="php-quote">'y'</span>, <span class="php-quote">'A'</span>, <span class="php-quote">'a'</span>,
</span><span id="38" class="l"><a class="l" href="#38">38: </a> <span class="php-quote">'A'</span>, <span class="php-quote">'a'</span>, <span class="php-quote">'A'</span>, <span class="php-quote">'a'</span>, <span class="php-quote">'C'</span>, <span class="php-quote">'c'</span>, <span class="php-quote">'C'</span>, <span class="php-quote">'c'</span>, <span class="php-quote">'C'</span>, <span class="php-quote">'c'</span>, <span class="php-quote">'C'</span>, <span class="php-quote">'c'</span>, <span class="php-quote">'D'</span>, <span class="php-quote">'d'</span>, <span class="php-quote">'D'</span>, <span class="php-quote">'d'</span>,
</span><span id="39" class="l"><a class="l" href="#39">39: </a> <span class="php-quote">'E'</span>, <span class="php-quote">'e'</span>, <span class="php-quote">'E'</span>, <span class="php-quote">'e'</span>, <span class="php-quote">'E'</span>, <span class="php-quote">'e'</span>, <span class="php-quote">'E'</span>, <span class="php-quote">'e'</span>, <span class="php-quote">'E'</span>, <span class="php-quote">'e'</span>, <span class="php-quote">'G'</span>, <span class="php-quote">'g'</span>, <span class="php-quote">'G'</span>, <span class="php-quote">'g'</span>, <span class="php-quote">'G'</span>, <span class="php-quote">'g'</span>,
</span><span id="40" class="l"><a class="l" href="#40">40: </a> <span class="php-quote">'G'</span>, <span class="php-quote">'g'</span>, <span class="php-quote">'H'</span>, <span class="php-quote">'h'</span>, <span class="php-quote">'H'</span>, <span class="php-quote">'h'</span>, <span class="php-quote">'I'</span>, <span class="php-quote">'i'</span>, <span class="php-quote">'I'</span>, <span class="php-quote">'i'</span>, <span class="php-quote">'I'</span>, <span class="php-quote">'i'</span>, <span class="php-quote">'I'</span>, <span class="php-quote">'i'</span>, <span class="php-quote">'I'</span>, <span class="php-quote">'i'</span>,
</span><span id="41" class="l"><a class="l" href="#41">41: </a> <span class="php-quote">'IJ'</span>, <span class="php-quote">'ij'</span>, <span class="php-quote">'J'</span>, <span class="php-quote">'j'</span>, <span class="php-quote">'K'</span>, <span class="php-quote">'k'</span>, <span class="php-quote">'L'</span>, <span class="php-quote">'l'</span>, <span class="php-quote">'L'</span>, <span class="php-quote">'l'</span>, <span class="php-quote">'L'</span>, <span class="php-quote">'l'</span>, <span class="php-quote">'L'</span>, <span class="php-quote">'l'</span>, <span class="php-quote">'l'</span>, <span class="php-quote">'l'</span>,
</span><span id="42" class="l"><a class="l" href="#42">42: </a> <span class="php-quote">'N'</span>, <span class="php-quote">'n'</span>, <span class="php-quote">'N'</span>, <span class="php-quote">'n'</span>, <span class="php-quote">'N'</span>, <span class="php-quote">'n'</span>, <span class="php-quote">'n'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'o'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'o'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'o'</span>, <span class="php-quote">'OE'</span>, <span class="php-quote">'oe'</span>, <span class="php-quote">'R'</span>,
</span><span id="43" class="l"><a class="l" href="#43">43: </a> <span class="php-quote">'r'</span>, <span class="php-quote">'R'</span>, <span class="php-quote">'r'</span>, <span class="php-quote">'R'</span>, <span class="php-quote">'r'</span>, <span class="php-quote">'S'</span>, <span class="php-quote">'s'</span>, <span class="php-quote">'S'</span>, <span class="php-quote">'s'</span>, <span class="php-quote">'S'</span>, <span class="php-quote">'s'</span>, <span class="php-quote">'S'</span>, <span class="php-quote">'s'</span>, <span class="php-quote">'T'</span>, <span class="php-quote">'t'</span>, <span class="php-quote">'T'</span>, <span class="php-quote">'t'</span>,
</span><span id="44" class="l"><a class="l" href="#44">44: </a> <span class="php-quote">'T'</span>, <span class="php-quote">'t'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'W'</span>, <span class="php-quote">'w'</span>, <span class="php-quote">'Y'</span>,
</span><span id="45" class="l"><a class="l" href="#45">45: </a> <span class="php-quote">'y'</span>, <span class="php-quote">'Y'</span>, <span class="php-quote">'Z'</span>, <span class="php-quote">'z'</span>, <span class="php-quote">'Z'</span>, <span class="php-quote">'z'</span>, <span class="php-quote">'Z'</span>, <span class="php-quote">'z'</span>, <span class="php-quote">'s'</span>, <span class="php-quote">'f'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'o'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'A'</span>, <span class="php-quote">'a'</span>, <span class="php-quote">'I'</span>,
</span><span id="46" class="l"><a class="l" href="#46">46: </a> <span class="php-quote">'i'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'o'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'U'</span>, <span class="php-quote">'u'</span>, <span class="php-quote">'A'</span>, <span class="php-quote">'a'</span>, <span class="php-quote">'AE'</span>, <span class="php-quote">'ae'</span>, <span class="php-quote">'O'</span>, <span class="php-quote">'o'</span>);
</span><span id="47" class="l"><a class="l" href="#47">47: </a>
</span><span id="48" class="l"><a class="l" href="#48">48: </a> <span class="php-comment">/**
</span></span><span id="49" class="l"><a class="l" href="#49">49: </a><span class="php-comment"> * Supprime ou remplace les accents d'une chaine en PHP.
</span></span><span id="50" class="l"><a class="l" href="#50">50: </a><span class="php-comment"> * La solution retenu, provenant du site
</span></span><span id="51" class="l"><a class="l" href="#51">51: </a><span class="php-comment"> * {@link http://www.lecoindunet.com/zone_php/scripts_utiles/remplacer-les-caracteres-accentues-dune-chaine-en-php-72 lecoindunet.com},
</span></span><span id="52" class="l"><a class="l" href="#52">52: </a><span class="php-comment"> * consiste en deux tableaux (caractères avec et sans accents) car cela permetra éventuellement
</span></span><span id="53" class="l"><a class="l" href="#53">53: </a><span class="php-comment"> * de fournir des méthodes pour récupérer ces tableaux pour d'autres traitements.
</span></span><span id="54" class="l"><a class="l" href="#54">54: </a><span class="php-comment"> * Une autre solution aurait été d'utiliser les entités HTML comme proposé par le site
</span></span><span id="55" class="l"><a class="l" href="#55">55: </a><span class="php-comment"> * {@link http://www.weirdog.com/blog/php/supprimer-les-accents-des-caracteres-accentues.html weirdog.com}.
</span></span><span id="56" class="l"><a class="l" href="#56">56: </a><span class="php-comment"> *
</span></span><span id="57" class="l"><a class="l" href="#57">57: </a><span class="php-comment"> * @param String $chaine la chaine de caractères dans laquelle supprimer les accents.
</span></span><span id="58" class="l"><a class="l" href="#58">58: </a><span class="php-comment"> * @param String $encodage le code d'encodage de la chaine si ce n'est pas de l'UTF-8.
</span></span><span id="59" class="l"><a class="l" href="#59">59: </a><span class="php-comment"> * @return la chaine de caractères sans accent.
</span></span><span id="60" class="l"><a class="l" href="#60">60: </a><span class="php-comment"> */</span>
</span><span id="61" class="l"><a class="l" href="#61">61: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">static</span> <span class="php-keyword1">function</span> <a id="_supprimerAccents" href="#_supprimerAccents">supprimerAccents</a>(<span class="php-var">$chaine</span>, <span class="php-var">$encodage</span> = <span class="php-quote">'UTF-8'</span>) {
</span><span id="62" class="l"><a class="l" href="#62">62: </a> <span class="php-keyword1">if</span> (<span class="php-var">$encodage</span> != <span class="php-quote">'UTF-8'</span>) {
</span><span id="63" class="l"><a class="l" href="#63">63: </a> <span class="php-keyword2">mb_convert_variables</span>(<span class="php-var">$encodage</span>, <span class="php-quote">'UTF-8'</span>, self::<span class="php-var">$caracteres_accentues</span>, self::<span class="php-var">$caracteres_normaux</span>);
</span><span id="64" class="l"><a class="l" href="#64">64: </a> }
</span><span id="65" class="l"><a class="l" href="#65">65: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">str_replace</span>(self::<span class="php-var">$caracteres_accentues</span>, self::<span class="php-var">$caracteres_normaux</span>, <span class="php-var">$chaine</span>);
</span><span id="66" class="l"><a class="l" href="#66">66: </a> }
</span><span id="67" class="l"><a class="l" href="#67">67: </a>}
</span><span id="68" class="l"><a class="l" href="#68">68: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-Chaine.html
New file
0,0 → 1,220
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class Chaine | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li class="active"><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li class="active"><a href="class-Chaine.html">Chaine</a></li>
<li><a href="class-Encodage.html">Encodage</a></li>
<li><a href="class-Fichier.html">Fichier</a></li>
<li><a href="class-Pattern.html">Pattern</a></li>
<li><a href="class-Tableau.html">Tableau</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Utilitaire.html" title="Summary of Utilitaire"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class Chaine</h1>
 
 
<div class="description">
<p>Classe fournissant des méthodes statiques de manipulation des chaînes de
caractères (String).</p>
 
</div>
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Utilitaire.html">Utilitaire</a><br>
 
<b>Category:</b>
PHP 5.2<br>
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL-v3</a><br>
<b>License:</b>
<a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL-v2</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Version:</b>
$Id: Chaine.php 343 2011-06-09 14:59:36Z jpm $<br>
<b>Link:</b>
/doc/framework/<br>
<b>Located at</b> <a href="source-class-Chaine.html#3-67" title="Go to source code">utilitaires/Chaine.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="supprimerAccents" id="_supprimerAccents">
 
<td class="attributes"><code>
public static
la
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimerAccents">#</a>
<code><a href="source-class-Chaine.html#48-66" title="Go to source code">supprimerAccents</a>( <span>String <var>$chaine</var></span>, <span>String <var>$encodage</var> = <span class="php-quote">'UTF-8'</span></span> )</code>
 
<div class="description short">
<p>Supprime ou remplace les accents d'une chaine en PHP. La solution retenu,
provenant du site <a href="http://www.lecoindunet.com/zone_php/scripts_utiles/remplacer-les-caracteres-accentues-dune-chaine-en-php-72">lecoindunet.com</a>, consiste en deux tableaux (caractères avec et sans accents)
car cela permetra éventuellement de fournir des méthodes pour récupérer ces
tableaux pour d'autres traitements. Une autre solution aurait été d'utiliser
les entités HTML comme proposé par le site <a href="http://www.weirdog.com/blog/php/supprimer-les-accents-des-caracteres-accentues.html">weirdog.com</a>.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Supprime ou remplace les accents d'une chaine en PHP. La solution retenu,
provenant du site <a href="http://www.lecoindunet.com/zone_php/scripts_utiles/remplacer-les-caracteres-accentues-dune-chaine-en-php-72">lecoindunet.com</a>, consiste en deux tableaux (caractères avec et sans accents)
car cela permetra éventuellement de fournir des méthodes pour récupérer ces
tableaux pour d'autres traitements. Une autre solution aurait été d'utiliser
les entités HTML comme proposé par le site <a href="http://www.weirdog.com/blog/php/supprimer-les-accents-des-caracteres-accentues.html">weirdog.com</a>.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$chaine</var></dt>
<dd><code>String</code><br>$chaine la chaine de caractères dans laquelle supprimer les accents.</dd>
<dt><var>$encodage</var></dt>
<dd><code>String</code><br>$encodage le code d'encodage de la chaine si ce n'est pas de l'UTF-8.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>la</code><br>chaine de caractères sans accent.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/class-RestServeur.html
New file
0,0 → 1,1112
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class RestServeur | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li class="active"><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class RestServeur</h1>
 
 
 
 
 
 
 
 
 
 
 
<div class="info">
<b>Package:</b> <a href="package-Framework.html">Framework</a><br>
 
<b>Copyright:</b>
Copyright (c) 2010, Tela Botanica (<a
href="mailto:accueil&#64;tela-botanica.org">accueil&#64;<!-- -->tela-botanica.org</a>)<br>
<b>License:</b>
<a href="GPL">v3 &lt;http://www.gnu.org/licenses/gpl.txt&gt;</a><br>
<b>License:</b>
<a href="CECILL">v2 &lt;http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt&gt;</a><br>
<b>Author:</b>
Jean-Pascal MILCENT &lt;<a
href="mailto:jpm&#64;tela-botanica.org">jpm&#64;<!-- -->tela-botanica.org</a>&gt;<br>
<b>Located at</b> <a href="source-class-RestServeur.html#42-737" title="Go to source code">RestServeur.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-RestServeur.html#261-289" title="Go to source code">__construct</a>( )</code>
 
<div class="description short">
<p>Analyse les données envoyées au serveur, enregistre la méthode HTTP
utilisée pour appeler le serveur et parse l'url appelée pour trouver le
service demandé.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Analyse les données envoyées au serveur, enregistre la méthode HTTP
utilisée pour appeler le serveur et parse l'url appelée pour trouver le
service demandé.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="chargerClasse" id="_chargerClasse">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_chargerClasse">#</a>
<code><a href="source-class-RestServeur.html#433-451" title="Go to source code">chargerClasse</a>( <span>string <var>$classe</var></span> )</code>
 
<div class="description short">
<p>La méthode __autoload() charge dynamiquement les classes trouvées dans le
code. Cette fonction est appelée par php5 quand il trouve une instanciation de
classe dans le code.</p>
 
</div>
 
<div class="description detailed hidden">
<p>La méthode __autoload() charge dynamiquement les classes trouvées dans le
code. Cette fonction est appelée par php5 quand il trouve une instanciation de
classe dans le code.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$classe</var></dt>
<dd><code>string</code><br>le nom de la classe appelée.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code></code><br>le fichier contenant la classe doit être inclu par la fonction.<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="executer" id="_executer">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_executer">#</a>
<code><a href="source-class-RestServeur.html#453-490" title="Go to source code">executer</a>( )</code>
 
<div class="description short">
<p>Execute la requête.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Execute la requête.</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="envoyerEnteteStatutHttp" id="_envoyerEnteteStatutHttp">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_envoyerEnteteStatutHttp">#</a>
<code><a href="source-class-RestServeur.html#640-650" title="Go to source code">envoyerEnteteStatutHttp</a>( <span>integer <var>$code</var></span> )</code>
 
<div class="description short">
<p>Envoyer un entête HTTP (version 1.0) de statut. Il remplacera
systématiquement tout entête HTTP de statut précédement envoyé.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Envoyer un entête HTTP (version 1.0) de statut. Il remplacera
systématiquement tout entête HTTP de statut précédement envoyé.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$code</var></dt>
<dd><code>integer</code><br>$code entier indiquant le code du statut de l'entête HTTP à envoyer.</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="gererErreurs" id="_gererErreurs">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_gererErreurs">#</a>
<code><a href="source-class-RestServeur.html#672-713" title="Go to source code">gererErreurs</a>( )</code>
 
<div class="description short">
<p>Si des exceptions ou des erreurs sont soulevées par le serveur ou les
services, elles sont gérées par cette méthode. Si nous avec des erreurs d'un
type différent d'E_USER_NOTICE (réservé au débogage), elle sont renvoyées
sur la sortie standard (via echo). Si seulement des erreurs de type
E_USER_NOTICE, sont présentes, elle sont envoyées en fonction du contenu du
paramètre de config "debogage_mode" :<br />
- Debug::MODE_ECHO : les messages sont affichés en utilisant echo au moment où
ils sont déclenchés dans le code.<br />
- Debug::MODE_NOTICE : les message sont stockés par le gestionnaire d'exception
sous forme d'erreur de type<br />
E_USER_NOTICE et sont renvoyés sur la sortie standard à la fin de l'execution
du programme (via echo).<br />
- Debug::MODE_ENTETE_HTTP : les message sont stockés par le gestionnaire
d'exception sous forme d'erreur de type<br />
E_USER_NOTICE et sont renvoyés dans un entête HTTP (X_REST_DEBOGAGE_MESSAGES)
à la fin de l'execution du programme.<br />
- Autre valeur : les messages sont formatés puis retournés par la fonction de
débogage (à vous de les afficher).</p>
 
</div>
 
<div class="description detailed hidden">
<p>Si des exceptions ou des erreurs sont soulevées par le serveur ou les
services, elles sont gérées par cette méthode. Si nous avec des erreurs d'un
type différent d'E_USER_NOTICE (réservé au débogage), elle sont renvoyées
sur la sortie standard (via echo). Si seulement des erreurs de type
E_USER_NOTICE, sont présentes, elle sont envoyées en fonction du contenu du
paramètre de config "debogage_mode" : - Debug::MODE_ECHO : les messages sont
affichés en utilisant echo au moment où ils sont déclenchés dans le code. -
Debug::MODE_NOTICE : les message sont stockés par le gestionnaire d'exception
sous forme d'erreur de type E_USER_NOTICE et sont renvoyés sur la sortie
standard à la fin de l'execution du programme (via echo). -
Debug::MODE_ENTETE_HTTP : les message sont stockés par le gestionnaire
d'exception sous forme d'erreur de type E_USER_NOTICE et sont renvoyés dans un
entête HTTP (X_REST_DEBOGAGE_MESSAGES) à la fin de l'execution du programme. -
Autre valeur : les messages sont formatés puis retournés par la fonction de
débogage (à vous de les afficher).</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="ajouterMessage" id="_ajouterMessage">
 
<td class="attributes"><code>
public static
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_ajouterMessage">#</a>
<code><a href="source-class-RestServeur.html#716-725" title="Go to source code">ajouterMessage</a>( <span>string <var>$message</var></span> )</code>
 
<div class="description short">
<p>Permet d'ajouter un message d'erreur ou d'avertissement qui sera envoyé au
client. Le message doit être au format texte et en UTF-8.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Permet d'ajouter un message d'erreur ou d'avertissement qui sera envoyé au
client. Le message doit être au format texte et en UTF-8.</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$message</var></dt>
<dd><code>string</code><br>$message le message à envoyer.</dd>
</dl></div>
 
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
<table class="summary" id="constants">
<caption>Constants summary</caption>
<tr data-order="METHODE_GET" id="METHODE_GET">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#44-45" title="Go to source code"><b>METHODE_GET</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'consulter'</span></code></td>
<td class="description"><div>
<a href="#METHODE_GET" class="anchor">#</a>
 
<div class="description short">
<p>Nom de la méthode appelée dans un service pour éxécuter une requête de
type GET.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Nom de la méthode appelée dans un service pour éxécuter une requête de
type GET.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="METHODE_POST" id="METHODE_POST">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#47-48" title="Go to source code"><b>METHODE_POST</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'modifier'</span></code></td>
<td class="description"><div>
<a href="#METHODE_POST" class="anchor">#</a>
 
<div class="description short">
<p>Nom de la méthode appelée dans un service pour éxécuter une requête de
type POST.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Nom de la méthode appelée dans un service pour éxécuter une requête de
type POST.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="METHODE_DELETE" id="METHODE_DELETE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#50-51" title="Go to source code"><b>METHODE_DELETE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'supprimer'</span></code></td>
<td class="description"><div>
<a href="#METHODE_DELETE" class="anchor">#</a>
 
<div class="description short">
<p>Nom de la méthode appelée dans un service pour éxécuter une requête de
type DELETE.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Nom de la méthode appelée dans un service pour éxécuter une requête de
type DELETE.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="METHODE_PUT" id="METHODE_PUT">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#53-54" title="Go to source code"><b>METHODE_PUT</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'ajouter'</span></code></td>
<td class="description"><div>
<a href="#METHODE_PUT" class="anchor">#</a>
 
<div class="description short">
<p>Nom de la méthode appelée dans un service pour éxécuter une requête de
type PUT.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Nom de la méthode appelée dans un service pour éxécuter une requête de
type PUT.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_OK" id="HTTP_CODE_OK">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#56-62" title="Go to source code"><b>HTTP_CODE_OK</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'200'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_OK" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 200 : OK Indiquant le succès de l'accès à un service web par la
méthode GET. L'utiliser lors d'une requète de type GET (consulter) pour
indiquer le succès de l'opération. Sera renvoyée par défaut par PHP.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 200 : OK Indiquant le succès de l'accès à un service web par la
méthode GET. L'utiliser lors d'une requète de type GET (consulter) pour
indiquer le succès de l'opération. Sera renvoyée par défaut par PHP.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_CREATION_OK" id="HTTP_CODE_CREATION_OK">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#64-69" title="Go to source code"><b>HTTP_CODE_CREATION_OK</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'201'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_CREATION_OK" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 201 : Created Indiquant que l'accès à un service web est un
succès et que la ressource a été créée ou modifié. L'utiliser lors d'une
requète de type PUT (ajouter) ou POST (modifier) pour indiquer le succès de
l'opération.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 201 : Created Indiquant que l'accès à un service web est un
succès et que la ressource a été créée ou modifié. L'utiliser lors d'une
requète de type PUT (ajouter) ou POST (modifier) pour indiquer le succès de
l'opération.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.2">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.2</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_ACCEPTE_OK" id="HTTP_CODE_ACCEPTE_OK">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#71-77" title="Go to source code"><b>HTTP_CODE_ACCEPTE_OK</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'202'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_ACCEPTE_OK" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 202 : Accepted Indiquant que la requête a été acceptée mais que
son traitement n'est pas encore terminé. L'utiliser lors d'une requète de type
PUT (ajouter) ou POST (modifier) pour indiquer que les données seront traitées
ultérieurement.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 202 : Accepted Indiquant que la requête a été acceptée mais que
son traitement n'est pas encore terminé. L'utiliser lors d'une requète de type
PUT (ajouter) ou POST (modifier) pour indiquer que les données seront traitées
ultérieurement.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.3">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.3</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_SUPPRESSION_OK" id="HTTP_CODE_SUPPRESSION_OK">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#79-85" title="Go to source code"><b>HTTP_CODE_SUPPRESSION_OK</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'204'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_SUPPRESSION_OK" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 204 : No Content Indique que l'accès à un service web est un
succès et qu'il n'y a pas de contenu à renvoyer. L'utiliser lors d'une
requète de type DELETE (supprimer) pour indiquer le succès de l'opération si
aucun contenu (status) ne doit être renvoyé, sinon utiliser 200 OK.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 204 : No Content Indique que l'accès à un service web est un
succès et qu'il n'y a pas de contenu à renvoyer. L'utiliser lors d'une
requète de type DELETE (supprimer) pour indiquer le succès de l'opération si
aucun contenu (status) ne doit être renvoyé, sinon utiliser 200 OK.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_MAUVAISE_REQUETE" id="HTTP_CODE_MAUVAISE_REQUETE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#87-93" title="Go to source code"><b>HTTP_CODE_MAUVAISE_REQUETE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'400'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_MAUVAISE_REQUETE" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 400 : Bad Request Indique que les paramètres envoyés au service
contiennent des erreurs. L'utiliser pour indiquer l'échec de l'accès au
service. La réponse pourra contenir un message expliquant la source de
l'erreur.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 400 : Bad Request Indique que les paramètres envoyés au service
contiennent des erreurs. L'utiliser pour indiquer l'échec de l'accès au
service. La réponse pourra contenir un message expliquant la source de
l'erreur.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_ACCES_NON_AUTORISE" id="HTTP_CODE_ACCES_NON_AUTORISE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#95-100" title="Go to source code"><b>HTTP_CODE_ACCES_NON_AUTORISE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'401'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_ACCES_NON_AUTORISE" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 401 : Unauthorized Indiquant que l'accès à un service web est
refusé car l'authentification (obligatoire) a échoué pour accéder à la
ressource.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 401 : Unauthorized Indiquant que l'accès à un service web est
refusé car l'authentification (obligatoire) a échoué pour accéder à la
ressource.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_ACCES_INTERDIT" id="HTTP_CODE_ACCES_INTERDIT">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#102-106" title="Go to source code"><b>HTTP_CODE_ACCES_INTERDIT</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'403'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_ACCES_INTERDIT" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 403 : Forbidden Indiquant que le service a compris la requête mais
refuse de la réaliser.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 403 : Forbidden Indiquant que le service a compris la requête mais
refuse de la réaliser.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_RESSOURCE_INTROUVABLE" id="HTTP_CODE_RESSOURCE_INTROUVABLE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#108-112" title="Go to source code"><b>HTTP_CODE_RESSOURCE_INTROUVABLE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'404'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_RESSOURCE_INTROUVABLE" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 404 : Not Found Indiquant que la ressource indiquée par l'url est
introuvable.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 404 : Not Found Indiquant que la ressource indiquée par l'url est
introuvable.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_METHODE_NON_AUTORISE" id="HTTP_CODE_METHODE_NON_AUTORISE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#114-120" title="Go to source code"><b>HTTP_CODE_METHODE_NON_AUTORISE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'405'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_METHODE_NON_AUTORISE" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 405 : Method Not Allowed Indique soit :<br />
- que le service web ne possède pas d'accès la ressource correspondant à la
méthode HTTP employée.<br />
- que la méthode HTTP enployée n'est pas en accord avec la ressource indiquée
par l'url.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 405 : Method Not Allowed Indique soit : - que le service web ne
possède pas d'accès la ressource correspondant à la méthode HTTP employée.
- que la méthode HTTP enployée n'est pas en accord avec la ressource indiquée
par l'url.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_CONFLIT" id="HTTP_CODE_CONFLIT">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#122-128" title="Go to source code"><b>HTTP_CODE_CONFLIT</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'409'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_CONFLIT" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 409 : Conflict Indique qu'un conflit est survenu vis à vis de la
ressource. Par exemple, essayer de créer deux fois la même ressource ou bien
tenter de modifier une ressource qui a été modifiée par ailleurs.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 409 : Conflict Indique qu'un conflit est survenu vis à vis de la
ressource. Par exemple, essayer de créer deux fois la même ressource ou bien
tenter de modifier une ressource qui a été modifiée par ailleurs.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_CONTENU_REQUIS" id="HTTP_CODE_CONTENU_REQUIS">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#130-134" title="Go to source code"><b>HTTP_CODE_CONTENU_REQUIS</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'411'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_CONTENU_REQUIS" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 411 : Length Required Indique que des paramètres passés dans le
contenu de la requête sont nécessaires au service.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 411 : Length Required Indique que des paramètres passés dans le
contenu de la requête sont nécessaires au service.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.12">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.12</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_ECHEC_CONDITION" id="HTTP_CODE_ECHEC_CONDITION">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#136-141" title="Go to source code"><b>HTTP_CODE_ECHEC_CONDITION</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'411'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_ECHEC_CONDITION" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 412 : Precondition Failed Indique que des entêtes envoyés au
serveur sont erronnés. À utiliser quand un service web reçoit de mauvais
entêtes, paramètres et/ou ressources.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 412 : Precondition Failed Indique que des entêtes envoyés au
serveur sont erronnés. À utiliser quand un service web reçoit de mauvais
entêtes, paramètres et/ou ressources.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.13">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.13</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_CONTENU_NON_SUPPORTE" id="HTTP_CODE_CONTENU_NON_SUPPORTE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#143-148" title="Go to source code"><b>HTTP_CODE_CONTENU_NON_SUPPORTE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'415'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_CONTENU_NON_SUPPORTE" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 415 : Unsupported Media Type Indique que le type de média envoyé
au serveur n'est pas accepté par la ressource. À utiliser quand un service web
reçoit un mauvais type de contenu.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 415 : Unsupported Media Type Indique que le type de média envoyé
au serveur n'est pas accepté par la ressource. À utiliser quand un service web
reçoit un mauvais type de contenu.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.16">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.16</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_ERREUR" id="HTTP_CODE_ERREUR">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#150-154" title="Go to source code"><b>HTTP_CODE_ERREUR</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'500'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_ERREUR" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 500 : Internal Server Error. L'utiliser quand le serveur ou un
service soulève une erreur ou une exception.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 500 : Internal Server Error. L'utiliser quand le serveur ou un
service soulève une erreur ou une exception.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_CODE_SERVICE_INDISPONIBLE" id="HTTP_CODE_SERVICE_INDISPONIBLE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#156-160" title="Go to source code"><b>HTTP_CODE_SERVICE_INDISPONIBLE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'503'</span></code></td>
<td class="description"><div>
<a href="#HTTP_CODE_SERVICE_INDISPONIBLE" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 503 : Service Unavailable L'utiliser quand le web service est
momentanément indisponible.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 503 : Service Unavailable L'utiliser quand le web service est
momentanément indisponible.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="HTTP_NON_IMPLEMENTE" id="HTTP_NON_IMPLEMENTE">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#162-166" title="Go to source code"><b>HTTP_NON_IMPLEMENTE</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'501'</span></code></td>
<td class="description"><div>
<a href="#HTTP_NON_IMPLEMENTE" class="anchor">#</a>
 
<div class="description short">
<p>Code HTTP 501 : Not Implemented Indique que le web service ne supporte pas la
fonctionnalité demandée.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Code HTTP 501 : Not Implemented Indique que le web service ne supporte pas la
fonctionnalité demandée.</p>
 
 
<h4>See</h4>
<div class="list">
<a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2</a><br>
</div>
</div>
</div></td>
</tr>
<tr data-order="MOTIF_API_VERSION" id="MOTIF_API_VERSION">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#168-169" title="Go to source code"><b>MOTIF_API_VERSION</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'/^[0-9]+(?:[.][0-9]+)*$/'</span></code></td>
<td class="description"><div>
<a href="#MOTIF_API_VERSION" class="anchor">#</a>
 
<div class="description short">
<p>Motif de l'epression régulière vérfiant la version de l'API.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Motif de l'epression régulière vérfiant la version de l'API.</p>
 
 
</div>
</div></td>
</tr>
<tr data-order="MOTIF_SERVICE_NOM" id="MOTIF_SERVICE_NOM">
 
<td class="attributes"><code>string</code></td>
<td class="name"><code>
<a href="source-class-RestServeur.html#171-172" title="Go to source code"><b>MOTIF_SERVICE_NOM</b></a>
</code></td>
<td class="value"><code><span class="php-quote">'/^[a-z0-9]+(?:[-][a-z0-9]+)*$/'</span></code></td>
<td class="description"><div>
<a href="#MOTIF_SERVICE_NOM" class="anchor">#</a>
 
<div class="description short">
<p>Motif de l'epression régulière vérfiant le nom du service.</p>
 
</div>
 
<div class="description detailed hidden">
<p>Motif de l'epression régulière vérfiant le nom du service.</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/ApiGen/source-class-Controleur.html
New file
0,0 → 1,238
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
<meta name="robots" content="noindex">
 
<title>File Controleur.php | TBFramework - v0.3</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?4111837732"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li class="active"><a href="package-Framework.html">Framework</a>
</li>
<li><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Bdd.html">Bdd</a></li>
<li><a href="class-Cache.html">Cache</a></li>
<li><a href="class-CacheSimple.html">CacheSimple</a></li>
<li><a href="class-Chronometre.html">Chronometre</a></li>
<li><a href="class-Cli.html">Cli</a></li>
<li><a href="class-Config.html">Config</a></li>
<li class="active"><a href="class-Controleur.html">Controleur</a></li>
<li><a href="class-Debug.html">Debug</a></li>
<li><a href="class-Framework.html">Framework</a></li>
<li><a href="class-GestionnaireException.html">GestionnaireException</a></li>
<li><a href="class-I18n.html">I18n</a></li>
<li><a href="class-Log.html">Log</a></li>
<li><a href="class-Registre.html">Registre</a></li>
<li><a href="class-RestClient.html">RestClient</a></li>
<li><a href="class-RestServeur.html">RestServeur</a></li>
<li><a href="class-RestService.html">RestService</a></li>
<li><a href="class-Script.html">Script</a></li>
<li><a href="class-SquelettePhp.html">SquelettePhp</a></li>
<li><a href="class-Url.html">Url</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-Framework.html" title="Summary of Framework"><span>Package</span></a>
</li>
<li>
<a href="class-Controleur.html" title="Summary of Controleur"><span>Class</span></a>
</li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span>
</span><span id="2" class="l"><a class="l" href="#2"> 2: </a><span class="php-comment">// declare(encoding='UTF-8');</span>
</span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment">/**
</span></span><span id="4" class="l"><a class="l" href="#4"> 4: </a><span class="php-comment"> * Classe Controleur, coeur d'une application, c'est normalement la seule classe d'une application
</span></span><span id="5" class="l"><a class="l" href="#5"> 5: </a><span class="php-comment"> * qui devrait être appelée de l'extérieur.
</span></span><span id="6" class="l"><a class="l" href="#6"> 6: </a><span class="php-comment"> * Elle est abstraite donc doit obligatoirement être étendue.
</span></span><span id="7" class="l"><a class="l" href="#7"> 7: </a><span class="php-comment"> *
</span></span><span id="8" class="l"><a class="l" href="#8"> 8: </a><span class="php-comment"> * @category php 5.2
</span></span><span id="9" class="l"><a class="l" href="#9"> 9: </a><span class="php-comment"> * @package Framework
</span></span><span id="10" class="l"><a class="l" href="#10"> 10: </a><span class="php-comment"> * @author Aurélien PERONNET &lt;aurelien@tela-botanica.org&gt;
</span></span><span id="11" class="l"><a class="l" href="#11"> 11: </a><span class="php-comment"> * @author Jean-Pascal MILCENT &lt;jpm@tela-botanica.org&gt;
</span></span><span id="12" class="l"><a class="l" href="#12"> 12: </a><span class="php-comment"> * @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
</span></span><span id="13" class="l"><a class="l" href="#13"> 13: </a><span class="php-comment"> * @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
</span></span><span id="14" class="l"><a class="l" href="#14"> 14: </a><span class="php-comment"> * @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
</span></span><span id="15" class="l"><a class="l" href="#15"> 15: </a><span class="php-comment"> * @version $Id: Controleur.php 332 2011-03-22 16:54:23Z delphine $
</span></span><span id="16" class="l"><a class="l" href="#16"> 16: </a><span class="php-comment"> * @link /doc/framework/
</span></span><span id="17" class="l"><a class="l" href="#17"> 17: </a><span class="php-comment"> *
</span></span><span id="18" class="l"><a class="l" href="#18"> 18: </a><span class="php-comment"> */</span>
</span><span id="19" class="l"><a class="l" href="#19"> 19: </a><span class="php-keyword1">abstract</span> <span class="php-keyword1">class</span> <a id="Controleur" href="#Controleur">Controleur</a> {
</span><span id="20" class="l"><a class="l" href="#20"> 20: </a> <span class="php-comment">/** Variable statique indiquant que les tableaux _GET et _POST ont déjà été encodé au format de l'appli. */</span>
</span><span id="21" class="l"><a class="l" href="#21"> 21: </a> <span class="php-keyword1">private</span> <span class="php-keyword1">static</span> <span class="php-var"><a id="$encodage" href="#$encodage">$encodage</a></span> = <span class="php-keyword1">false</span>;
</span><span id="22" class="l"><a class="l" href="#22"> 22: </a>
</span><span id="23" class="l"><a class="l" href="#23"> 23: </a> <span class="php-comment">/** Chemin de base vers les classes métiers de la partie Modèle de l'application. */</span>
</span><span id="24" class="l"><a class="l" href="#24"> 24: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$base_chemin_modele" href="#$base_chemin_modele">$base_chemin_modele</a></span> = <span class="php-keyword1">null</span>;
</span><span id="25" class="l"><a class="l" href="#25"> 25: </a>
</span><span id="26" class="l"><a class="l" href="#26"> 26: </a> <span class="php-comment">/** Chemin de base vers les fichiers squelette de la partie Vue de l'application. */</span>
</span><span id="27" class="l"><a class="l" href="#27"> 27: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$base_chemin_squelette" href="#$base_chemin_squelette">$base_chemin_squelette</a></span> = <span class="php-keyword1">null</span>;
</span><span id="28" class="l"><a class="l" href="#28"> 28: </a>
</span><span id="29" class="l"><a class="l" href="#29"> 29: </a> <span class="php-comment">/** Chemin de base vers les classes controleurs de la partie Controleur de l'application. */</span>
</span><span id="30" class="l"><a class="l" href="#30"> 30: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$base_chemin_controleur" href="#$base_chemin_controleur">$base_chemin_controleur</a></span> = <span class="php-keyword1">null</span>;
</span><span id="31" class="l"><a class="l" href="#31"> 31: </a>
</span><span id="32" class="l"><a class="l" href="#32"> 32: </a> <span class="php-comment">/** Objet URL contant l'url de la base de l'application. */</span>
</span><span id="33" class="l"><a class="l" href="#33"> 33: </a> <span class="php-keyword1">private</span> <span class="php-var"><a id="$base_url_applicaton" href="#$base_url_applicaton">$base_url_applicaton</a></span> = <span class="php-keyword1">null</span>;
</span><span id="34" class="l"><a class="l" href="#34"> 34: </a>
</span><span id="35" class="l"><a class="l" href="#35"> 35: </a> <span class="php-comment">/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/</span>
</span><span id="36" class="l"><a class="l" href="#36"> 36: </a> <span class="php-keyword1">protected</span> <span class="php-var"><a id="$parametres_obligatoires" href="#$parametres_obligatoires">$parametres_obligatoires</a></span> = <span class="php-keyword1">array</span>(<span class="php-quote">'chemin_modeles'</span>, <span class="php-quote">'chemin_squelettes'</span>, <span class="php-quote">'chemin_controleurs'</span>, <span class="php-quote">'base_url_application'</span>);
</span><span id="37" class="l"><a class="l" href="#37"> 37: </a>
</span><span id="38" class="l"><a class="l" href="#38"> 38: </a> <span class="php-comment">/**
</span></span><span id="39" class="l"><a class="l" href="#39"> 39: </a><span class="php-comment"> * Constructeur par défaut
</span></span><span id="40" class="l"><a class="l" href="#40"> 40: </a><span class="php-comment"> */</span>
</span><span id="41" class="l"><a class="l" href="#41"> 41: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="___construct" href="#___construct">__construct</a>() {
</span><span id="42" class="l"><a class="l" href="#42"> 42: </a> Config::verifierPresenceParametres(<span class="php-var">$this</span>-&gt;parametres_obligatoires);
</span><span id="43" class="l"><a class="l" href="#43"> 43: </a> <span class="php-var">$this</span>-&gt;base_chemin_modele = Config::get(<span class="php-quote">'chemin_modeles'</span>);
</span><span id="44" class="l"><a class="l" href="#44"> 44: </a> <span class="php-var">$this</span>-&gt;base_chemin_squelette = Config::get(<span class="php-quote">'chemin_squelettes'</span>);
</span><span id="45" class="l"><a class="l" href="#45"> 45: </a> <span class="php-var">$this</span>-&gt;base_chemin_controleur = Config::get(<span class="php-quote">'chemin_controleurs'</span>);
</span><span id="46" class="l"><a class="l" href="#46"> 46: </a> <span class="php-var">$this</span>-&gt;base_url_application = <span class="php-keyword1">new</span> Url(Config::get(<span class="php-quote">'base_url_application'</span>));
</span><span id="47" class="l"><a class="l" href="#47"> 47: </a> }
</span><span id="48" class="l"><a class="l" href="#48"> 48: </a>
</span><span id="49" class="l"><a class="l" href="#49"> 49: </a> <span class="php-comment">/**
</span></span><span id="50" class="l"><a class="l" href="#50"> 50: </a><span class="php-comment"> * Charge un modele donné et le rend disponible sous la forme $this-&gt;nom_modele
</span></span><span id="51" class="l"><a class="l" href="#51"> 51: </a><span class="php-comment"> *
</span></span><span id="52" class="l"><a class="l" href="#52"> 52: </a><span class="php-comment"> * @param string $nom_modele le nom du modèle à  charger
</span></span><span id="53" class="l"><a class="l" href="#53"> 53: </a><span class="php-comment"> *
</span></span><span id="54" class="l"><a class="l" href="#54"> 54: </a><span class="php-comment"> * @return boolean false si le chargement a échoué, sinon true.
</span></span><span id="55" class="l"><a class="l" href="#55"> 55: </a><span class="php-comment"> */</span>
</span><span id="56" class="l"><a class="l" href="#56"> 56: </a> <span class="php-keyword1">final</span> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <a id="_chargerModele" href="#_chargerModele">chargerModele</a>(<span class="php-var">$nom_modele</span>) {
</span><span id="57" class="l"><a class="l" href="#57"> 57: </a> <span class="php-var">$sortie</span> = <span class="php-keyword1">true</span>;
</span><span id="58" class="l"><a class="l" href="#58"> 58: </a> <span class="php-keyword1">if</span> (!<span class="php-keyword1">isset</span>(<span class="php-var">$this</span>-&gt;<span class="php-var">$nom_modele</span>)) {
</span><span id="59" class="l"><a class="l" href="#59"> 59: </a> <span class="php-var">$modele</span> = <span class="php-var">$this</span>-&gt;getModele(<span class="php-var">$nom_modele</span>);
</span><span id="60" class="l"><a class="l" href="#60"> 60: </a> <span class="php-keyword1">if</span> (<span class="php-var">$modele</span> !== <span class="php-keyword1">false</span>) {
</span><span id="61" class="l"><a class="l" href="#61"> 61: </a> <span class="php-var">$this</span>-&gt;<span class="php-var">$nom_modele</span> = <span class="php-var">$modele</span>;
</span><span id="62" class="l"><a class="l" href="#62"> 62: </a> } <span class="php-keyword1">else</span> {
</span><span id="63" class="l"><a class="l" href="#63"> 63: </a> <span class="php-var">$sortie</span> = <span class="php-keyword1">false</span>;
</span><span id="64" class="l"><a class="l" href="#64"> 64: </a> }
</span><span id="65" class="l"><a class="l" href="#65"> 65: </a> }
</span><span id="66" class="l"><a class="l" href="#66"> 66: </a> <span class="php-keyword1">return</span> <span class="php-var">$sortie</span>;
</span><span id="67" class="l"><a class="l" href="#67"> 67: </a> }
</span><span id="68" class="l"><a class="l" href="#68"> 68: </a>
</span><span id="69" class="l"><a class="l" href="#69"> 69: </a> <span class="php-comment">/**
</span></span><span id="70" class="l"><a class="l" href="#70"> 70: </a><span class="php-comment"> * Retourne un modele donné
</span></span><span id="71" class="l"><a class="l" href="#71"> 71: </a><span class="php-comment"> *
</span></span><span id="72" class="l"><a class="l" href="#72"> 72: </a><span class="php-comment"> * @param string $nom_modele le nom du fichier modèle à charger sans son extension
</span></span><span id="73" class="l"><a class="l" href="#73"> 73: </a><span class="php-comment"> * @param String $ext l'extension du fichier du modèel (par défaut : &quot;.php&quot;
</span></span><span id="74" class="l"><a class="l" href="#74"> 74: </a><span class="php-comment"> *
</span></span><span id="75" class="l"><a class="l" href="#75"> 75: </a><span class="php-comment"> * @return mixed false si le chargement a échoué, sinon l'objet du modèle demandé.
</span></span><span id="76" class="l"><a class="l" href="#76"> 76: </a><span class="php-comment"> */</span>
</span><span id="77" class="l"><a class="l" href="#77"> 77: </a> <span class="php-keyword1">final</span> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getModele" href="#_getModele">getModele</a>(<span class="php-var">$nom_modele</span>, <span class="php-var">$ext</span> = <span class="php-quote">'.php'</span>) {
</span><span id="78" class="l"><a class="l" href="#78"> 78: </a> <span class="php-var">$sortie</span> = <span class="php-keyword1">false</span>;
</span><span id="79" class="l"><a class="l" href="#79"> 79: </a>
</span><span id="80" class="l"><a class="l" href="#80"> 80: </a> <span class="php-var">$chemin_modele</span> = <span class="php-var">$this</span>-&gt;registre-&gt;get(<span class="php-quote">'base_chemin_modele'</span>).<span class="php-var">$nom_modele</span>.<span class="php-var">$ext</span>;
</span><span id="81" class="l"><a class="l" href="#81"> 81: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">file_exists</span>(<span class="php-var">$chemin_modele</span>)) {
</span><span id="82" class="l"><a class="l" href="#82"> 82: </a> <span class="php-keyword1">include_once</span> <span class="php-var">$chemin_modele</span>;
</span><span id="83" class="l"><a class="l" href="#83"> 83: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">class_exists</span>(<span class="php-var">$nom_modele</span>)) {
</span><span id="84" class="l"><a class="l" href="#84"> 84: </a> <span class="php-var">$sortie</span> = <span class="php-keyword1">new</span> <span class="php-var">$nom_modele</span>;
</span><span id="85" class="l"><a class="l" href="#85"> 85: </a> }
</span><span id="86" class="l"><a class="l" href="#86"> 86: </a> }
</span><span id="87" class="l"><a class="l" href="#87"> 87: </a> <span class="php-keyword1">return</span> <span class="php-var">$sortie</span>;
</span><span id="88" class="l"><a class="l" href="#88"> 88: </a> }
</span><span id="89" class="l"><a class="l" href="#89"> 89: </a>
</span><span id="90" class="l"><a class="l" href="#90"> 90: </a> <span class="php-comment">/**
</span></span><span id="91" class="l"><a class="l" href="#91"> 91: </a><span class="php-comment"> * Fonction prenant en paramètre le nom d'un squelette et un tableau associatif de données,
</span></span><span id="92" class="l"><a class="l" href="#92"> 92: </a><span class="php-comment"> * en extrait les variables, charge le squelette et retourne le résultat des deux combinés.
</span></span><span id="93" class="l"><a class="l" href="#93"> 93: </a><span class="php-comment"> *
</span></span><span id="94" class="l"><a class="l" href="#94"> 94: </a><span class="php-comment"> * @param String $nom_squelette le nom du squelette sans son extension
</span></span><span id="95" class="l"><a class="l" href="#95"> 95: </a><span class="php-comment"> * @param Array $donnees un tableau associatif contenant les variables a injecter dans la vue
</span></span><span id="96" class="l"><a class="l" href="#96"> 96: </a><span class="php-comment"> * @param String $ext l'extension du fichier du squelette (par défaut : &quot;.tpl.html&quot;
</span></span><span id="97" class="l"><a class="l" href="#97"> 97: </a><span class="php-comment"> *
</span></span><span id="98" class="l"><a class="l" href="#98"> 98: </a><span class="php-comment"> * @return boolean false si la vue n'existe pas, sinon la chaine résultat.
</span></span><span id="99" class="l"><a class="l" href="#99"> 99: </a><span class="php-comment"> */</span>
</span><span id="100" class="l"><a class="l" href="#100">100: </a> <span class="php-keyword1">final</span> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_getVue" href="#_getVue">getVue</a>(<span class="php-var">$nom_squelette</span>, &amp;<span class="php-var">$donnees</span> = <span class="php-keyword1">array</span>(), <span class="php-var">$ext</span> = <span class="php-quote">'.tpl.html'</span>) {
</span><span id="101" class="l"><a class="l" href="#101">101: </a> <span class="php-var">$donnees</span> = <span class="php-var">$this</span>-&gt;preTraiterDonnees(<span class="php-var">$donnees</span>);
</span><span id="102" class="l"><a class="l" href="#102">102: </a>
</span><span id="103" class="l"><a class="l" href="#103">103: </a> <span class="php-var">$chemin_squelette</span> = <span class="php-var">$this</span>-&gt;base_chemin_squelette.<span class="php-var">$nom_squelette</span>.<span class="php-var">$ext</span>;
</span><span id="104" class="l"><a class="l" href="#104">104: </a> <span class="php-var">$sortie</span> = SquelettePhp::analyser(<span class="php-var">$chemin_squelette</span>, <span class="php-var">$donnees</span>);
</span><span id="105" class="l"><a class="l" href="#105">105: </a>
</span><span id="106" class="l"><a class="l" href="#106">106: </a> <span class="php-keyword1">return</span> <span class="php-var">$sortie</span>;
</span><span id="107" class="l"><a class="l" href="#107">107: </a> }
</span><span id="108" class="l"><a class="l" href="#108">108: </a>
</span><span id="109" class="l"><a class="l" href="#109">109: </a> <span class="php-comment">/**
</span></span><span id="110" class="l"><a class="l" href="#110">110: </a><span class="php-comment"> * Fonction prenant en paramètre un tableau de données et effectuant un traitement dessus.
</span></span><span id="111" class="l"><a class="l" href="#111">111: </a><span class="php-comment"> * Cette fonction est à surcharger dans les classes filles pour automatiser un traitement
</span></span><span id="112" class="l"><a class="l" href="#112">112: </a><span class="php-comment"> * avant chaque chargement de vue.
</span></span><span id="113" class="l"><a class="l" href="#113">113: </a><span class="php-comment"> *
</span></span><span id="114" class="l"><a class="l" href="#114">114: </a><span class="php-comment"> * @param Array $donnees Le tableau de données à traiter
</span></span><span id="115" class="l"><a class="l" href="#115">115: </a><span class="php-comment"> *
</span></span><span id="116" class="l"><a class="l" href="#116">116: </a><span class="php-comment"> * @return Array $donnees Le tableau de données traité
</span></span><span id="117" class="l"><a class="l" href="#117">117: </a><span class="php-comment"> */</span>
</span><span id="118" class="l"><a class="l" href="#118">118: </a> <span class="php-keyword1">protected</span> <span class="php-keyword1">function</span> <a id="_preTraiterDonnees" href="#_preTraiterDonnees">preTraiterDonnees</a>(&amp;<span class="php-var">$donnees</span>) {
</span><span id="119" class="l"><a class="l" href="#119">119: </a> <span class="php-keyword1">return</span> <span class="php-var">$donnees</span>;
</span><span id="120" class="l"><a class="l" href="#120">120: </a> }
</span><span id="121" class="l"><a class="l" href="#121">121: </a>}
</span><span id="122" class="l"><a class="l" href="#122">122: </a></span><span class="xlang">?&gt;</span></code></pre>
 
<div id="footer">
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
/branches/v0.3-aleaume/doc/genererApiGen.sh
New file
0,0 → 1,62
#!/bin/bash
########################################################################################################################
# But : création de la doc ApiGen du Framework.
# Auteur : Jean-Pascal Milcent <jpm@tela-botanica.org>
# License : GPL v3
# Création : 12 mars 2014
# Version: 2
# Exemple : ./genererApiGen.sh -t "Mon Titre"
########################################################################################################################
# Constante
TITRE=""
SOURCE="./../framework"
CIBLE="./ApiGen"
IGNORER=".htaccess,config.ini"
FORMAT="clean"
 
# Aide
E_OPTERR=65
if [ "$1" = '--help' ]
then # Le script a besoin d'au moins un argument sur la ligne de commande
echo "Usage $0 -[parameters -t ]"
echo "Paramétres : "
echo " -t: indiquer le titre de la doc"
exit $E_OPTERR
fi
 
# Récupération des paramètres et des options de la ligne de commande
TEMP=`getopt -o t: -l help: -- "$@"`
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
eval set -- "$TEMP"
while [ ! -z "$1" ] ; do
#echo $1" # "$2
case "$1" in
-t) TITRE=$2;;
--) shift ; break ;;
*) echo "Internal error!" ; exit 1 ;;
esac
shift 2
done
 
# Suppression des dossiers précédent de la doc
if [ -d PhpDoc ]; then
rm -fR ApiGen
mkdir ApiGen
fi;
 
echo "Génération de la documentation :";
/opt/lampp/bin/php /opt/lampp/bin/apigen --source "$SOURCE" --destination "$CIBLE" --title "$TITRE" \
--charset UTF-8 \
--exclude "*/doc/*" \
--exclude "*/exemple/*" \
--exclude "*/test/*" \
--access-levels "public,protected" \
--internal "no" \
--php "yes" \
--tree "yes" \
--deprecated "yes" \
--todo "yes" \
--download "no" \
--source-code "yes" \
--colors "yes" \
--update-check "no"
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:eol-style
+native
\ No newline at end of property