Class WMLdeck

Description

WMLDeck class Manage WML Decks of cards.

The main element in WML content - the deck which holds all the cards.

Located in /wml-defs.php (line 722)

RenderableObject
   |
   --WMLdeck
Variable Summary
 mixed $cards
 mixed $template
 mixed $wml_len
Method Summary
 WMLdeck WMLdeck ([object $card = ""])
 integer calculate_length ()
 string html ()
 void insert_card (object $card)
 void insert_template (object $template)
 integer length ()
 void new_card (string $card_id, [string $title = ""], [string $newcontext = false], [string $ordered = false])
 string response ()
 string wml ()
Variables
mixed $cards (line 726)

Array of card objects

mixed $template (line 724)

Optional template

mixed $wml_len = 0 (line 728)

Length of content in bytes

Methods
Constructor WMLdeck (line 735)

Constructor Create a new WML deck.

WMLdeck WMLdeck ([object $card = ""])
  • object $card: A card to put in the deck
calculate_length (line 756)

Calculate the length (size) of deck Calculates the WML length from scratch.

  • return: The calculated size of the deck of WML
integer calculate_length ()
html (line 842)

Return HTML content Use render() to render this element in your page.

Returns a string which is the HTML for the deck.

  • return: The HTML for the element.
string html ()

Redefinition of:
RenderableObject::html()
Return output suitable for normal HTML-capable device. This method must be over-ridden by a method of the same name in the descendant class which renders output to web browsers.
insert_card (line 778)

Add card Inserts a ready-made card object into the deck.

void insert_card (object $card)
  • object $card: The card object to add to the WML deck
insert_template (line 766)

Define template defines the template for the deck.

void insert_template (object $template)
  • object $template: The template object for the WML deck
length (line 747)

Length (size) of deck Return the length of the WML. NOTE: this should only be called *after* the wml() function has been called, or it will return zero.

  • return: The size of the deck of WML
integer length ()
new_card (line 791)

New card Creates a card and inserts the new card object into the deck.

void new_card (string $card_id, [string $title = ""], [string $newcontext = false], [string $ordered = false])
  • string $card_id: The unique card identifier string
  • string $title: The card title string
  • string $newcontext: True if card has a new context when shown
  • string $ordered: True if card is ordered
response (line 801)

Return complete WML response content including DOCTYPE, <wml> tags, and the content-length header.

  • return: The complete WML for this deck
string response ()
wml (line 825)

Return WML content for this deck.

Use render() to render this element in your page. Returns a string which is the WML for the deck. First we render any template and then we iterate over all the cards defined for the deck.

  • return: The WML for the deck of cards complete.
string wml ()

Redefinition of:
RenderableObject::wml()
Return output suitable for normal wap-capable device. This method must be over-ridden by a method of the same name in the descendant class which renders output to wap devices.

Inherited Methods

Inherited From RenderableObject

 RenderableObject::RenderableObject()
 RenderableObject::html()
 RenderableObject::render()
 RenderableObject::wml()
 RenderableObject::wmlup()
 RenderableObject::xml()

Documentation generated by phpDocumentor 1.3.0RC3