what service class to use to incapsulate method
Posted
by xbsxbs
on Stack Overflow
See other posts from Stack Overflow
or by xbsxbs
Published on 2010-05-27T16:17:25Z
Indexed on
2010/05/27
16:21 UTC
Read the original article
Hit count: 90
I have to write a simple method extractArticle() that returns Article object which is extracted from Message object. I have MessageService and ArticleService classes intended to handle tasks like this. What service class is more correctly to use to incapsulate extractArticle() funcionality?
$article = MessageService::extractArticle(Message $message);
or
$article = ArticleService::extractArticleFromMessage(Message $message);
© Stack Overflow or respective owner