Skip to content

Instantly share code, notes, and snippets.

@shadz3rg
Last active January 15, 2018 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shadz3rg/e6a188cefe1b6fb3b230 to your computer and use it in GitHub Desktop.
Save shadz3rg/e6a188cefe1b6fb3b230 to your computer and use it in GitHub Desktop.
<?php
//Реализовать интерфейс:
interface ChangelogInterface
{
public function getCurrentTag(); // Получить последнюю по дате версию
public function getChangelog(); // Получить многомерный ассоц. массив для передачи в шаблонизатор, при этом изменив формат даты на d.m.Y
}
/* Для обработки файла вида:
<?xml version="1.0" encoding="utf-8"?>
<changelog>
<release tag="0.1.0" date="2016-02-18">
<update>Feature 1</update>
<update>Feature 2</update>
<update>Feature 3</update>
</release>
<release tag="0.0.0" date="2016-02-11">
<update>Core</update>
</release>
<release tag="0.0.1" date="2016-02-14">
<update>Core fix</update>
</release>
</changelog> */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment