SourceForge.net LogoPHPGallue
[ class tree: libbase ] [ index: libbase ] [ all elements ]

Class: GALSkeleton

Source Location: /libbase/skeleton.inc.php

Class Overview


Skeleton for a DOM-based HTML page.


Variables

Methods


Child classes:

GALGallerybase
Initialization code for libgallue.

Class Details

[line 34]
Skeleton for a DOM-based HTML page.

This class is a page skeleton that provides references to the DOMElements which represent the whole page, the <head> and <body> sections and some <div>s which are called topbanner, topnavi, leftnavi and textfield. In the directory where the source file skeleton.inc.php resides the website.css file is located which is referenced by this page. Just put it in the directory where your web server finds your PHP script which uses this class.




[ Top ]


Class Variables

$cacheable =  true

[line 102]

TRUE if the current page is cacheable.

If this is FALSE, the serializer will set some cache control headers to forbid caching.




Tags:

access:  protected

Type:   bool


[ Top ]

$isPrivate =  false

[line 96]

TRUE if the current page is private.

If this is TRUE, the serializer will set some cache control headers that mark the page as private.




Tags:

access:  protected

Type:   bool


[ Top ]

$layout =  'table'

[line 107]

Determines which page layout is used



Tags:

var:  'table' (default), 'box'
access:  protected

Type:   string


[ Top ]

$output =  'html'

[line 90]

control the output format



Tags:

var:  'html' or 'xhtml'
access:  protected

Type:   string


[ Top ]

$_body =

[line 50]

The <body> tag.



Tags:

access:  protected

Type:   DOMElement


[ Top ]

$_document =

[line 40]

The document.



Tags:

access:  protected

Type:   DOMDocument


[ Top ]

$_head =

[line 55]

The <head> tag.



Tags:

access:  protected

Type:   DOMElement


[ Top ]

$_html =

[line 45]

The <html> tag.



Tags:

access:  protected

Type:   DOMElement


[ Top ]

$_leftnavi =

[line 65]

A <div> with id="leftnavi".



Tags:

access:  protected

Type:   DOMElement


[ Top ]

$_rightnavi =

[line 70]

A <div> with id="rightnavi".



Tags:

access:  protected

Type:   DOMElement


[ Top ]

$_textfield =

[line 85]

A <div> with id="textfield".



Tags:

access:  protected

Type:   DOMElement


[ Top ]

$_title =

[line 60]

The <title> tag.



Tags:

access:  protected

Type:   DOMElement


[ Top ]

$_topbanner =

[line 80]

A <div> with id="topbanner".



Tags:

access:  protected

Type:   DOMElement


[ Top ]

$_topnavi =

[line 75]

A <div> with id="topnavi".



Tags:

access:  protected

Type:   DOMElement


[ Top ]



Class Methods


static method shorten [line 292]

static void shorten( string $string, int $characters, [string $ellipse = '…'])

Shortens the given string to the given length.

This method's task is to shorten the given string to the given number of characters. If the length of the submitted string is less or equal the desired number of characters, the method returns the submitted string unchanged. If the submitted string's length is greater than the desired number of characters, the string is shortened so that it has the desired length after appending the ellipse characters. Note that the returned string's length is at least the length of the ellipse! This method is safe for unicode and other multi-byte charsets, it uses the mb-functions instead of the standard string functions.




Parameters:

string   $string   The string to shorten.
int   $characters   The desired number of characters.
string   $ellipse   The characters mark an ellipse if if the

[ Top ]

constructor __construct [line 112]

GALSkeleton __construct( [ $layout = 'table'])

Initializes this page.

This method builds the page structure using DOM classes.




Overridden in child classes as:

GALGallerybase::__construct()
Initializes the page.

Parameters:

   $layout  

[ Top ]

method error [line 249]

void error( $text)

Append an error message to the topbanner element.



Parameters:

   $text  

[ Top ]

method err_handler [line 263]

void err_handler( int $errno, string $errstr, string $errfile, int $errline)

Callback for PHP error handling.

PHP error handler method that redirects error messages to the message() and error() methods.




Parameters:

int   $errno   The errror number.
string   $errstr   The human readable error message.
string   $errfile   The file name where the error occurred.
int   $errline   The line number in the file where teh error occurred.

[ Top ]

method message [line 242]

void message( $text)

Append a message to the topbanner element.



Parameters:

   $text  

[ Top ]

method nocache [line 302]

void nocache( )

Forbids caching.



[ Top ]

method serialize [line 215]

void serialize( )

Write the contents of this page to stdout.

This method echos the result of $_document->saveXML()




[ Top ]

method setPrivate [line 308]

void setPrivate( )

Marks the page as private



[ Top ]

method __get [line 196]

DOMNode __get( string $varName)

Magic method to access the protected page elements like public PHP properties.



Tags:

throws:  GAL_EProperty If the name of the requested property is invalid.


Parameters:

string   $varName   The name of a property, one of 'head', 'body', 'topbanner', 'topnavi', 'leftnavi' or 'textfield'

[ Top ]


Documentation generated on Wed, 16 Aug 2006 15:36:45 +0200 by phpDocumentor 1.3.0RC6