159 |
jpm |
1 |
<html>
|
|
|
2 |
<head>
|
|
|
3 |
<title>File Source for Application.php</title>
|
|
|
4 |
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
|
|
|
5 |
<link rel="stylesheet" type="text/css" href="../media/style.css">
|
|
|
6 |
</head>
|
|
|
7 |
<body>
|
|
|
8 |
|
|
|
9 |
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
|
|
|
10 |
<tr>
|
|
|
11 |
<td class="header_top">Framework</td>
|
|
|
12 |
</tr>
|
|
|
13 |
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
|
|
14 |
<tr>
|
|
|
15 |
<td class="header_menu">
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
[ <a href="../classtrees_Framework.html" class="menu">class tree: Framework</a> ]
|
|
|
19 |
[ <a href="../elementindex_Framework.html" class="menu">index: Framework</a> ]
|
|
|
20 |
[ <a href="../elementindex.html" class="menu">all elements</a> ]
|
|
|
21 |
</td>
|
|
|
22 |
</tr>
|
|
|
23 |
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
|
|
24 |
</table>
|
|
|
25 |
|
|
|
26 |
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
|
|
27 |
<tr valign="top">
|
|
|
28 |
<td width="200" class="menu">
|
|
|
29 |
<b>Packages:</b><br />
|
|
|
30 |
<a href="../li_Framework.html">Framework</a><br />
|
|
|
31 |
<br /><br />
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
</td>
|
|
|
35 |
<td>
|
|
|
36 |
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
|
|
|
37 |
|
|
|
38 |
<h1 align="center">Source for file Application.php</h1>
|
|
|
39 |
<p>Documentation is available at <a href="../Framework/_Application.php.html">Application.php</a></p>
|
|
|
40 |
<div class="src-code">
|
|
|
41 |
<ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
|
|
42 |
<li><div class="src-line"><a name="a2"></a><span class="src-comm">// declare(encoding='UTF-8');</span></div></li>
|
|
|
43 |
<li><div class="src-line"><a name="a3"></a><span class="src-doc">/**</span></div></li>
|
|
|
44 |
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * Classe fournissant des informations au Framework sur l'application.</span></div></li>
|
|
|
45 |
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
|
|
46 |
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * PHP version 5</span></div></li>
|
|
|
47 |
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> *</span></div></li>
|
|
|
48 |
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@category</span><span class="src-doc"> Debogage</span></div></li>
|
|
|
49 |
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Framework</span></div></li>
|
|
|
50 |
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> // Auteur principal :</span></div></li>
|
|
|
51 |
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Jean-Pascal MILCENT <jpm@tela-botanica.org></span></div></li>
|
|
|
52 |
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> // Autres auteurs :</span></div></li>
|
|
|
53 |
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> GPL v3 <http://www.gnu.org/licenses/gpl.txt></span></div></li>
|
|
|
54 |
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt></span></div></li>
|
|
|
55 |
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $$Id: Application.php 153 2010-03-04 10:48:32Z jpm $$</span></div></li>
|
|
|
56 |
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> 1999-2009 Tela Botanica (accueil@tela-botanica.org)</span></div></li>
|
|
|
57 |
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> */</span></div></li>
|
|
|
58 |
<li><div class="src-line"><a name="a18"></a><span class="src-key">class </span><a href="../Framework/Application.html">Application</a> <span class="src-sym">{</span></div></li>
|
|
|
59 |
<li><div class="src-line"><a name="a19"></a> </div></li>
|
|
|
60 |
<li><div class="src-line"><a name="a20"></a> <span class="src-doc">/**</span></div></li>
|
|
|
61 |
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * tableau d'informations sur l'application</span></div></li>
|
|
|
62 |
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> */</span></div></li>
|
|
|
63 |
<li><div class="src-line"><a name="a23"></a> <span class="src-key">private </span><span class="src-key">static </span><span class="src-var">$info </span>= <span class="src-id">null</span><span class="src-sym">;</span></div></li>
|
|
|
64 |
<li><div class="src-line"><a name="a24"></a> <span class="src-doc">/**</span></div></li>
|
|
|
65 |
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * chemin de base de l'application</span></div></li>
|
|
|
66 |
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> */</span></div></li>
|
|
|
67 |
<li><div class="src-line"><a name="a27"></a> <span class="src-key">private </span><span class="src-key">static </span><span class="src-var">$chemin </span>= <span class="src-id">null</span><span class="src-sym">;</span></div></li>
|
|
|
68 |
<li><div class="src-line"><a name="a28"></a> </div></li>
|
|
|
69 |
<li><div class="src-line"><a name="a29"></a> <span class="src-doc">/**</span></div></li>
|
|
|
70 |
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * Modificateur pour le chemin de base</span></div></li>
|
|
|
71 |
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$chemin_fichier_principal </span><span class="src-doc">chemin de base</span></div></li>
|
|
|
72 |
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> */</span></div></li>
|
|
|
73 |
<li><div class="src-line"><a name="a33"></a> <span class="src-key">public </span><span class="src-key">static </span><span class="src-key">function </span><a href="../Framework/Application.html#methodsetChemin">setChemin</a><span class="src-sym">(</span><span class="src-var">$chemin_fichier_principal</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li>
|
|
|
74 |
<li><div class="src-line"><a name="a34"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$chemin </span>=== <span class="src-id">null</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li>
|
|
|
75 |
<li><div class="src-line"><a name="a35"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/file_exists">file_exists</a><span class="src-sym">(</span><span class="src-var">$chemin_fichier_principal</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li>
|
|
|
76 |
<li><div class="src-line"><a name="a36"></a> <a href="http://www.php.net/trigger_error">trigger_error</a><span class="src-sym">(</span><span class="src-str">"Le fichier indiqué n'existe pas. Utilisez __FILE__ dans la méthode set()."</span><span class="src-sym">, </span><span class="src-id">E_USER_ERROR</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
|
|
77 |
<li><div class="src-line"><a name="a37"></a> <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></div></li>
|
|
|
78 |
<li><div class="src-line"><a name="a38"></a> <span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$chemin </span>= <span class="src-id">dirname</span><span class="src-sym">(</span><span class="src-var">$chemin_fichier_principal</span><span class="src-sym">)</span>.<span class="src-id"><a href="../Framework/_autoload.inc.php.html#defineDS">DS</a></span><span class="src-sym">;</span></div></li>
|
|
|
79 |
<li><div class="src-line"><a name="a39"></a> <span class="src-sym">}</span></div></li>
|
|
|
80 |
<li><div class="src-line"><a name="a40"></a> <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></div></li>
|
|
|
81 |
<li><div class="src-line"><a name="a41"></a> <a href="http://www.php.net/trigger_error">trigger_error</a><span class="src-sym">(</span><span class="src-str">"Le chemin de l'application a déjà été enregistré auprès du Framework"</span><span class="src-sym">, </span><span class="src-id">E_USER_WARNING</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
|
|
82 |
<li><div class="src-line"><a name="a42"></a> <span class="src-sym">}</span></div></li>
|
|
|
83 |
<li><div class="src-line"><a name="a43"></a> <span class="src-sym">}</span></div></li>
|
|
|
84 |
<li><div class="src-line"><a name="a44"></a> </div></li>
|
|
|
85 |
<li><div class="src-line"><a name="a45"></a> <span class="src-doc">/**</span></div></li>
|
|
|
86 |
<li><div class="src-line"><a name="a46"></a><span class="src-doc"> * accesseur pour le chemin</span></div></li>
|
|
|
87 |
<li><div class="src-line"><a name="a47"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span><span class="src-doc">le chemin</span></div></li>
|
|
|
88 |
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> */</span></div></li>
|
|
|
89 |
<li><div class="src-line"><a name="a49"></a> <span class="src-key">public </span><span class="src-key">static </span><span class="src-key">function </span><a href="../Framework/Application.html#methodgetChemin">getChemin</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li>
|
|
|
90 |
<li><div class="src-line"><a name="a50"></a> <span class="src-key">return </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$chemin</span><span class="src-sym">;</span></div></li>
|
|
|
91 |
<li><div class="src-line"><a name="a51"></a> <span class="src-sym">}</span></div></li>
|
|
|
92 |
<li><div class="src-line"><a name="a52"></a> </div></li>
|
|
|
93 |
<li><div class="src-line"><a name="a53"></a> <span class="src-doc">/** Le tableau des informations sur l'application possède les clés suivantes :</span></div></li>
|
|
|
94 |
<li><div class="src-line"><a name="a54"></a><span class="src-doc"> * - nom : nom de l'application</span></div></li>
|
|
|
95 |
<li><div class="src-line"><a name="a55"></a><span class="src-doc"> * - abr : abréviation de l'application</span></div></li>
|
|
|
96 |
<li><div class="src-line"><a name="a56"></a><span class="src-doc"> * - encodage : encodage de l'application (ISO-8859-15, UTF-8...)</span></div></li>
|
|
|
97 |
<li><div class="src-line"><a name="a57"></a><span class="src-doc"> *</span></div></li>
|
|
|
98 |
<li><div class="src-line"><a name="a58"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc-var">$info </span><span class="src-doc">tableau fournissant des informations sur l'application</span></div></li>
|
|
|
99 |
<li><div class="src-line"><a name="a59"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">void </span></div></li>
|
|
|
100 |
<li><div class="src-line"><a name="a60"></a><span class="src-doc"> */</span></div></li>
|
|
|
101 |
<li><div class="src-line"><a name="a61"></a> <span class="src-key">public </span><span class="src-key">static </span><span class="src-key">function </span><a href="../Framework/Application.html#methodsetInfo">setInfo</a><span class="src-sym">(</span><span class="src-var">$info</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li>
|
|
|
102 |
<li><div class="src-line"><a name="a62"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$info </span>=== <span class="src-id">null</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li>
|
|
|
103 |
<li><div class="src-line"><a name="a63"></a> <span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$info </span>= <span class="src-var">$info</span><span class="src-sym">;</span></div></li>
|
|
|
104 |
<li><div class="src-line"><a name="a64"></a> <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></div></li>
|
|
|
105 |
<li><div class="src-line"><a name="a65"></a> <span class="src-id">trigger_error</span><span class="src-sym">(</span><span class="src-str">"Le informations de l'application ont déjà été enregistrées auprès du Framework"</span><span class="src-sym">, </span><span class="src-id">E_USER_WARNING</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
|
|
106 |
<li><div class="src-line"><a name="a66"></a> <span class="src-sym">}</span></div></li>
|
|
|
107 |
<li><div class="src-line"><a name="a67"></a> <span class="src-sym">}</span></div></li>
|
|
|
108 |
<li><div class="src-line"><a name="a68"></a> </div></li>
|
|
|
109 |
<li><div class="src-line"><a name="a69"></a> <span class="src-doc">/**</span></div></li>
|
|
|
110 |
<li><div class="src-line"><a name="a70"></a><span class="src-doc"> * accesseur pour le tableau d'infos</span></div></li>
|
|
|
111 |
<li><div class="src-line"><a name="a71"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$cle </span><span class="src-doc">la clé à laquelle on veut accéder</span></div></li>
|
|
|
112 |
<li><div class="src-line"><a name="a72"></a><span class="src-doc"> */</span></div></li>
|
|
|
113 |
<li><div class="src-line"><a name="a73"></a> <span class="src-key">public </span><span class="src-key">static </span><span class="src-key">function </span><a href="../Framework/Application.html#methodgetInfo">getInfo</a><span class="src-sym">(</span><span class="src-var">$cle </span>= <span class="src-id">null</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li>
|
|
|
114 |
<li><div class="src-line"><a name="a74"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$cle </span>!== <span class="src-id">null</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li>
|
|
|
115 |
<li><div class="src-line"><a name="a75"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$info</span><span class="src-sym">[</span><span class="src-var">$cle</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></div></li>
|
|
|
116 |
<li><div class="src-line"><a name="a76"></a> <span class="src-key">return </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$info</span><span class="src-sym">[</span><span class="src-var">$cle</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
|
|
117 |
<li><div class="src-line"><a name="a77"></a> <span class="src-sym">}</span></div></li>
|
|
|
118 |
<li><div class="src-line"><a name="a78"></a> <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></div></li>
|
|
|
119 |
<li><div class="src-line"><a name="a79"></a> <span class="src-key">return </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$info</span><span class="src-sym">;</span></div></li>
|
|
|
120 |
<li><div class="src-line"><a name="a80"></a> <span class="src-sym">}</span></div></li>
|
|
|
121 |
<li><div class="src-line"><a name="a81"></a> <span class="src-sym">}</span></div></li>
|
|
|
122 |
<li><div class="src-line"><a name="a82"></a><span class="src-sym">}</span></div></li>
|
|
|
123 |
</ol>
|
|
|
124 |
</div>
|
|
|
125 |
<div class="credit">
|
|
|
126 |
<hr />
|
|
|
127 |
Documentation generated on Thu, 04 Mar 2010 19:27:28 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
|
|
128 |
</div>
|
|
|
129 |
</td></tr></table>
|
|
|
130 |
</td>
|
|
|
131 |
</tr>
|
|
|
132 |
</table>
|
|
|
133 |
|
|
|
134 |
</body>
|
|
|
135 |
</html>
|