Starting our example project

Our example project will be pretty simple: it will be a formatter for the PHP logging platform package Monolog. It will perform the ROT13 transformation on any logs passed to PHP, which turns any Latin alphabet character into the character 13 letters after it in the alphabet. Therefore, A becomes M, B becomes N, and so on.

Let's start by entering our project directory and creating a few folders. First, we'll create an src folder, and inside that a folder called Formatter. Now, we'll enter the Formatter folder and create a file called ROT13Formatter.php. Inside this file, add the following code:

<?phpnamespace Judges119\Monolog\Formatter;use Monolog\Formatter\FormatterInterface;class ROT13Formatter implements FormatterInterface ...

Get GitLab Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.