Files
piratepoet/lib/Newsletter/Editor/Transformer.php
Amine Ben hammou 43df66d162 Add public keyword to methods
[MAILPOET-2413]
2019-12-26 18:09:45 +03:00

21 lines
494 B
PHP

<?php
namespace MailPoet\Newsletter\Editor;
class Transformer {
private $transformer;
public function __construct($args) {
$title_list_only = $args['displayType'] === 'titleOnly' && $args['titleFormat'] === 'ul';
if ($title_list_only) $transformer = new TitleListTransformer($args);
else $transformer = new PostListTransformer($args);
$this->transformer = $transformer;
}
public function transform($posts) {
return $this->transformer->transform($posts);
}
}