forked from suin/php-rss-writer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ItemInterface.php
98 lines (85 loc) · 2.07 KB
/
ItemInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
namespace Suin\RSSWriter;
/**
* Interface ItemInterface
* @package Suin\RSSWriter
*/
interface ItemInterface
{
/**
* Set item title
* @param string $title
* @return $this
*/
public function title($title);
/**
* Set item URL
* @param string $url
* @return $this
*/
public function url($url);
/**
* Set item description
* @param string $description
* @return $this
*/
public function description($description);
/**
* Set content:encoded
* @param string $content
* @return $this
*/
public function contentEncoded($content);
/**
* Set item category
* @param string $name Category name
* @param string $domain Category URL
* @return $this
*/
public function category($name, $domain = null);
/**
* Set GUID
* @param string $guid
* @param bool $isPermalink
* @return $this
*/
public function guid($guid, $isPermalink = false);
/**
* Set published date
* @param int $pubDate Unix timestamp
* @return $this
*/
public function pubDate($pubDate);
/**
* Set enclosure
* @param string $url Url to media file
* @param int $length Length in bytes of the media file
* @param string $type Media type, default is audio/mpeg
* @return $this
*/
public function enclosure($url, $length = 0, $type = 'audio/mpeg');
/**
* Set the author
* @param string $author Email of item author
* @return $this
*/
public function author($author);
/**
* Append item to the channel
* @param \Suin\RSSWriter\ChannelInterface $channel
* @return $this
*/
public function appendTo(ChannelInterface $channel);
/**
* @param string $tagName
* @param null $content
* @param array $options
* @return $this
*/
public function customElement($tagName, $content = null, $options = array());
/**
* Return XML object
* @return \Suin\RSSWriter\SimpleXMLElement
*/
public function asXML();
}