SimplePie_Item Klassenreferenz

SimplePie_Item Klassenreferenz

Öffentliche Methoden

 __construct ($feed, $data)
 
 set_registry (SimplePie_Registry $registry)
 
 __toString ()
 
 __destruct ()
 
 get_item_tags ($namespace, $tag)
 
 get_base ($element=array())
 
 sanitize ($data, $type, $base= '')
 
 get_feed ()
 
 get_id ($hash=false)
 
 get_title ()
 
 get_description ($description_only=false)
 
 get_content ($content_only=false)
 
 get_category ($key=0)
 
 get_categories ()
 
 get_author ($key=0)
 
 get_contributor ($key=0)
 
 get_contributors ()
 
 get_authors ()
 
 get_copyright ()
 
 get_date ($date_format= 'j F Y, g:i a')
 
 get_updated_date ($date_format= 'j F Y, g:i a')
 
 get_local_date ($date_format= '%c')
 
 get_gmdate ($date_format= 'j F Y, g:i a')
 
 get_updated_gmdate ($date_format= 'j F Y, g:i a')
 
 get_permalink ()
 
 get_link ($key=0, $rel= 'alternate')
 
 get_links ($rel= 'alternate')
 
 get_enclosure ($key=0, $prefer=null)
 
 get_enclosures ()
 
 get_latitude ()
 
 get_longitude ()
 
 get_source ()
 

Datenfelder

 $feed
 
 $data = array()
 

Geschützte Attribute

 $registry
 

Ausführliche Beschreibung

Definiert in Zeile 56 der Datei Item.php.

Beschreibung der Konstruktoren und Destruktoren

__construct (   $feed,
  $data 
)

Create a new item object

This is usually used by {

Siehe auch
SimplePie::get_items} and {
SimplePie::get_item}. Avoid creating this manually.
Parameter
SimplePie$feedParent feed
array$dataRaw data

Definiert in Zeile 91 der Datei Item.php.

Benutzt $data und $feed.

__destruct ( )

Remove items that link back to this before destroying this object

Definiert in Zeile 123 der Datei Item.php.

Dokumentation der Elementfunktionen

__toString ( )

Get a string representation of the item

Rückgabe
string

Definiert in Zeile 115 der Datei Item.php.

get_author (   $key = 0)

Get an author for the item

Seit
Beta 2
Parameter
int$keyThe author that you want to return. Remember that arrays begin with 0, not 1
Rückgabe
SimplePie_Author|null

Definiert in Zeile 502 der Datei Item.php.

Benutzt get_authors().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

get_authors ( )

Get all authors for the item

Uses <atom:author>, <author>, <dc:creator> or <itunes:author>

Seit
Beta 2
Rückgabe
array|null List of {
Siehe auch
SimplePie_Author} objects

Definiert in Zeile 609 der Datei Item.php.

Benutzt get_base(), get_item_tags(), get_source(), sanitize(), SIMPLEPIE_CONSTRUCT_IRI, SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11, SIMPLEPIE_NAMESPACE_ITUNES und SIMPLEPIE_NAMESPACE_RSS_20.

Wird benutzt von get_author().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_base (   $element = array())

Get the base URL value from the parent feed

Uses <xml:base>

Parameter
array$element
Rückgabe
string

Definiert in Zeile 165 der Datei Item.php.

Wird benutzt von get_authors(), get_content(), get_contributors(), get_copyright(), get_description(), get_enclosures(), get_links() und get_title().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_categories ( )

Get all categories for the item

Uses <atom:category>, <category> or <dc:subject>

Seit
Beta 3
Rückgabe
array|null List of {
Siehe auch
SimplePie_Category} objects

Definiert in Zeile 438 der Datei Item.php.

Benutzt get_item_tags(), sanitize(), SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11 und SIMPLEPIE_NAMESPACE_RSS_20.

Wird benutzt von get_category().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_category (   $key = 0)

Get a category for the item

Seit
Beta 3 (previously called get_categories() since Beta 2)
Parameter
int$keyThe category that you want to return. Remember that arrays begin with 0, not 1
Rückgabe
SimplePie_Category|null

Definiert in Zeile 417 der Datei Item.php.

Benutzt get_categories().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

get_content (   $content_only = false)

Get the content for the item

Prefers full content over summaries, but will return a summary if full content does not exist.

To prefer summaries instead, use {

Siehe auch
get_description}

Uses <atom:content> or <content:encoded> (RSS 1.0 Content Module)

Seit
1.0
Parameter
boolean$content_onlyShould we avoid falling back to the description?
Rückgabe
string|null

Definiert in Zeile 386 der Datei Item.php.

Benutzt get_base(), get_description(), get_item_tags(), sanitize(), SIMPLEPIE_CONSTRUCT_HTML, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10 und SIMPLEPIE_NAMESPACE_RSS_10_MODULES_CONTENT.

Wird benutzt von get_description().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_contributor (   $key = 0)

Get a contributor for the item

Seit
1.1
Parameter
int$keyThe contrbutor that you want to return. Remember that arrays begin with 0, not 1
Rückgabe
SimplePie_Author|null

Definiert in Zeile 522 der Datei Item.php.

Benutzt get_contributors().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

get_contributors ( )

Get all contributors for the item

Uses <atom:contributor>

Seit
1.1
Rückgabe
array|null List of {
Siehe auch
SimplePie_Author} objects

Definiert in Zeile 543 der Datei Item.php.

Benutzt get_base(), get_item_tags(), sanitize(), SIMPLEPIE_CONSTRUCT_IRI, SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03 und SIMPLEPIE_NAMESPACE_ATOM_10.

Wird benutzt von get_contributor().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_copyright ( )

Get the copyright info for the item

Uses <atom:rights> or <dc:rights>

Seit
1.1
Rückgabe
string

Definiert in Zeile 699 der Datei Item.php.

Benutzt get_base(), get_item_tags(), sanitize(), SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10 und SIMPLEPIE_NAMESPACE_DC_11.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

get_date (   $date_format = 'j F Y,
g:i a'   
)

Get the posting date/time for the item

Uses <atom:published>, <atom:updated>, <atom:issued>, <atom:modified>, <pubDate> or <dc:date>

Note: obeys PHP's timezone setting. To get a UTC date/time, use {

Siehe auch
get_gmdate}
Seit
Beta 2 (previously called get_item_date since 0.8)
Parameter
string$date_formatSupports any PHP date format from {
Siehe auch
http://php.net/date} (empty for the raw data)
Rückgabe
int|string|null

Definiert in Zeile 733 der Datei Item.php.

Benutzt get_item_tags(), sanitize(), SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11 und SIMPLEPIE_NAMESPACE_RSS_20.

Wird benutzt von get_gmdate() und get_local_date().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_description (   $description_only = false)

Get the content for the item

Prefers summaries over full content , but will return full content if a summary does not exist.

To prefer full content instead, use {

Siehe auch
get_content}

Uses <atom:summary>, <description>, <dc:description> or <itunes:subtitle>

Seit
0.8
Parameter
boolean$description_onlyShould we avoid falling back to the content?
Rückgabe
string|null

Definiert in Zeile 323 der Datei Item.php.

Benutzt get_base(), get_content(), get_item_tags(), sanitize(), SIMPLEPIE_CONSTRUCT_HTML, SIMPLEPIE_CONSTRUCT_MAYBE_HTML, SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11, SIMPLEPIE_NAMESPACE_ITUNES, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10 und SIMPLEPIE_NAMESPACE_RSS_20.

Wird benutzt von get_content().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_enclosure (   $key = 0,
  $prefer = null 
)

Get an enclosure from the item

Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS.

Seit
Beta 2
Noch zu erledigen:
Add ability to prefer one type of content over another (in a media group).
Parameter
int$keyThe enclosure that you want to return. Remember that arrays begin with 0, not 1
Rückgabe
SimplePie_Enclosure|null

Definiert in Zeile 1059 der Datei Item.php.

Benutzt get_enclosures().

Wird benutzt von get_permalink().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_enclosures ( )

Get all available enclosures (podcasts, etc.)

Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS.

At this point, we're pretty much assuming that all enclosures for an item are the same content. Anything else is too complicated to properly support.

Seit
Beta 2
Noch zu erledigen:

Add support for end-user defined sorting of enclosures by type/handler (so we can prefer the faster-loading FLV over MP4).

If an element exists at a level, but it's value is empty, we should fall back to the value from the parent (if it exists).

Rückgabe
array|null List of SimplePie_Enclosure items

Definiert in Zeile 1086 der Datei Item.php.

Benutzt get_base(), get_feed(), get_item_tags(), sanitize(), SIMPLEPIE_CONSTRUCT_IRI, SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_ITUNES, SIMPLEPIE_NAMESPACE_MEDIARSS und SIMPLEPIE_NAMESPACE_RSS_20.

Wird benutzt von get_enclosure().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_feed ( )

Get the parent feed

Note: this may not work as you think for multifeeds!

1.0 SimplePie

Definiert in Zeile 194 der Datei Item.php.

Benutzt $feed.

Wird benutzt von get_enclosures().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_gmdate (   $date_format = 'j F Y,
g:i a'   
)

Get the posting date/time for the item (UTC time)

Siehe auch
get_date
Parameter
string$date_formatSupports any PHP date format from {
Siehe auch
http://php.net/date}
Rückgabe
int|string|null

Definiert in Zeile 888 der Datei Item.php.

Benutzt get_date().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

get_id (   $hash = false)

Get the unique identifier for the item

This is usually used when writing code to check for new items in a feed.

Uses <atom:id>, <guid>, <dc:identifier> or the about attribute for RDF. If none of these are supplied (or $hash is true), creates an MD5 hash based on the permalink and title. If either of those are not supplied, creates a hash based on the full feed data.

Seit
Beta 2
Parameter
boolean$hashShould we force using a hash instead of the supplied ID?
Rückgabe
string

Definiert in Zeile 213 der Datei Item.php.

Benutzt get_item_tags(), get_permalink(), get_title(), sanitize(), SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11, SIMPLEPIE_NAMESPACE_RDF und SIMPLEPIE_NAMESPACE_RSS_20.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

get_item_tags (   $namespace,
  $tag 
)

Get data for an item-level element

This method allows you to get access to ANY element/attribute that is a sub-element of the item/entry tag.

See {

Siehe auch
SimplePie::get_feed_tags()} for a description of the return value
Seit
1.0
Siehe auch
http://simplepie.org/wiki/faq/supported_xml_namespaces
Parameter
string$namespaceThe URL of the XML namespace of the elements you're trying to access
string$tagTag name
Rückgabe
array

Definiert in Zeile 145 der Datei Item.php.

Wird benutzt von get_authors(), get_categories(), get_content(), get_contributors(), get_copyright(), get_date(), get_description(), get_enclosures(), get_id(), get_latitude(), get_links(), get_longitude(), get_source(), get_title() und get_updated_date().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_latitude ( )

Get the latitude coordinates for the item

Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications

Uses <geo:lat> or <georss:point>

Seit
1.0 W3C WGS84 Basic Geo http://www.georss.org/ GeoRSS string|null

Definiert in Zeile 2898 der Datei Item.php.

Benutzt get_item_tags(), SIMPLEPIE_NAMESPACE_GEORSS und SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

get_link (   $key = 0,
  $rel = 'alternate' 
)

Get a single link for the item

Seit
Beta 3
Parameter
int$keyThe link that you want to return. Remember that arrays begin with 0, not 1
string$relThe relationship of the link to return
Rückgabe
string|null Link URL

Definiert in Zeile 953 der Datei Item.php.

Benutzt get_links().

Wird benutzt von get_permalink().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_links (   $rel = 'alternate')

Get all links for the item

Uses <atom:link>, <link> or <guid>

Seit
Beta 2
Parameter
string$relThe relationship of links to return
Rückgabe
array|null Links found for the item (strings)

Definiert in Zeile 975 der Datei Item.php.

Benutzt get_base(), get_item_tags(), sanitize(), SIMPLEPIE_CONSTRUCT_IRI, SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10 und SIMPLEPIE_NAMESPACE_RSS_20.

Wird benutzt von get_link().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_local_date (   $date_format = '%c')

Get the localized posting date/time for the item

Returns the date formatted in the localized language. To display in languages other than the server's default, you need to change the locale with setlocale(). The available localizations depend on which ones are installed on your web server.

Seit
1.0
Parameter
string$date_formatSupports any PHP date format from {
Siehe auch
http://php.net/strftime} (empty for the raw data)
Rückgabe
int|string|null

Definiert in Zeile 865 der Datei Item.php.

Benutzt get_date(), sanitize() und SIMPLEPIE_CONSTRUCT_TEXT.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

get_longitude ( )

Get the longitude coordinates for the item

Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications

Uses <geo:long>, <geo:lon> or <georss:point>

Seit
1.0 W3C WGS84 Basic Geo http://www.georss.org/ GeoRSS string|null

Definiert in Zeile 2926 der Datei Item.php.

Benutzt get_item_tags(), SIMPLEPIE_NAMESPACE_GEORSS und SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

get_permalink ( )

Get the permalink for the item

Returns the first link available with a relationship of "alternate". Identical to {

Siehe auch
get_link()} with key 0
get_link
Seit
0.8
Rückgabe
string|null Permalink URL

Definiert in Zeile 927 der Datei Item.php.

Benutzt get_enclosure() und get_link().

Wird benutzt von get_id().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_source ( )

Get the <atom:source> for the item

Seit
1.1
Rückgabe
SimplePie_Source|null

Definiert in Zeile 2952 der Datei Item.php.

Benutzt get_item_tags() und SIMPLEPIE_NAMESPACE_ATOM_10.

Wird benutzt von get_authors().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_title ( )

Get the title of the item

Uses <atom:title>, <title> or <dc:title>

Seit
Beta 2 (previously called get_item_title since 0.8)
Rückgabe
string|null

Definiert in Zeile 268 der Datei Item.php.

Benutzt get_base(), get_item_tags(), sanitize(), SIMPLEPIE_CONSTRUCT_MAYBE_HTML, SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10 und SIMPLEPIE_NAMESPACE_RSS_20.

Wird benutzt von get_id().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_updated_date (   $date_format = 'j F Y,
g:i a'   
)

Get the update date/time for the item

Uses <atom:updated>

Note: obeys PHP's timezone setting. To get a UTC date/time, use {

Siehe auch
get_gmdate}
Parameter
string$date_formatSupports any PHP date format from {
Siehe auch
http://php.net/date} (empty for the raw data)
Rückgabe
int|string|null

Definiert in Zeile 812 der Datei Item.php.

Benutzt get_item_tags(), sanitize(), SIMPLEPIE_CONSTRUCT_TEXT und SIMPLEPIE_NAMESPACE_ATOM_10.

Wird benutzt von get_updated_gmdate().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get_updated_gmdate (   $date_format = 'j F Y,
g:i a'   
)

Get the update date/time for the item (UTC time)

Siehe auch
get_updated_date
Parameter
string$date_formatSupports any PHP date format from {
Siehe auch
http://php.net/date}
Rückgabe
int|string|null

Definiert in Zeile 906 der Datei Item.php.

Benutzt get_updated_date().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

sanitize (   $data,
  $type,
  $base = '' 
)

Sanitize feed data

private

Siehe auch
SimplePie::sanitize()
Parameter
string$dataData to sanitize
int$typeOne of the SIMPLEPIE_CONSTRUCT_* constants
string$baseBase URL to resolve URLs against
Rückgabe
string Sanitized data

Definiert in Zeile 180 der Datei Item.php.

Benutzt $data.

Wird benutzt von get_authors(), get_categories(), get_content(), get_contributors(), get_copyright(), get_date(), get_description(), get_enclosures(), get_id(), get_links(), get_local_date(), get_title() und get_updated_date().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

set_registry ( SimplePie_Registry  $registry)

Set the registry handler

This is usually used by {

Siehe auch
SimplePie_Registry::create}
Seit
1.3
Parameter
SimplePie_Registry$registry

Definiert in Zeile 105 der Datei Item.php.

Benutzt $registry.

Dokumentation der Datenelemente

$data = array()

Definiert in Zeile 72 der Datei Item.php.

Wird benutzt von __construct() und sanitize().

$feed

Definiert in Zeile 64 der Datei Item.php.

Wird benutzt von __construct() und get_feed().

$registry
protected

Definiert in Zeile 80 der Datei Item.php.

Wird benutzt von set_registry().


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.