Files
piratepoet/lib/Newsletter/Editor/Transformer.php
Pavel Dohnal cdda3480ca Make all constructor signatures multiline
[MAILPOET-3732]
2021-09-16 14:19:40 +02:00

23 lines
500 B
PHP

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