<?php
use League\HTMLToMarkdown\HtmlConverter;
class Game {
public $url;
public $title;
public $author;
public $description;
public $date;
public function print() {
if (STYLE === 'RUS') {
$output = "* [«".trim($this->title)."»](".trim($this->url).")";
if ($this->author) {
$output .= " — *".trim($this->author)."*";
}
if ($this->description) {
$output .= " \n<blockquote>".$this->description."</blockquote>\n";
} else {
$output .= "\n";
if (STYLE === 'ENG') {
$converter = new HtmlConverter();
$output = "* [“".trim($this->title)."”](".trim($this->url).")";
$output .= " by *".trim($this->author)."*";
$output .= " \n> ".$converter->convert($this->description)."\n";
return $output;