| Line 8... |
Line 8... |
| 8 |
* @package Framework
|
8 |
* @package Framework
|
| 9 |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
9 |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
| 10 |
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
|
10 |
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
|
| 11 |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
|
11 |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
|
| 12 |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
|
12 |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
|
| 13 |
* @version $Id: SquelettePhp.php 440 2013-10-16 12:57:03Z raphael $
|
13 |
* @version $Id: SquelettePhp.php 446 2013-10-28 14:21:50Z raphael $
|
| 14 |
* @link /doc/framework/
|
14 |
* @link /doc/framework/
|
| 15 |
*/
|
15 |
*/
|
| 16 |
class SquelettePhp {
|
16 |
class SquelettePhp {
|
| Line 17... |
Line 17... |
| 17 |
|
17 |
|
| Line 64... |
Line 64... |
| 64 |
private static function traiterTagsCourts($chemin_squelette) {
|
64 |
private static function traiterTagsCourts($chemin_squelette) {
|
| 65 |
$contenu = file_get_contents($chemin_squelette);
|
65 |
$contenu = file_get_contents($chemin_squelette);
|
| 66 |
// Remplacement de tags courts par un tag long avec echo
|
66 |
// Remplacement de tags courts par un tag long avec echo
|
| 67 |
$contenu = str_replace('<?=', '<?php echo ', $contenu);
|
67 |
$contenu = str_replace('<?=', '<?php echo ', $contenu);
|
| 68 |
$contenu = str_replace('<? ', '<?php ', $contenu);
|
68 |
$contenu = str_replace('<? ', '<?php ', $contenu);
|
| - |
|
69 |
$contenu = str_replace('<?if ', '<?php if ', $contenu);
|
| 69 |
// Ajout systématique d'un point virgule avant la fermeture php
|
70 |
// Ajout systématique d'un point virgule avant la fermeture php
|
| 70 |
$contenu = preg_replace("/;*\s*\?>/", "; ?>", $contenu);
|
71 |
$contenu = preg_replace("/;*\s*\?>/", "; ?>", $contenu);
|
| 71 |
return $contenu;
|
72 |
return $contenu;
|
| 72 |
}
|
73 |
}
|
| 73 |
}
|
74 |
}
|