FIT
[ class tree: FIT ] [ index: FIT ] [ all elements ]

Class: Testing_FIT_Parser

Source Location: /Testing_FIT-0.2.2/Parser.php

Class Overview


FIT Parser


Author(s):

Version:

  • 0.1.1

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 21]
FIT Parser
  • Version: 0.1.1


[ Top ]


Class Variables

$_fitTags = array( 'table', 'tr', 'td' )

[line 69]

known tags to parse
  • Access: protected

Type:   array


[ Top ]



Method Detail

appendColumn   [line 616]

array appendColumn( int $table)

append column

append a new column at $table

  • Return: contain one cell with attributes
  • Access: public

Parameters:

int   $table   — 

[ Top ]

appendRow   [line 497]

bool appendRow( int $table)

append row

append a new row with the format form the old last row to table

  • Return: true on success
  • Access: public

Parameters:

int   $table   — 

[ Top ]

appendTable   [line 733]

void appendTable( int $table, int $content)

append table

appends some content after $table

  • Access: public

Parameters:

int   $table   — 
int   $content   —  some html content

[ Top ]

countChildNodes   [line 78]

mixed countChildNodes( [int $table = null], [int $row = null])

count nodes
  • Return: node value or null if not exists
  • Access: public

Parameters:

int   $table   —  index of table
int   $row   —  index of table's row

[ Top ]

deleteBeforeColumn   [line 703]

void deleteBeforeColumn( int $table, int $row, int $col)

delete before column

deletes exactly that $cell in that $row only to use in combination with colspan be careful to use this funtion!

  • Access: public

Parameters:

int   $table   — 
int   $row   — 
int   $col   — 

[ Top ]

deleteRow   [line 458]

bool deleteRow( int $table, $delRow, int $row)

delete row

delete a row

  • Return: true on success
  • Access: public

Parameters:

int   $table   — 
int   $row   — 
   $delRow   — 

[ Top ]

getNodeValue   [line 112]

mixed &getNodeValue( string $field, int $table, [int $row = null], [int $column = null])

receive node value from parsed table
  • Return: node value or null if not exists
  • Access: public

Parameters:

string   $field   —  node's name (tag, before, after, children)
int   $table   —  index of table
int   $row   —  index of table's row
int   $column   —  index of table's row's columns

[ Top ]

insertBeforeColumn   [line 648]

bool insertBeforeColumn( int $table, int $column)

insert before column

insert a new column in $table before $column if $column == last col of table the appendColumn function will be called

  • Return: true on success
  • Access: public

Parameters:

int   $table   — 
int   $column   — 

[ Top ]

insertBeforeRow   [line 539]

bool insertBeforeRow( int $table, int $newRow)

insert before row

insert a new row in $table before $newRow

  • Return: true on success
  • Todo: look at fixture, because of first, second row and column
  • Access: public

Parameters:

int   $table   — 
int   $newRow   — 

[ Top ]

parse   [line 228]

bool parse( string $string)

Parse HTML for FIT-like-tables

Parse string like SAX does: call sub routines based on events. There are events for "startTag", "endTag" and "cdata". Of course this is not an XML parser (as the content may not follow XML standards) Also it can only handle a bunch of well known tags.

  • Return: true on success
  • Access: public

Parameters:

string   $string   —  to be parsed html

[ Top ]

removeTable   [line 770]

void removeTable( int $table)

remove table

remove fit summary table

  • Access: public

Parameters:

int   $table   — 

[ Top ]

serialize   [line 169]

string serialize( )

Serialize current tables to string

This undoes the Parse function.

  • Return: tables
  • Access: public

[ Top ]

setNodeValue   [line 155]

bool setNodeValue( string $field, mixed $value, int $table, [int $row = null], [int $column = null])

set node value from parsed table
  • Return: true on success
  • Access: public

Parameters:

string   $field   —  node's name (tag, before, after, children, cData)
mixed   $value   —  node's new value
int   $table   —  index of table
int   $row   —  index of table's row
int   $column   —  index of table's row's columns

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:09:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.