sphinks
sphinks

Reputation: 3128

How integrate phirehose lib to symfony2?

I`m writing app that should work with twitter streaming api. For interacting with streaming api I use phirehose lib (https://github.com/fennb/phirehose). It runs great as separate php project. Php file with Phirehose lib is used as background process, that constantly consumes tweets, now I want save it in Db, so I need somehow make available all advantages work with DB of symfony framework in my simple php file that consumes tweets. Is there a way to make this, except put phirehose in vendor folder of symfony (I don't want to do this, cause in manuals that I find it is not easy, rename file and classes of lib, which can cause problems inside lib)?

Upvotes: 0

Views: 358

Answers (1)

james_t
james_t

Reputation: 2733

This library is simple to use with composer. Just have a look at the composer.json file.

Add the following to your symfony composer.json then run composer update

"fennb/phirehose": "dev-master"

When extending the phirehose classes just do

class TwitterStuff extends \Phirehose
{
   .........

Upvotes: 0

Related Questions