开发者

CakePHP: parsing data in view

I currently have a class that generates an object from rawtext of an email. You can get body, subject and etc from that object.

My question is, in the cakephp system where should I put that class. Is it an he开发者_运维知识库lper, component? The important thing is, is that object should be created for each mail. I have an view that show all the mails of each topic.

With an foreach loop I loop all related mails containing the rawtext.

Do you have any idea what the best thing to do is?


Documentation suggests to put all your third party code in vendors folder. you can import any class from there with:

App::import('Vendor', 'myfile');

http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#loading-vendor-files

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜