I'm using a Service Layer, and until now I used a ServiceObject (which implements ArrayAccess, Iterator, Countable) but I'm wondering if it's a good ideas.
Would you do:
ArticleService::createArticle($articleData, $userId);
or
ArticleService::createArticle(ServiceObject $data);
where $data
are:
array(
'title' => 'Lorem ipsum',
'body' => 'Dolor sid amet',
'userId' => 55,
);
The ServiceObject has the benefit to provide a common Signature for every method, however sometimes it doesn't look efficient, and it is not widely used, it loses its interests.
Any feedback?