13 lines
341 B
PHP
13 lines
341 B
PHP
|
<?php
|
||
|
class L {
|
||
|
const home = 'Accueil';
|
||
|
public static function __callStatic($string, $args) {
|
||
|
if (defined("self::" . $string)) {
|
||
|
return vsprintf(constant("self::" . $string), $args);
|
||
|
}
|
||
|
}
|
||
|
function L($string, $args=NULL) {
|
||
|
$return = constant("L::".$string);
|
||
|
return $args ? vsprintf($return,$args) : $return;
|
||
|
}
|
||
|
}
|