Subversion Repositories Applications.framework

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
159 jpm 1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
  <html xmlns="http://www.w3.org/1999/xhtml">
4
		<head>
5
			<!-- template designed by Marco Von Ballmoos  -->
6
			<title>File Source for autoload.inc.php</title>
7
			<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
8
			<link rel="stylesheet" href="../media/stylesheet.css" />
9
											</head>
10
		<body>
11
						<h1>Source for file autoload.inc.php</h1>
12
<p>Documentation is available at <a href="../Framework/_autoload.inc.php.html">autoload.inc.php</a></p>
13
<div class="src-code">
14
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
15
<li><div class="src-line"><a name="a2"></a><span class="src-comm">//&nbsp;declare(encoding='UTF-8');</span></div></li>
16
<li><div class="src-line"><a name="a3"></a><span class="src-doc">/**</span></div></li>
17
<li><div class="src-line"><a name="a4"></a><span class="src-doc">&nbsp;*&nbsp;Fichier&nbsp;contenant&nbsp;la&nbsp;fonction&nbsp;de&nbsp;chargement&nbsp;automatique&nbsp;de&nbsp;classes,&nbsp;il&nbsp;doit&nbsp;toujours&nbsp;rester&nbsp;à&nbsp;la&nbsp;racine</span></div></li>
18
<li><div class="src-line"><a name="a5"></a><span class="src-doc">&nbsp;*&nbsp;du&nbsp;framework&nbsp;car&nbsp;il&nbsp;initialise&nbsp;le&nbsp;chemin&nbsp;de&nbsp;l'application&nbsp;en&nbsp;se&nbsp;basant&nbsp;sur&nbsp;son&nbsp;propre&nbsp;emplacement.</span></div></li>
19
<li><div class="src-line"><a name="a6"></a><span class="src-doc">&nbsp;*</span></div></li>
20
<li><div class="src-line"><a name="a7"></a><span class="src-doc">&nbsp;*&nbsp;PHP&nbsp;Version&nbsp;5.1.2</span></div></li>
21
<li><div class="src-line"><a name="a8"></a><span class="src-doc">&nbsp;*</span></div></li>
22
<li><div class="src-line"><a name="a9"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@category</span><span class="src-doc">&nbsp;&nbsp;Fichier_De_Fonctions</span></div></li>
23
<li><div class="src-line"><a name="a10"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;&nbsp;&nbsp;Framework</span></div></li>
24
<li><div class="src-line"><a name="a11"></a><span class="src-doc">&nbsp;//&nbsp;Auteur&nbsp;principal&nbsp;:</span></div></li>
25
<li><div class="src-line"><a name="a12"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;Aurelien&nbsp;PERONNET&nbsp;&lt;aurelien@tela-botanica.org&gt;</span></div></li>
26
<li><div class="src-line"><a name="a13"></a><span class="src-doc">&nbsp;//&nbsp;Autres&nbsp;auteurs&nbsp;:</span></div></li>
27
<li><div class="src-line"><a name="a14"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;Jean-Pascal&nbsp;MILCENT&nbsp;&lt;jpm@tela-botanica.org&gt;</span></div></li>
28
<li><div class="src-line"><a name="a15"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;GPL&nbsp;v3&nbsp;&lt;http://www.gnu.org/licenses/gpl.txt&gt;</span></div></li>
29
<li><div class="src-line"><a name="a16"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;CECILL&nbsp;v2&nbsp;&lt;http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt&gt;</span></div></li>
30
<li><div class="src-line"><a name="a17"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@version</span><span class="src-doc">&nbsp;$$Id:&nbsp;autoload.inc.php&nbsp;153&nbsp;2010-03-04&nbsp;10:48:32Z&nbsp;jpm&nbsp;$$</span></div></li>
31
<li><div class="src-line"><a name="a18"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@copyright</span><span class="src-doc">&nbsp;1999-2009&nbsp;Tela&nbsp;Botanica&nbsp;(accueil@tela-botanica.org)</span></div></li>
32
<li><div class="src-line"><a name="a19"></a><span class="src-doc">&nbsp;*/</span></div></li>
33
<li><div class="src-line"><a name="a20"></a>&nbsp;</div></li>
34
<li><div class="src-line"><a name="a21"></a><span class="src-comm">//&nbsp;Redéfinition&nbsp;de&nbsp;la&nbsp;constante&nbsp;DIRECTORY_SEPARATOR</span></div></li>
35
<li><div class="src-line"><a name="a22"></a><span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/defined">defined</a><span class="src-sym">(</span><span class="src-str">'DS'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
36
<li><div class="src-line"><a name="a23"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'DS'</span><span class="src-sym">,&nbsp;</span><span class="src-id">DIRECTORY_SEPARATOR</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
37
<li><div class="src-line"><a name="a24"></a><span class="src-sym">}</span></div></li>
38
<li><div class="src-line"><a name="a25"></a><span class="src-comm">//&nbsp;Redéfinition&nbsp;de&nbsp;la&nbsp;constante&nbsp;PATH_SEPARATOR</span></div></li>
39
<li><div class="src-line"><a name="a26"></a><span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/defined">defined</a><span class="src-sym">(</span><span class="src-str">'PS'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
40
<li><div class="src-line"><a name="a27"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'PS'</span><span class="src-sym">,&nbsp;</span><span class="src-id">PATH_SEPARATOR</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
41
<li><div class="src-line"><a name="a28"></a><span class="src-sym">}</span></div></li>
42
<li><div class="src-line"><a name="a29"></a>&nbsp;</div></li>
43
<li><div class="src-line"><a name="a30"></a><span class="src-comm">//&nbsp;Autoload&nbsp;pour&nbsp;le&nbsp;Framework</span></div></li>
44
<li><div class="src-line"><a name="a31"></a><span class="src-key">function&nbsp;</span><a href="../Framework/_autoload.inc.php.html#functionautoloadFw">autoloadFw</a><span class="src-sym">(</span><span class="src-var">$nom_classe_fw</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
45
<li><div class="src-line"><a name="a32"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$fichier_a_inclure&nbsp;</span>=&nbsp;<a href="http://www.php.net/dirname">dirname</a><span class="src-sym">(</span>__FILE__<span class="src-sym">)</span>.<span class="src-id"><a href="../Framework/_autoload.inc.php.html#defineDS">DS</a></span>.<span class="src-var">$nom_classe_fw</span>.<span class="src-str">'.php'</span><span class="src-sym">;</span></div></li>
46
<li><div class="src-line"><a name="a33"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</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">$fichier_a_inclure</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
47
<li><div class="src-line"><a name="a34"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-inc">include_once&nbsp;</span><span class="src-var">$fichier_a_inclure</span><span class="src-sym">;</span></div></li>
48
<li><div class="src-line"><a name="a35"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">null</span><span class="src-sym">;</span></div></li>
49
<li><div class="src-line"><a name="a36"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
50
<li><div class="src-line"><a name="a37"></a><span class="src-sym">}</span></div></li>
51
<li><div class="src-line"><a name="a38"></a><a href="http://www.php.net/spl_autoload_register">spl_autoload_register</a><span class="src-sym">(</span><span class="src-str">'autoloadFw'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
52
<li><div class="src-line"><a name="a39"></a>&nbsp;</div></li>
53
<li><div class="src-line"><a name="a40"></a><span class="src-comm">//&nbsp;Instanciation&nbsp;du&nbsp;gestionnaire&nbsp;d'exception</span></div></li>
54
<li><div class="src-line"><a name="a41"></a><span class="src-id"><a href="../Framework/GestionnaireException.html">GestionnaireException</a></span><span class="src-sym">::</span><a href="../Framework/GestionnaireException.html#methodgetInstance">getInstance</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
55
<li><div class="src-line"><a name="a42"></a><span class="src-comm">//&nbsp;Instanciation&nbsp;du&nbsp;gestionnaire&nbsp;de&nbsp;logs</span></div></li>
56
<li><div class="src-line"><a name="a43"></a><span class="src-id"><a href="../Framework/Log.html">Log</a></span><span class="src-sym">::</span><a href="../Framework/Log.html#methodgetInstance">getInstance</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
57
<li><div class="src-line"><a name="a44"></a><span class="src-comm">//&nbsp;Encodage&nbsp;de&nbsp;l'application&nbsp;(défini&nbsp;ici&nbsp;car&nbsp;on&nbsp;peut&nbsp;avoir&nbsp;des&nbsp;sorties&nbsp;d'erreurs&nbsp;dès&nbsp;le&nbsp;début)</span></div></li>
58
<li><div class="src-line"><a name="a45"></a><a href="http://www.php.net/mb_internal_encoding">mb_internal_encoding</a><span class="src-sym">(</span><span class="src-id"><a href="../Framework/Config.html">Config</a></span><span class="src-sym">::</span><a href="../Framework/Config.html#methodget">get</a><span class="src-sym">(</span><span class="src-str">'appli_encodage'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
59
<li><div class="src-line"><a name="a46"></a>&nbsp;</div></li>
60
<li><div class="src-line"><a name="a47"></a><span class="src-comm">//&nbsp;Autoload&nbsp;par&nbsp;défaut&nbsp;pour&nbsp;l'application</span></div></li>
61
<li><div class="src-line"><a name="a48"></a><span class="src-key">function&nbsp;</span><a href="../Framework/_autoload.inc.php.html#functionautoloadAppliDefaut">autoloadAppliDefaut</a><span class="src-sym">(</span><span class="src-var">$nom_classe</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
62
<li><div class="src-line"><a name="a49"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$dossiers_classes&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-id"><a href="../Framework/Config.html">Config</a></span><span class="src-sym">::</span><a href="../Framework/Config.html#methodget">get</a><span class="src-sym">(</span><span class="src-str">'chemin_controleurs'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
63
<li><div class="src-line"><a name="a50"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../Framework/Config.html">Config</a></span><span class="src-sym">::</span><a href="../Framework/Config.html#methodget">get</a><span class="src-sym">(</span><span class="src-str">'chemin_modeles'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
64
<li><div class="src-line"><a name="a51"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../Framework/Config.html">Config</a></span><span class="src-sym">::</span><a href="../Framework/Config.html#methodget">get</a><span class="src-sym">(</span><span class="src-str">'chemin_bibliotheque'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
65
<li><div class="src-line"><a name="a52"></a>&nbsp;</div></li>
66
<li><div class="src-line"><a name="a53"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">foreach&nbsp;</span><span class="src-sym">(</span><span class="src-var">$dossiers_classes&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$chemin</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
67
<li><div class="src-line"><a name="a54"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$fichier_a_tester&nbsp;</span>=&nbsp;<span class="src-var">$chemin</span>.<span class="src-var">$nom_classe</span>.<span class="src-str">'.php'</span><span class="src-sym">;</span></div></li>
68
<li><div class="src-line"><a name="a55"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</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">$fichier_a_tester</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
69
<li><div class="src-line"><a name="a56"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-inc">include_once&nbsp;</span><span class="src-var">$fichier_a_tester</span><span class="src-sym">;</span></div></li>
70
<li><div class="src-line"><a name="a57"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">null</span><span class="src-sym">;</span></div></li>
71
<li><div class="src-line"><a name="a58"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
72
<li><div class="src-line"><a name="a59"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
73
<li><div class="src-line"><a name="a60"></a><span class="src-sym">}</span></div></li>
74
<li><div class="src-line"><a name="a61"></a><a href="http://www.php.net/spl_autoload_register">spl_autoload_register</a><span class="src-sym">(</span><span class="src-str">'autoloadAppliDefaut'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
75
<li><div class="src-line"><a name="a62"></a>&nbsp;</div></li>
76
<li><div class="src-line"><a name="a63"></a><span class="src-comm">//&nbsp;Autoload&nbsp;défini&nbsp;par&nbsp;l'application</span></div></li>
77
<li><div class="src-line"><a name="a64"></a><span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/function_exists">function_exists</a><span class="src-sym">(</span><span class="src-str">'__autoload'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
78
<li><div class="src-line"><a name="a65"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/spl_autoload_register">spl_autoload_register</a><span class="src-sym">(</span><span class="src-str">'__autoload'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
79
<li><div class="src-line"><a name="a66"></a><span class="src-sym">}</span></div></li>
80
<li><div class="src-line"><a name="a67"></a><span class="src-php">?&gt;</span></div></li>
81
</ol></div>
82
</div>
83
	<p class="notes" id="credit">
84
		Documentation generated on Thu, 04 Mar 2010 19:27:09 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
85
	</p>
86
	</body>
87
</html>