Home modules.gotpike.org
Username: Password: [Create Account]
[Forgot Password?]

Modules

ADT
Database
GTK2
GUI
IP
PiJAX
Public
Sql
Stdio
Subversion
System
Tools
Xosd
lua
v4l2
wx

Recent Changes

Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0

Popular Downloads

Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48


Pike Module Reference:

module version 1.3, prepared

  MODULE module
Modules
ATOM
RSS
XESN
XHTML

  MODULE module.ATOM
Classes
Author
Category
Content
Contributor
Entry
Feed
Generator
HRText
Link
RFC3339
Source

Methods
fetch_atom_http()
http_fail()
http_ok()
parse_atom()
parse_atom_string()
render_atom()
render_atom_string()
Description

Parser and renderer for W3C Atom 1.0 feeds.


Import


Import


Import


Method parse_atom_string

object(.Feed)|object(.Entry) module.ATOM.parse_atom_string(string xml)

Description

Parse an ATOM feed from an XML string.

Parameter xml

a string containing an XML document.

Returns

an ATOM.Feed or ATOM.Entry object.


Method fetch_atom_http

void module.ATOM.fetch_atom_http(object(URI) uri, function feed_callback, void|mapping heads)

Description

Retrieve an ATOM XML feed via HTTP parse it and pass the Feed or Entry object back to the callback.

Parameter uri

a Standards.URI object containing the URI of the Atom feed.

Parameter feed_callback

a function(void|Public.Syndication.ATOM.Feed|Public.Syndication.Atom.Entry atom) callback.

Parameter heads

any extra headers to be passed to the remote web server.


Method http_ok

void module.ATOM.http_ok(object(HTTP.Query) query, function feed_callback, mapping heads)


Method http_fail

void module.ATOM.http_fail(object(HTTP.Query) query, function feed_callback, mapping heads)


Method parse_atom

object(.Feed)|object(.Entry) module.ATOM.parse_atom(object(XML2.Node) xml)

Description

Parse an ATOM XML feed or entry in XML2 node format.

Parameter xml

a Public.Parser.XML2.Node containing an Atom feed or Entry.

Returns

an ATOM.Feed or ATOM.Entry object.


Method render_atom

object(XML2.Node) module.ATOM.render_atom(object(.Feed)|object(.Entry) atom)

Description

Render an ATOM feed or entry into an XML document.

Parameter atom

an ATOM.Feed or ATOM.Entry object.

Returns

an XML2.Node object.


Method render_atom_string

string module.ATOM.render_atom_string(object(.Feed)|object(.Entry) atom)

Description

Render an ATOM feed or entry into an XML document string.

Parameter atom

an ATOM.Feed or ATOM.Entry object.

Returns

a string containing an XML document.

  CLASS module.ATOM.Author
Methods
create()
Description

An ATOM.Author.


Import


Import


Import


Method create

void module.ATOM.Author()->create(void|object(XML2.Node) node)

Description

Construct either a blank Author element or parse one.

Parameter node

nothing, or an XML2.Node to parse for an existing Author.

  CLASS module.ATOM.Category
Methods
_sprintf()
`!=()
`==()
create()
label()
render()
scheme()
term()
Description

An ATOM.Category


Import


Import


Import


Method create

void module.ATOM.Category()->create(void|object(XML2.Node) node)

Description

Create an ATOM.Category element.

Parameter node

An XML2.Node to parse for category elements.


Method term

string module.ATOM.Category()->term(void|string __term)

Description

Set this Category element's term.

Parameter __term

a string containing the new term.

Returns

the current term.


Method scheme

void|object(URI) module.ATOM.Category()->scheme(void|object(URI) __scheme)

Description

The Catergory's scheme.

Parameter __scheme

a Standards.URI object representing the scheme.

Returns

the current scheme.


Method label

void|string module.ATOM.Category()->label(void|string __label)

Description

The Category's label.

Parameter __label

a string containing the label.

Returns

the current label.


Method render

object(XML2.Node) module.ATOM.Category()->render(void|object(XML2.Node) node)

Description

Render the Category into an XML2.Node

Parameter node

an XML2.Node containing the Category's parent element.

Returns

a new XML2.Node containing the Author.


Method `==

int module.ATOM.Category()->`==(mixed test)


Method `!=

int module.ATOM.Category()->`!=(mixed test)


Method _sprintf

string module.ATOM.Category()->_sprintf()

  CLASS module.ATOM.Content
Methods
content()
create()
render()
set()
src()
type()

Import


Import


Import


Variables

object(URI) module.ATOM.Content()->_uri
string module.ATOM.Content()->_type
object(XML2.Node) module.ATOM.Content()->_inline
string module.ATOM.Content()->_raw

Description

An ATOM.Conent object.


Method create

void module.ATOM.Content()->create(void|object(XML2.Node) node)

Description

Create an ATOM.Content object.

Parameter node

an XML2.Node to parse for content.


Method set

void module.ATOM.Content()->set(string type, string|object(XML2.Node)|object(URI) it)

Description

Set new content.

Parameter type

the type of content to set, either "text", "html", "xhtml".

Parameter it

either a string containing some plain text or serialised html content, an XML2.Node containing an XHTML div element or a Standards.URI object which points to the remote content.


Method type

string module.ATOM.Content()->type()

Description

Returns the type of content (either "text", "html" or "xhtml")


Method src

void|object(URI) module.ATOM.Content()->src()

Description

Returns the URI that points to remote content.


Method content

void|string|object(XML2.Node) module.ATOM.Content()->content()

Description

Returns any inline content (ie text, html or an XHTML node).


Method render

object(XML2.Node) module.ATOM.Content()->render(void|object(XML2.Node) node)

Description

Render the Content into an XML2.Node

Parameter node

an XML2.Node containing the Content's parent element.

Returns

a new XML2.Node containing the Content.

  CLASS module.ATOM.Contributor
Methods
create()

Import


Import


Import


Method create

void module.ATOM.Contributor()->create(void|object(XML2.Node) node)

Description

Create an ATOM.Contributor element.

Parameter node

an XML2.Node to parse for Contributors.

  CLASS module.ATOM.Entry
Methods
_sprintf()
`!=()
`==()
add_author()
add_category()
add_contributor()
add_link()
authors()
categories()
content()
contributors()
create()
id()
links()
published()
render()
rights()
rm_author()
rm_category()
rm_contributor()
rm_link()
source()
summary()
title()
updated()
Description

An ATOM Entry element.


Import


Import


Import


Method create

void module.ATOM.Entry()->create(void|object(XML2.Node) node)

Description

Create an ATOM Entry element.

Parameter node

an XML2.Node to parse as an Entry.


Method id

object(URI) module.ATOM.Entry()->id(void|object(URI) __id)

Description

Gets and sets the URI for the Entry ID.

Parameter __id

A new URI to set the ID to.

Note

this is a required property.

Returns

a Standards.URI object.


Method title

object(.HRText) module.ATOM.Entry()->title(void|object(.HRText) __title)

Description

Get or set the Entry's Title.

Parameter __title

a new human readable text object to set.

Note

This is a required property.

Returns

a human readable text object.


Method updated

object(.RFC3339) module.ATOM.Entry()->updated(void|object(.RFC3339) __updated)

Description

Get or set the time this Entry was updated in RFC3339 format.

Parameter __updated

an RFC3339 object.

Note

this is a required property.

Returns

an RFC3339 object.


Method add_author

int module.ATOM.Entry()->add_author(object(.Author) a)

Description

Add an Author element to the Entry.

Parameter a

an ATOM.Author object.

Returns

the number of Authors for this Entry.


Method rm_author

int module.ATOM.Entry()->rm_author(object(.Author) a)

Description

Remove an Author element from the Entry.

Parameter a

an ATOM.Author object.

Returns

the number of Authors for this Entry.


Method authors

array module.ATOM.Entry()->authors()

Description

Gets all the Authors on this Entry.

Returns

an array(ATOM.Author).

Note

this is a recommended property.


Method content

void|object(.Content) module.ATOM.Entry()->content(void|object(.Content) __content)

Description

Get or set the content for this Entry.

Parameter __content

an ATOM.Content element.

Returns

an ATOM.Content element.

Note

this is a recommended property.


Method add_link

int module.ATOM.Entry()->add_link(object(.Link) l)

Description

Add an Link element to the Entry.

Parameter l

an ATOM.Link object.

Returns

the number of Links for this Entry.


Method rm_link

int module.ATOM.Entry()->rm_link(object(.Link) l)

Description

Remove an Link element from the Entry.

Parameter a

an ATOM.Link object.

Returns

the number of Links for this Entry.


Method links

array module.ATOM.Entry()->links()

Description

Gets all the Link on this Entry.

Returns

an array(ATOM.Link).

Note

this is a recommended property.


Method summary

void|object(.HRText) module.ATOM.Entry()->summary(void|object(.HRText) __summary)

Description

Get or set the summary for this Entry.

Parameter _summary

an ATOM.HRText instance containing the summary of this Entry.

Returns

an ATOM.HRText instance containing the summary of this Entry.

Note

this is a recommended property.


Method add_category

int module.ATOM.Entry()->add_category(object(.Category) c)

Description

Add a Category element to the Entry.

Parameter c

an ATOM.Category object.

Returns

the number of categories for this Entry.


Method rm_category

int module.ATOM.Entry()->rm_category(object(.Category) c)

Description

Remove a Category element from the Entry.

Parameter c

an ATOM.Category object.

Returns

the number of categories for this Entry.


Method categories

array module.ATOM.Entry()->categories()

Description

Gets all the categories on this Entry.

Returns

an array(ATOM.Category).


Method add_contributor

int module.ATOM.Entry()->add_contributor(object(.Contributor) c)

Description

Add a Contributor element to the Entry.

Parameter c

an ATOM.Contributor object.

Returns

the number of contributors for this Entry.


Method rm_contributor

int module.ATOM.Entry()->rm_contributor(object(.Contributor) c)

Description

Remove a Contributor element from the Entry.

Parameter c

an ATOM.Contributor object.

Returns

the number of contributors for this Entry.


Method contributors

array module.ATOM.Entry()->contributors()

Description

Gets all the contributors on this Entry.

Returns

an array(ATOM.Contributor).


Method published

void|object(.RFC3339) module.ATOM.Entry()->published(void|object(.RFC3339) __published)

Description

Get or set the published date on the Entry.

Parameter __published

an ATOM.RFC3339 instance containing the a new published time.

Returns

an ATOM.RFC3339 instance.


Method source

void|object(.Source) module.ATOM.Entry()->source(void|object(.Source) __source)

Description

Get or set a source element on the Entry.

Parameter __source

an ATOM.Source instance.

Returns

an ATOM.Source instance.


Method rights

void|object(.HRText) module.ATOM.Entry()->rights(void|object(.HRText) __rights)

Description

Get or set a rights element on the Entry.

Parameter __source

an ATOM.HRText instance.

Returns

an ATOM.HRText instance.


Method render

object(XML2.Node) module.ATOM.Entry()->render(void|object(XML2.Node) node)

Description

Render the Entry into an XML2.Node

Parameter node

an XML2.Node containing the Entries parent element.

Returns

a new XML2.Node containing the Entry.


Method `==

int module.ATOM.Entry()->`==(mixed test)


Method `!=

int module.ATOM.Entry()->`!=(mixed test)


Method _sprintf

string module.ATOM.Entry()->_sprintf()

  CLASS module.ATOM.Feed
Methods
_sprintf()
`!=()
`==()
add_author()
add_category()
add_contributor()
add_entry()
add_link()
authors()
categories()
contributors()
create()
entries()
generator()
icon()
id()
links()
logo()
render()
rights()
rm_author()
rm_category()
rm_contributor()
rm_entry()
rm_link()
subtitle()
title()
updated()
Description

An ATOM Feed element.


Import


Import


Import


Method create

void module.ATOM.Feed()->create(void|object(XML2.Node) node)

Description

Create an ATOM Feed element.

Parameter node

an XML2.Node to parse as a Feed.


Method id

object(URI) module.ATOM.Feed()->id(void|object(URI) __id)

Description

Gets and sets the URI for the Feed ID.

Parameter __id

A new URI to set the ID to.

Note

this is a required property.

Returns

a Standards.URI object.


Method title

object(.HRText) module.ATOM.Feed()->title(void|object(.HRText) __title)

Description

Get or set the Feed's Title.

Parameter __title

a new human readable text object to set.

Note

This is a required property.

Returns

a human readable text object.


Method updated

object(.RFC3339) module.ATOM.Feed()->updated(void|object(.RFC3339) __updated)

Description

Get or set the time this Feed was updated in RFC3339 format.

Parameter __updated

an RFC3339 object.

Note

this is a required property.

Returns

an RFC3339 object.


Method add_author

int module.ATOM.Feed()->add_author(object(.Author) a)

Description

Add an Author element to the Feed.

Parameter a

an ATOM.Author object.

Returns

the number of Authors for this Feed.


Method rm_author

int module.ATOM.Feed()->rm_author(object(.Author) a)

Description

Remove an Author element from the Feed.

Parameter a

an ATOM.Author object.

Returns

the number of Authors for this Feed.


Method authors

array module.ATOM.Feed()->authors()

Description

Gets all the Authors on this Feed.

Returns

an array(ATOM.Author).

Note

this is a recommended property.


Method add_link

int module.ATOM.Feed()->add_link(object(.Link) l)

Description

Add an Link element to the Feed.

Parameter l

an ATOM.Link object.

Returns

the number of Links for this Feed.


Method rm_link

int module.ATOM.Feed()->rm_link(object(.Link) l)

Description

Remove an Link element from the Feed.

Parameter a

an ATOM.Link object.

Returns

the number of Links for this Feed.


Method links

array module.ATOM.Feed()->links()

Description

Gets all the Link on this Feed.

Returns

an array(ATOM.Link).

Note

this is a recommended property.


Method add_category

int module.ATOM.Feed()->add_category(object(.Category) c)

Description

Add a Category element to the Feed.

Parameter c

an ATOM.Category object.

Returns

the number of categories for this Feed.


Method rm_category

int module.ATOM.Feed()->rm_category(object(.Category) c)

Description

Remove a Category element from the Feed.

Parameter c

an ATOM.Category object.

Returns

the number of categories for this Feed.


Method categories

array module.ATOM.Feed()->categories()

Description

Gets all the categories on this Feed.

Returns

an array(ATOM.Category).


Method add_contributor

int module.ATOM.Feed()->add_contributor(object(.Contributor) c)

Description

Add a Contributor element to the Feed.

Parameter c

an ATOM.Contributor object.

Returns

the number of contributors for this Feed.


Method rm_contributor

int module.ATOM.Feed()->rm_contributor(object(.Contributor) c)

Description

Remove a Contributor element from the Feed.

Parameter c

an ATOM.Contributor object.

Returns

the number of contributors for this Feed.


Method contributors

array module.ATOM.Feed()->contributors()

Description

Gets all the contributors on this Feed.

Returns

an array(ATOM.Contributor).


Method generator

object(.Generator) module.ATOM.Feed()->generator(void|object(.Generator) __generator)

Description

Get or set the generator element on the Feed.

Parameter __generator

an ATOM.Generator instance containing the generator.

Returns

an ATOM.Generator instance.


Method icon

void|object(URI) module.ATOM.Feed()->icon(void|object(URI) __icon)

Description

Get or set the icon element on the Feed.

Parameter __icon

a Standards.URI instance containing the URI of the icon.

Returns

a Standards.URI instance.


Method logo

void|object(URI) module.ATOM.Feed()->logo(void|object(URI) __logo)

Description

Get or set the logo element on the Feed.

Parameter __logo

a Standards.URI instance containing the URI of the logo.

Returns

a Standards.URI instance.


Method rights

void|object(.HRText) module.ATOM.Feed()->rights(void|object(.HRText) __rights)

Description

Get or set a rights element on the Feed.

Parameter __source

an ATOM.HRText instance.

Returns

an ATOM.HRText instance.


Method subtitle

void|object(.HRText) module.ATOM.Feed()->subtitle(void|object(.HRText) __subtitle)

Description

Get or set a subtitle element on the Feed.

Parameter __subtitle

an ATOM.HRText instance.

Returns

an ATOM.HRText instance.


Method add_entry

int module.ATOM.Feed()->add_entry(object(.Entry) e)

Description

Add a Entry element to the Feed.

Parameter c

an ATOM.Entry object.

Returns

the number of entries for this Feed.


Method rm_entry

int module.ATOM.Feed()->rm_entry(object(.Entry) e)

Description

Remove a Entry element from the Feed.

Parameter c

an ATOM.Entry object.

Returns

the number of entries for this Feed.


Method entries

void|array module.ATOM.Feed()->entries()

Description

Gets all the entries on this Feed.

Returns

an array(ATOM.Entry).


Method render

object(XML2.Node) module.ATOM.Feed()->render(void|object(XML2.Node) node)

Description

Render the Feed into an XML2.Node

Parameter node

an XML2.Node containing the Feed's parent element.

Returns

a new XML2.Node containing the Feed.

Note

if node is not present then render() creates a new XML document with the feed element at the root.


Method `==

int module.ATOM.Feed()->`==(mixed test)


Method `!=

int module.ATOM.Feed()->`!=(mixed test)


Method _sprintf

string module.ATOM.Feed()->_sprintf()

  CLASS module.ATOM.Generator
Methods
_sprintf()
`!=()
`==()
contents()
create()
render()
uri()
version()
Description

An ATOM Generator element.


Import


Import


Import


Method create

void module.ATOM.Generator()->create(void|object(XML2.Node) node)

Description

Create an ATOM Generator element.

Parameter node

an XML2.Node to parse as a Generator.


Method uri

void|object(URI) module.ATOM.Generator()->uri(void|object(URI) __uri)

Description

Gets and sets the URI for the Generator URI.

Parameter __uri

A new URI to set the Generator URI to.

Returns

a Standards.URI object.


Method version

void|string module.ATOM.Generator()->version(void|string __version)

Description

Gets and sets the version for the Generator.

Parameter __version

a new version string to set. The ATOM spec is ambiguous in this instance and it is presumed you can use any freeform text, however since version is an attribute of Generator it's presumed that it should be kept fairly simple.

Returns

a string, duh.


Method contents

string module.ATOM.Generator()->contents(void|string __contents)

Description

Gets and sets the contents of the Generator element.

Parameter __contents

new contents to set. The ATOM spec is ambiguous in this instance and it is presumed you can use any freeform text, however as it is not flagged as "human readable" it cannot contain any tags or other markup.

Returns

a string, duh.


Method render

object(XML2.Node) module.ATOM.Generator()->render(void|object(XML2.Node) node)

Description

Render the Generator into an XML2.Node

Parameter node

an XML2.Node containing the Entries parent element.

Returns

a new XML2.Node containing the Feed.


Method `==

int module.ATOM.Generator()->`==(mixed test)


Method `!=

int module.ATOM.Generator()->`!=(mixed test)


Method _sprintf

string module.ATOM.Generator()->_sprintf()

  CLASS module.ATOM.HRText
Methods
contents()
create()
render()
tag_name()
type()
Description

ATOM's human readable text elements.


Import


Import


Import


Method create

void module.ATOM.HRText()->create(void|object(XML2.Node) node)

Description

Create an ATOM human readable text element.

Note

ATOM's human readable text isn't really very nice, so here's the URI of the spec: http://www.atomenabled.org/developers/syndication/#text

Parameter node

an XML2.Node to parse as a HRText.


Method tag_name

string module.ATOM.HRText()->tag_name(void|string __tag_name)

Description

Get or set the name of the human readable text tag (usually, "title", "summary", "content", "rights", etc).

Parameter __tag_name

set the name of the tag.

Returns

the current name of the tag.


Method type

int module.ATOM.HRText()->type(void|int __type)

Description

Set the type of content contained within the HRText.

Parameter __type

either TEXT_PLAIN, TEXT_HTML or TEXT_XHTML (see this module's constants).

Note

if you change the type of an existing HRText element it will have the side-effect of clearing any contents the HRText may have contained.


Method contents

string|object(XML2.Node) module.ATOM.HRText()->contents(void|string|object(XML2.Node) __text)

Description

Get or set the contents of the HRText element.

Parameter __text

either a string containing new contents (type must be TEXT_PLAIN or TEXT_HTML) or an XML2.Node containing an XHTML DIV element (type must be TEXT_XHTML).

Returns

the current contents of the HRText.


Method render

object(XML2.Node) module.ATOM.HRText()->render(void|object(XML2.Node) node)

Description

Render the HRText into an XML2.Node

Parameter node

an XML2.Node containing the parent element.

Returns

a new XML2.Node.

  CLASS module.ATOM.Link
Methods
_sprintf()
`!=()
`==()
create()
href()
hreflang()
length()
rel()
render()
title()
type()
Description

An ATOM.Link element.


Import


Import


Import


Method create

void module.ATOM.Link()->create(void|object(XML2.Node) node)

Description

Create an ATOM Link element.

Parameter node

an XML2.Node to parse as a Link.


Method href

object(URI) module.ATOM.Link()->href(void|object(URI) __href)

Description

Get or set the href attribute (destintation URI) of the Link.

Parameter __href

a Standards.URI instance containing the link target.

Note

this is a required attribute.


Method rel

void|string|object(Standards.URI) module.ATOM.Link()->rel(void|string|object(Standards.URI) __rel)

Description

Get or set the rel attribute of the Link.

Parameter __rel

one of the standard ATOM rel attributes or a Standards.URI instance.

Returns

the current contents of the rel attribute.


Method type

void|string module.ATOM.Link()->type(void|string __type)

Description

Get or set the MIME type of the Link.

Parameter __type

a new MIME type to set.

Returns

the current MIME type.


Method hreflang

void|string module.ATOM.Link()->hreflang(void|string __hreflang)

Description

Get or set the language of the Linked resource.

Parameter __hreflang

set the language of the Linked resource.

Returns

the current language of the Linked resource.


Method title

void|string module.ATOM.Link()->title(void|string __title)

Description

Get or set a short description of the Linked resource.

Parameter __title

set a description for the Linked resource.

Returns

the current description of the Linked resource.


Method length

void|int module.ATOM.Link()->length(void|int __length)

Description

Get or set the size (in bytes) of the Linked resource.

Parameter __length

set the size of the Linked resource.

Returns

the current size of the Linked resource.


Method render

object(XML2.Node) module.ATOM.Link()->render(void|object(XML2.Node) node)

Description

Render the Link into an XML2.Node

Parameter node

an XML2.Node containing the Link's parent element.

Returns

a new XML2.Node containing the Link.


Method `==

int module.ATOM.Link()->`==(mixed test)


Method `!=

int module.ATOM.Link()->`!=(mixed test)


Method _sprintf

string module.ATOM.Link()->_sprintf()

  CLASS module.ATOM.RFC3339
Methods
calendar()
create()
parse()
render()
Description

Handle RFC3339 date and time encoding.

Note

this class is a simple wrapper around Public.Standards.RFC3339 to make sure it's present.


Import


Import


Import


Method create

void module.ATOM.RFC3339()->create(void|string text)

Description

create a new RFC3339 instance.

Parameter text

an RFC3339 date and time string to parse.


Method parse

void module.ATOM.RFC3339()->parse(string text)

Description

parse an RFC3339 date and time string.

Parameter text

an RFC3339 date and time string to parse.


Method render

string module.ATOM.RFC3339()->render()

Description

render an RFC3339 date and time string.

Note

if no time is set using the calendar() method then the current date and time is returned.


Method calendar

object(Calendar.Second) module.ATOM.RFC3339()->calendar(void|object(Calendar.Second) __t)

Description

Get or set the time of the RFC3339 instance.

Parameter __t

a Calendar.Second instance.

Returns

a Calendar.Second instance.

  CLASS module.ATOM.Source
Methods
_sprintf()
`!=()
`==()
create()
id()
render()
rights()
title()
updated()
Description

An ATOM Source element.


Import


Import


Import


Method create

void module.ATOM.Source()->create(void|object(XML2.Node) node)

Description

Create an ATOM Source element.

Parameter node

an XML2.Node to parse as a Source element.


Method id

void|object(URI) module.ATOM.Source()->id(void|object(URI) __id)

Description

Gets and sets the URI for the Feed ID.

Parameter __id

A new URI to set the ID to.

Returns

a Standards.URI object.


Method title

void|object(.HRText) module.ATOM.Source()->title(void|object(.HRText) __title)

Description

Get or set the Source's Title.

Parameter __title

a new human readable text object to set.

Returns

a human readable text object.


Method updated

void|object(.RFC3339) module.ATOM.Source()->updated(void|object(.RFC3339) __updated)

Description

Get or set the time this Source was updated in RFC3339 format.

Parameter __updated

an RFC3339 object.

Returns

an RFC3339 object.


Method rights

void|object(.HRText) module.ATOM.Source()->rights(void|object(.HRText) __rights)

Description

Get or set a rights element on the Source.

Parameter __source

an ATOM.HRText instance.

Returns

an ATOM.HRText instance.


Method render

object(XML2.Node) module.ATOM.Source()->render(void|object(XML2.Node) node)

Description

Render the Source into an XML2.Node

Parameter node

an XML2.Node containing the Sources parent element.

Returns

a new XML2.Node containing the Source.


Method `==

int module.ATOM.Source()->`==(mixed test)


Method `!=

int module.ATOM.Source()->`!=(mixed test)


Method _sprintf

string module.ATOM.Source()->_sprintf()

  MODULE module.RSS
Classes
Channel
Item
Thing

Methods
add_ns_channel_handler()
add_ns_item_handler()
parse()
Description

This is a parser for RSS files. Versions 0.92, 1.0 and 2.0 are supported.


Import


Method parse

object(.Channel) module.RSS.parse(string xml)


Method add_ns_item_handler

void module.RSS.add_ns_item_handler(string namespace, string element, function handler)

Parameter handler

receives a function that gets the namespace, the element name, node and the Thing object


Method add_ns_channel_handler

void module.RSS.add_ns_channel_handler(string namespace, string element, function handler)

Parameter handler

receives a function that gets the namespace, the element name, node and the Thing object

  CLASS module.RSS.Channel
Methods
add_category()
add_item()
set_cloud()

Inherit Thing

  • Thing

  • Imports


    Variable items

    array(object(Item)) module.RSS.Channel()->items


    Method add_item

    void module.RSS.Channel()->add_item(object(Item) i)


    Method add_category

    void module.RSS.Channel()->add_category(string category, string description)


    Method set_cloud

    void module.RSS.Channel()->set_cloud(string domain, string port, string path, string reg)

      CLASS module.RSS.Item
    Methods
    add_category()
    set_author()
    set_comments()
    set_enclosure()
    set_guid()
    set_pubDate()
    set_source()

    Import


    Import


    Inherit Thing

  • Thing

  • Method set_enclosure

    void module.RSS.Item()->set_enclosure(string url, string length, string type)


    Method add_category

    void module.RSS.Item()->add_category(string name, string domain)

    Description

    we can have more than one category.


    Method set_source

    void module.RSS.Item()->set_source(string name, string url)


    Method set_guid

    void module.RSS.Item()->set_guid(string name, int(0..1) permalink)


    Method set_author

    void module.RSS.Item()->set_author(string author)


    Method set_comments

    void module.RSS.Item()->set_comments(string comments)


    Method set_pubDate

    void module.RSS.Item()->set_pubDate(string pubDate)

      CLASS module.RSS.Thing

    Import


    Variable data

    mapping module.RSS.Thing()->data

      MODULE module.XESN
    Classes
    Alias
    Description
    Link

    Description

    This module implements extra Atom (or RSS) elements inside the XESN namespace.

    This module is called by Public.Syndication.ATOM if any XESN elements are found.


    Import

      CLASS module.XESN.Alias
    Methods
    _sprintf()
    `!=()
    `==()
    contents()
    create()
    render()
    Description

    An XESN Alias element.


    Import


    Import


    Import


    Method create

    void module.XESN.Alias()->create(void|object(XML2.Node) node)

    Description

    Construct either a blank Alias element or parse one.

    Parameter node

    nothing, or an XML2.Node to parse for an existing Alias element.


    Method contents

    void|string module.XESN.Alias()->contents(void|string __contents)

    Description

    Get or set the contents of the Alias element.

    Parameter __contents

    set the contents of the Alias element.

    Returns

    the current contents of the Alias element.


    Method render

    object(XML2.Node) module.XESN.Alias()->render(void|object(XML2.Node) node)

    Description

    Render the Alias into an XML2.Node

    Parameter node

    an XML2.Node containing the Aliases parent element.

    Returns

    a new XML2.Node containing the Alias.


    Method `==

    int module.XESN.Alias()->`==(mixed test)


    Method `!=

    int module.XESN.Alias()->`!=(mixed test)


    Method _sprintf

    string module.XESN.Alias()->_sprintf()

      CLASS module.XESN.Description
    Methods
    _sprintf()
    `!=()
    `==()
    contents()
    create()
    render()
    Description

    An XESN Description element.


    Import


    Import


    Import


    Method create

    void module.XESN.Description()->create(void|object(XML2.Node) node)

    Description

    Construct either a blank Description element or parse one.

    Parameter node

    nothing, or an XML2.Node to parse for an existing Description.


    Method contents

    void|string module.XESN.Description()->contents(void|string __contents)

    Description

    Get or set the contents of the Description element.

    Parameter __contents

    set the contents of the Description element.

    Returns

    the current contents of the Description element.


    Method render

    object(XML2.Node) module.XESN.Description()->render(void|object(XML2.Node) node)

    Description

    Render the Description into an XML2.Node

    Parameter node

    an XML2.Node containing the Description's parent element.

    Returns

    a new XML2.Node containing the Description.


    Method `==

    int module.XESN.Description()->`==(mixed test)


    Method `!=

    int module.XESN.Description()->`!=(mixed test)


    Method _sprintf

    string module.XESN.Description()->_sprintf()

      CLASS module.XESN.Link
    Methods
    _sprintf()
    `!=()
    `==()
    create()
    discovery()
    href()
    is_avatar()
    is_peer()
    rel()
    render()
    type()
    Description

    An XESN Link element.


    Import


    Import


    Import


    Constant REL_PEER

    constant module.XESN.Link()->REL_PEER

    Description

    Allowed rel values.


    Method create

    void module.XESN.Link()->create(void|object(XML2.Node) node)

    Description

    Create an XESN Link element.

    Parameter node

    an XML2.Node to parse as a Link.


    Method href

    object(URI) module.XESN.Link()->href(void|object(URI) __href)

    Description

    Get or set the href attribute (destintation URI) of the Link.

    Parameter __href

    a Standards.URI instance containing the link target.

    Note

    this is a required attribute.


    Method discovery

    void|string module.XESN.Link()->discovery(void|string __discovery)

    Description

    Get or set the discovery attribute of the Link.

    Parameter __discovery

    a string containing either "configured" or "automatic".

    Note

    this is a required attribute if the Link is a Peer link.


    Method rel

    void|string module.XESN.Link()->rel(void|string __rel)

    Description

    Get or set the rel attribute of the Link.

    Parameter __discovery

    a string containing a space separated list of rel values.

    Note

    this is a required attribute.


    Method is_peer

    void|multiset module.XESN.Link()->is_peer()

    Description

    Is the Link a Peer Link?

    Returns

    void or a multiset of current rel values.


    Method is_avatar

    int module.XESN.Link()->is_avatar()

    Description

    Is the Link an Avatar Link?

    Returns

    0 or 1.


    Method type

    void|string module.XESN.Link()->type(void|string __type)

    Description

    Gets or sets the MIME type of the Link element.

    Parameter __type

    a string containing the MIME type to set.

    Returns

    a string containing the current MIME type.


    Method render

    object(XML2.Node) module.XESN.Link()->render(void|object(XML2.Node) node)

    Description

    Render the Link into an XML2.Node

    Parameter node

    an XML2.Node containing the Link's parent element.

    Returns

    a new XML2.Node containing the Link.


    Method `==

    int module.XESN.Link()->`==(mixed test)


    Method `!=

    int module.XESN.Link()->`!=(mixed test)


    Method _sprintf

    string module.XESN.Link()->_sprintf()

      MODULE module.XHTML
    Description

    Some constants for XHTML 1.1. Just for consistencies sake really.

    This module is depended upon by Public.Syndication.ATOM if any XHTML elements are found.


    Import

    gotpike.org | Copyright © 2004 - 2019 | Pike is a trademark of Department of Computer and Information Science, Linköping University