This is my recruitment challenge. Content is following below.
- Clone repository.
- Create database, and import file database.sql
- Modify parameters in src/Resources/config.ini.php
- Go to http://localhost/Page-Viewer/web/index.php
Please create a simple page viewer. Pages are plain text or HTML documents that are stored at a directory page or in a database (database schema included).
The coded application must search for pages by their name. The output must contain correct HTML document with page title and content. Please display execution time in milliseconds at the end of the output.
All plain text documents must be converted to HTML using the following rules:
- Convert all URLs and emails into valid HTML links.
- Convert all text lines followed one by one and surrounded with empty lines into an HTML paragraph.
- Convert all paragraphs that end with a line filled by - (dash) or = (equation) into HTML header of first level.
- Convert all paragraphs that start from two or more number signs into HTML headers of 2nd and other levels, depending on number of number signs.
- Convert all paragraphs that start from asterisk into unordered list item. A few such paragraphs must be converted into a single unordered list with several list items.
Please create web application with using pure PHP and MySQL without using any framework or library. Application structure must be made with using OOP and MVC pattern. Please do not use global functions or global variables, use objects only.