PHP Class MagpieFromSimplePie, feedwordpress

Since: 2010.0203
Datei anzeigen Open project: radgeek/feedwordpress Class Usage Examples

Public Properties

Property Type Description
$_XMLNS_FAMILIAR
$channel
$feed_type
$feed_version
$image
$inImage * MagpieFromSimplePie::handleAttributes()
$inTextInput
$items
$originals
$pie
$textinput

Public Methods

Method Description
MagpieFromSimplePie ( $pie, $item = true ) * MagpieFromSimplePie constructor
__construct ( SimplePie $pie, mixed $item = true ) MagpieFromSimplePie constructor
element_id ( string $el, integer $counter ) : string MagpieFromSimplePie::element_id Magic ID function for multiple elemenets.
feed_version ( ) : float MagpieFromSimplePie::feed_version
get_attrib ( array $namespaces, string $attr, array $element, mixed $default = NULL ) MagpieFromSimplePie::get_attrib
get_item ( ) : array MagpieFromSimplePie::get_item: returns a single MagpieRSS format array equivalent to a SimplePie_Item object from which this object was constructed.
get_items ( ) : array MagpieFromSimplePie::get_items: returns an array of MagpieRSS format arrays equivalent to the SimplePie_Item objects in the SimplePie object from which this object was constructed.
handleAttributes ( array $data, array $path ) : array MagpieFromSimplePie::handleAttributes
handleChildren ( array $data, array $path = [], $method = 'processItemData' ) : array MagpieFromSimplePie::handleChildren
increment_element ( &$data, string $childTag, string $ns, array $path ) MagpieFromSimplePie::increment_element
is_atom ( ) : boolean MagpieFromSimplePie::is_atom
is_namespaced ( string $ns, $attribute = false ) : boolean MagpieFromSimplePie::is_namespaced
is_rdf ( ) : boolean MagpieFromSimplePie::is_rdf
is_rss ( ) : boolean MagpieFromSimplePie::is_rss
normalize ( ) MagpieFromSimplePie::normalize
normalize_atom_person ( &$source, string $person, &$dest, string $to, integer $i ) MagpieFromSimplePie::normalize_atom_person
normalize_author_inheritance ( &$item, SimplePie_Item $original ) MagpieFromSimplePie::normalize_author_inheritance
normalize_category ( &$source, string $from, &$dest, string $to, integer $i ) MagpieFromSimplePie::normalize_category: Normalize Atom 1.0 and RSS 2.0 categories to Dublin Core.
normalize_dc_subject ( &$source, string $from, &$dest, string $to, integer $i ) MagpieFromSimplePie::normalize_dc_subject: Normalize Dublin Core "subject" elements to Atom 1.0 and RSS 2.0 categories.
normalize_element ( &$source, string $from, &$dest, string $to, mixed $via = NULL ) MagpieFromSimplePie::normalize_element Simplify the logic for normalize(). Makes sure that count of elements and each of multiple elements is normalized properly. If you need to mess with things like attributes or change formats or the like, pass it a callback to handle each element.
normalize_enclosure ( &$source, string $from, &$dest, string $to, integer $i ) MagpieFromSimplePie::normalize_enclosure
processChannelData ( array $data, array $path = [] ) : array MagpieFromSimplePie::processChannelData
processFeedData ( array $data ) : array MagpieFromSimplePie::processFeedData
processItemData ( array $data, array $path = [] ) : array MagpieFromSimplePie::processItemData

Method Details

MagpieFromSimplePie() public method

* MagpieFromSimplePie constructor
public MagpieFromSimplePie ( $pie, $item = true )

__construct() public method

MagpieFromSimplePie constructor
public __construct ( SimplePie $pie, mixed $item = true )
$pie SimplePie The feed to convert to MagpieRSS format.
$item mixed

element_id() public method

Can be called as static MagpieRSS::element_id()
public element_id ( string $el, integer $counter ) : string
$el string
$counter integer
return string

feed_version() public method

MagpieFromSimplePie::feed_version
public feed_version ( ) : float
return float

get_attrib() public method

MagpieFromSimplePie::get_attrib
public get_attrib ( array $namespaces, string $attr, array $element, mixed $default = NULL )
$namespaces array
$attr string
$element array
$default mixed

get_item() public method

MagpieFromSimplePie::get_item: returns a single MagpieRSS format array equivalent to a SimplePie_Item object from which this object was constructed.
public get_item ( ) : array
return array A MagpieRSS-format array representing an item on this feed

get_items() public method

MagpieFromSimplePie::get_items: returns an array of MagpieRSS format arrays equivalent to the SimplePie_Item objects in the SimplePie object from which this object was constructed.
public get_items ( ) : array
return array An array of MagpieRSS-format arrays representing the items on this feed

handleAttributes() public method

MagpieFromSimplePie::handleAttributes
public handleAttributes ( array $data, array $path ) : array
$data array
$path array
return array

handleChildren() public method

MagpieFromSimplePie::handleChildren
public handleChildren ( array $data, array $path = [], $method = 'processItemData' ) : array
$data array
$path array
return array

increment_element() public method

MagpieFromSimplePie::increment_element
public increment_element ( &$data, string $childTag, string $ns, array $path )
$childTag string
$ns string
$path array

is_atom() public method

MagpieFromSimplePie::is_atom
public is_atom ( ) : boolean
return boolean

is_namespaced() public method

MagpieFromSimplePie::is_namespaced
public is_namespaced ( string $ns, $attribute = false ) : boolean
$ns string
return boolean

is_rdf() public method

MagpieFromSimplePie::is_rdf
public is_rdf ( ) : boolean
return boolean

is_rss() public method

MagpieFromSimplePie::is_rss
public is_rss ( ) : boolean
return boolean

normalize() public method

MagpieFromSimplePie::normalize
public normalize ( )

normalize_atom_person() public method

MagpieFromSimplePie::normalize_atom_person
public normalize_atom_person ( &$source, string $person, &$dest, string $to, integer $i )
$person string
$to string
$i integer

normalize_author_inheritance() public method

MagpieFromSimplePie::normalize_author_inheritance
public normalize_author_inheritance ( &$item, SimplePie_Item $original )
$original SimplePie_Item

normalize_category() public method

..
public normalize_category ( &$source, string $from, &$dest, string $to, integer $i )
$from string
$to string
$i integer

normalize_dc_subject() public method

MagpieFromSimplePie::normalize_dc_subject: Normalize Dublin Core "subject" elements to Atom 1.0 and RSS 2.0 categories.
public normalize_dc_subject ( &$source, string $from, &$dest, string $to, integer $i )
$from string
$to string
$i integer

normalize_element() public method

MagpieFromSimplePie::normalize_element Simplify the logic for normalize(). Makes sure that count of elements and each of multiple elements is normalized properly. If you need to mess with things like attributes or change formats or the like, pass it a callback to handle each element.
public normalize_element ( &$source, string $from, &$dest, string $to, mixed $via = NULL )
$from string
$to string
$via mixed

normalize_enclosure() public method

MagpieFromSimplePie::normalize_enclosure
public normalize_enclosure ( &$source, string $from, &$dest, string $to, integer $i )
$from string
$to string
$i integer

processChannelData() public method

MagpieFromSimplePie::processChannelData
public processChannelData ( array $data, array $path = [] ) : array
$data array
$path array
return array

processFeedData() public method

MagpieFromSimplePie::processFeedData
public processFeedData ( array $data ) : array
$data array
return array

processItemData() public method

MagpieFromSimplePie::processItemData
public processItemData ( array $data, array $path = [] ) : array
$data array
$path array
return array

Property Details

$_XMLNS_FAMILIAR public_oe property

public $_XMLNS_FAMILIAR

$channel public_oe property

public $channel

$feed_type public_oe property

public $feed_type

$feed_version public_oe property

public $feed_version

$image public_oe property

public $image

$inImage public_oe property

* MagpieFromSimplePie::handleAttributes()
public $inImage

$inTextInput public_oe property

public $inTextInput

$items public_oe property

public $items

$originals public_oe property

public $originals

$pie public_oe property

public $pie

$textinput public_oe property

public $textinput