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: 94

Filed under:
|
|

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

Related posts about best-practices

Related posts about beginner