=>
&GettingStarted;
==>
==>
Apache-specific Functions
Apache
=>
apache_lookup_uri
=>
Using PHP from the command line
==>
Configuration
==>
The configuration file
==>
// from php-gtk!
GtkAccelLabel
int get_accel_width
XXXXX
Misc Gtk Functions
*/
require_once(APPDIR."languages/HTML/html_generator_base.class");
class phpmanual_devhelp_generator extends html_generator_base {
var $inbody=0;
var $htmltree; // where the tree of data goes!
var $outtree=array();
var $curelementid=0; // current elementid;
var $maxelementid=0; // total elements;
var $functiontree = array();
var $extension = ".php";
function devhelp_check_roots() {
if (!@$this->outtree[0]) {
$this->outtree[0] = &new parser_XML_element;
}
}
// disable everything!
function override_all($i) {
$this->done($i);
$this->out_children($this->htmltree[$i]->children);
}
function override_refentry($i) {
$this->start_block($i,"ref_entry","(refname|refentrytitle)");
}
function override_classentry($i) {
$this->start_block($i,"class_entry","classtitle");
}
function override_method($i) {
$this->start_block($i,"method","function");
}
function override_constructor($i) {
$this->start_block($i,"contructor","function");
}
function override_classset($i) {
$this->start_block($i,"classset","classsettitle");
}
function override_part($i) {
$this->start_block($i,"part","title");
}
function override_chapter($i) {
$this->start_block($i,"chapter","title");
}
function override_preface($i) {
$this->start_block($i,"preface","title");
}
function override_reference($i) {
$this->start_block($i,"reference","title");
}
function override_sect1($i) {
$this->start_block($i,"sect1","title");
}
function override_appendix($i) {
$this->start_block($i,"appendix","title");
}
function start_block($i,$what,$name_element) {
$this->active="";
$active_set="";
echo "STARTING $what \n";
if ($this->htmltree[$i]->done) return;
if ($this->htmltree[$i]->attributes["id"] &&
!is_array($this->htmltree[$i]->attributes["id"])) {
//$this->out .= "<{$what}sub>\n";
$link = trim(str_replace("\"", "", $this->htmltree[$i]->attributes["id"]));
$link = trim(str_replace("\'", "", $link));
if ($this->active) $active_set="Y";
$nameid = $this->look_forward($i+1, $name_element);
if ($nameid &&
is_string($this->htmltree[$nameid]->children[0][1]) &&
$this->htmltree[$nameid]->children[0][1] && $link) {
$name = $this->htmltree[$nameid]->children[0][1];
if (! ($name{0} == "\"" || $name{0} == "'"))
$name = "\"$name\"";
}
if ($name && $link) {
$this->devhelp_check_roots();
$this->maxelementid++;
$this->outtree[$this->maxelementid] = &new parser_XML_element;
$useid = $this->maxelementid;
$this->outtree[$this->maxelementid]->parent = $this->curelementid;
$this->outtree[$this->curelementid]->children[]=$this->maxelementid;
//echo "\n{$this->maxelementid} : $tag";
$this->outtree[$this->maxelementid]->title = "sub";
$this->outtree[$this->maxelementid]->attributes["link"] = "\"". $link . $this->extension ."\"";
$this->outtree[$this->maxelementid]->attributes["name"] = $name;
$this->curelementid =$this->maxelementid;
if ($this->htmltree[$i]->title == "refentry") {
$functionobj = $this->outtree[$this->maxelementid];
$functionobj->title="function";
$this->functiontree[] = $functionobj;
}
}
}
$this->done($i);
$this->out_children($this->htmltree[$i]->children);
if ($link && $name) {
$this->curelementid = $this->outtree[$useid]->parent;
}
}
function look_forward($start, $title) {
$total = count($this->htmltree);
for ($i=$start;$i<$total;$i++) {
echo "lookforward: {$this->htmltree[$i]->title} == $title\n";
if (ereg("^".$title."$", $this->htmltree[$i]->title))
return $i;
}
}
}
?>