Classes

class Brotkrueml\FeedGenerator\Feed\Author

The class implements the Brotkrueml\FeedGenerator\Feed\AuthorInterface and can be used to define an author for a feed or a feed item.

__construct()
Parameters
  • $name (string) -- The name of the author.

  • $uri (string) -- The URI of the author. Used in Atom and JSON formats only.

  • $email (string) -- The email address of the author. Used in Atom format only.

getName()
Return type

string

Returns

The name of the author.

getUri()
Return type

string

Returns

The URI of the author.

getEmail()
Return type

string

Returns

The email address of the author.

class Brotkrueml\FeedGenerator\Feed\Item

The class implements the Brotkrueml\FeedGenerator\Feed\ItemInterface and can be used to define an item for a feed.

__construct()
Parameters
  • $title (string) -- The title of the item.

  • $publicId (string) -- The ID of the item.

  • $lastModified (?DateTimeInterface) -- The last modification date of the item.

  • $link (string) -- The link of the item.

  • $summary (string) -- The summary of the item.

  • $content (string) -- The content of the item.

Tip

For better readability or when omitting some of the parameters use named arguments:

$item = new Brotkrueml\FeedGenerator\Feed\Item(
   title: 'The title',
   link: 'https://example.com/the/page',
   summary: 'Some summary',
);
getTitle()
Return type

string

Returns

The title of the item.

getPublicId()
Return type

string

Returns

The ID of the item.

getLastModified()
Return type

?DateTimeInterface

Returns

The last modification date of the item.

Return type

string

Returns

The link of the item.

getSummary()
Return type

string

Returns

The summary of the item.

getContent()
Return type

string

Returns

The content of the item.

class Brotkrueml\FeedGenerator\Feed\Media

The class implements the Brotkrueml\FeedGenerator\Feed\MediaInterface and can be used to define a media asset for a feed item.

__construct()
Parameters
  • $type (string) -- The mime type of the media.

  • $url (string) -- The URL of the media.

  • $length (int) -- The length (in bytes) of the media.

  • $title (string) -- The title of the media. Use only in a JSON feed.

getType()
Return type

string

Returns

The type of the media.

getUrl()
Return type

string

Returns

The URL of the media.

getLength()
Return type

int

Returns

The length (in bytes) of the media.

getTitle()
Return type

string

Returns

The title of the media.