FastFeed\FastFeed::pushParser PHP Method

pushParser() public method

public pushParser ( FastFeed\Parser\ParserInterface $parser )
$parser FastFeed\Parser\ParserInterface
    public function pushParser(ParserInterface $parser)
    {
        $this->parsers[] = $parser;
    }

Usage Example

Beispiel #1
0
 /**
  * @return FastFeed
  */
 public static function create()
 {
     $fastFeed = new FastFeed(HttpAdapterFactory::create('guzzle'), new Logger(false));
     $fastFeed->pushParser(new RSSParser());
     $fastFeed->pushParser(new AtomParser());
     return $fastFeed;
 }