HistView Api Doc
SUMMARY:  FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Api
Class histview


class histview

Processing a history file and prepare it for HTML output

Authors:
Izzy (devel@izzysoft.de)
Version:
$Revision: 1.3 $ $Date: 2007-08-08 19:48:25 $
Copyright:
(c) 2003-2007 by Itzchak Rehberg and IzzySoft

Constructor Summary
void histview(string $infile, [string $basename])
Create an instance and read the input file into the internal array

Method Summary
boolean add_mark(string $name, string $symbol, string $icon)
Add another mark to the set
private string getdlurl(string $type)
Check whether there is a file to download - and create URL if any
string out()
Generate the output page content
private boolean pline(string $line)
Process a single line from the input file
boolean process()
Process the input file
void set_basedir(string $type, string $dir)
Override base URLs for archives.
boolean set_icon([string $plus], [string $minus], [string $change], [string $bug], [string $tar], [string $deb], [string $rpm])
Override default icon settings icons can either be a character/string or a complete IMG tag
boolean set_mark([string $plus], [string $minus], [string $change], [string $bug], [string $ver])
Override default identifier mark settings Identifier marks are the characters used to identify the changes, such as a "+" for a new feature or a "!" for a bug
void set_max_relnum(integer $relnum)
Set the maximum release number To take our example from set_basedir again (dummy-0.
void set_relname(string $relname)
Set the release extension for *.

Constructor Detail

histview()

void histview(string $infile, [string $basename])

Create an instance and read the input file into the internal array

Parameters:
infile - input file name
basename - basename for files (e.g. "histview" for histview-0.1.3-izzy1.noarch.rpm)

Method Detail

add_mark()

boolean add_mark(string $name, string $symbol, string $icon)

Add another mark to the set

Parameters:
name - unique name for the mark
symbol - one character like '!' for a bug
icon - complete image tag or string to display instead of the symbol
Returns:
success

getdlurl()

private string getdlurl(string $type)

Check whether there is a file to download - and create URL if any

Parameters:
type - Type (one of tar, deb, rpm)
Returns:
href complete href string if found, empty string else

out()

string out()

Generate the output page content

Returns:
HTML formatted history

pline()

private boolean pline(string $line)

Process a single line from the input file

Parameters:
line - the input line to parse
Returns:
success

process()

boolean process()

Process the input file

Returns:
success

set_basedir()

void set_basedir(string $type, string $dir)

Override base URLs for archives. With $type='base' set the string to cut of to leave the download URL. Example: Your files are somewhere below /var/www/files/download, and your servers document root is /var/www, so you would specify "/var/www" here. If your files reside outside the servers document root, say below /var/ftp/download, you should create a directory alias called "/ftp/" pointing to /var/ftp, and specify "/var" here.

Parameters:
type - tar, deb, rpm or base
dir - the directory for this type

set_icon()

boolean set_icon([string $plus], [string $minus], [string $change], [string $bug], [string $tar], [string $deb], [string $rpm])

Override default icon settings icons can either be a character/string or a complete IMG tag

Parameters:
plus - FeatureAdd Icon
minus - Removed stuff Icon
change - Changed stuff Icon
bug - BugFix Icon
tar - Tarball Icon
deb - Debian Icon
rpm - RPM Icon
Returns:
success

set_mark()

boolean set_mark([string $plus], [string $minus], [string $change], [string $bug], [string $ver])

Override default identifier mark settings Identifier marks are the characters used to identify the changes, such as a "+" for a new feature or a "!" for a bug

Parameters:
plus - FeatureAdd mark
minus - Removed stuff mark
change - Changed stuff mark
bug - BugFix mark
ver - Version mark
Returns:
success

set_max_relnum()

void set_max_relnum(integer $relnum)

Set the maximum release number To take our example from set_basedir again (dummy-0.1.2-johnny3.noarch.rpm), the relnum of that package is "3" (the number immediately following the release extension). To find the latest package, histview would "replace" this part by $i, counting down from max_relnum to 0 until it finds a file.

Parameters:
relnum - max release number to check for

set_relname()

void set_relname(string $relname)

Set the release extension for *.deb/*.rpm For the fictive package dummy-0.1.2-johnny3.noarch.rpm this would be "johnny"

Parameters:
relname - extension to use

HistView Api Doc
SUMMARY:  FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

This document was generated by phpdocgen 0.16.
Copyright © 2002-03 Stéphane GALLAND (under the GNU General Public License)