com.lokorin.lokorin.lib
[ class tree: com.lokorin.lokorin.lib ] [ index: com.lokorin.lokorin.lib ] [ all elements ]

Class: Header

Source Location: /_includes/lib_tables.php

Class Overview


Descibes an Header.


Author(s):

  • Andreas Launila

Variables

Methods



Class Details

[line 164]
Descibes an Header.



Tags:

author:  Andreas Launila


[ Top ]


Class Variables

$captions =

[line 169]

Contains the captions for the header.



Tags:

access:  private

Type:   array


[ Top ]



Class Methods


constructor __construct [line 176]

Header __construct( [mixed $captions = array()], array $caption)

Constructor for Header.



Tags:

access:  public


Parameters:

array   $caption   An optional param to define the captions for the header. All captions have to be unique.

[ Top ]

method add [line 190]

void add( string $caption)

Adds an new caption to the header.



Tags:

access:  public


Parameters:

string   $caption   The new caption to add. This caption has to be unique, it may not already exist in the table's captions.

[ Top ]

method convertToNumerical [line 324]

integer convertToNumerical( mixed $value)

Converts the value to the corresponding numerical one. The conversion will only be reliable if the value return true with isConvertableToNumerical().



Tags:

return:  The value in a numerical form.
access:  private


Parameters:

mixed   $value   The value that should be converted.

[ Top ]

method getAsHtml [line 211]

string getAsHtml( )

Gets the header as HTML, including the row tags.

I.e. <tr><th>...</th>...</tr>




Tags:

return:  An table header in HTML format.
access:  public


[ Top ]

method isConvertableToNumerical [line 313]

boolean isConvertableToNumerical( mixed $value)

Checks if a value could be converted to a numerical value. I.e. if it is a numerical value or possible a formatted numerical value. E.g.

'+3,000.50' counts as a convertable value, but '+31 DKP' does not.




Tags:

return:  True if the value can be converted to a valid numerical value (one that will make is_numeric true).
access:  private


Parameters:

mixed   $value   The value that should be checked.

[ Top ]

method performSort [line 232]

The performSort( array $rows)

Performs a sort, if the user has requested one, on the specified rows.



Tags:

return:  rows, sorted in the specified way.
access:  public


Parameters:

array   $rows   The rows that should be sorted. The rows should have as many columns as the header has captions.

[ Top ]

method remove [line 200]

void remove( string $caption)

Removes a caption from the header, assuming that the caption exists.



Tags:

access:  public


Parameters:

string   $caption   The caption to attempt to remove.

[ Top ]


Documentation generated on Sun, 16 Apr 2006 21:03:57 +0200 by phpDocumentor 1.3.0RC4