<?php
class ConversationTransformer extends TransformerAbstract
{
private $params = [];
function __construct($params = [])
{
$this->params = $params;
}
public function transform (Conversation $conversation)
{
//-- $this->params will be used here
return [];
}
}
return $this->response->item($conversations, new ConversationTransformer(['user' => $user]));