Pop\Feed\Reader::isPlaylist PHP Method

isPlaylist() public method

Method to determine if the feed type is a playlist
public isPlaylist ( ) : boolean
return boolean
    public function isPlaylist()
    {
        $search = $this->isVimeo() ? 'album' : 'playlist';
        return strpos($this->adapter->url(), $search) !== false;
    }

Usage Example

Esempio n. 1
0
 public function testBooleanMethods()
 {
     $feed = new Feed\Reader(new Feed\Format\Atom('http://gdata.youtube.com/feeds/base/standardfeeds/most_viewed', 4));
     $this->assertTrue($feed->isAtom());
     $this->assertFalse($feed->isRss());
     $this->assertFalse($feed->isJson());
     $this->assertFalse($feed->isPhp());
     $this->assertTrue($feed->isYoutube());
     $this->assertFalse($feed->isFacebook());
     $this->assertFalse($feed->isTwitter());
     $this->assertFalse($feed->isVimeo());
     $this->assertFalse($feed->isPlaylist());
 }