Un embryon de code pour faciliter la montée en version avec Rector.
composer require rector/rector --dev
I hereby claim:
To claim this, I am signing this object:
Les fichiers contenus dans le dossier /translations
peuvent être dupliqués et renommés en remplaçant
le code de la langue (juste avant l'extension) par le code de la nouvelle langue. Les fichiers sont extraits
au format XLIFF, un standard connu dans le secteur de la traduction.
Un segment de traduction ressemble à ceci :
<?php | |
/** | |
* Entité bidon, juste pour illustrer le principe | |
*/ | |
class Entity { | |
/** | |
* @var string | |
*/ |
<?php | |
// Ajoute le shortcode [age date="jj/mm/aaaa"] | |
add_shortcode('age', 'chmat_age'); | |
/** | |
* Retourne l'âge d'une personne suivant la date de naissance fournie au format jj/mm/aaaa. | |
* | |
* Exemple : | |
* |
{ | |
"version": "1.1", | |
"timestamp": "1524334620", | |
"station": "Ottignies", | |
"stationinfo": { | |
"id": "BE.NMBS.008811601", | |
"locationX": "4.56936", | |
"locationY": "50.673667", | |
"@id": "http://irail.be/stations/NMBS/008811601", | |
"standardname": "Ottignies", |
{ | |
"version": "1.1", | |
"timestamp": "1524334335", | |
"vehicle": "BE.NMBS.TRN14017", | |
"vehicleinfo": { | |
"locationX": "4.56936", | |
"locationY": "50.673667", | |
"name": "BE.NMBS.TRN14017", | |
"shortname": "TRN14017", | |
"@id": "http://irail.be/vehicle/TRN14017" |
# Apache blocks the Authorization header by default. | |
# You should enable the RewriteEngine if this is not done already | |
RewriteEngine On | |
# Sets the HTTP_AUTHORIZATION header removed by apache | |
RewriteCond %{HTTP:Authorization} . | |
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] |
<?php | |
if (isset($_GET['ajax'])) { | |
session_start(); | |
$handle = fopen('/private/var/log/system.log', 'r'); | |
if (isset($_SESSION['offset'])) { | |
$data = stream_get_contents($handle, -1, $_SESSION['offset']); | |
echo nl2br($data); | |
} else { | |
fseek($handle, 0, SEEK_END); | |
$_SESSION['offset'] = ftell($handle); |