6 $fp = fopen("../phpDocumentor/Converter.inc","r");
\r
7 $file = fread($fp,filesize("../phpDocumentor/Converter.inc"));
\r
12 function &newSmarty()
\r
14 if (!isset(\$this->package_index))
\r
15 foreach(\$this->all_packages as \$key => \$val)
\r
17 if (isset(\$this->pkg_elements[\$key]))
\r
19 if (!isset(\$start)) \$start = \$key;
\r
20 \$this->package_index[] = array('link' => \"li_\$key.html\", 'title' => \$key);
\r
23 \$templ = new Smarty;
\r
24 \$templ->template_dir = \$this->smarty_dir . PATH_DELIMITER . 'templates';
\r
25 \$templ->compile_dir = \$this->smarty_dir . PATH_DELIMITER . 'templates_c';
\r
26 \$templ->config_dir = \$this->smarty_dir . PATH_DELIMITER . 'configs';
\r
27 \$templ->assign(\"packageindex\",\$this->package_index);
\r
28 \$templ->assign(\"phpdocversion\",PHPDOCUMENTOR_VER);
\r
29 \$templ->assign(\"phpdocwebsite\",PHPDOCUMENTOR_WEBSITE);
\r
30 \$templ->assign(\"package\",\$this->package);
\r
31 \$templ->assign(\"subdir\",'');
\r
36 $tokens = token_get_all($file);
\r
38 $nl_check = array(T_WHITESPACE,T_ENCAPSED_AND_WHITESPACE,T_COMMENT,T_DOC_COMMENT,T_OPEN_TAG,T_CLOSE_TAG,T_INLINE_HTML);
\r
41 foreach($tokens as $key => $val)
\r
45 // seeing if we can get line numbers out of the beast
\r
46 if (in_array($val[0],$nl_check))
\r
48 $line+=substr_count($val[1],"\n");
\r
50 echo token_name($val[0])." => ".htmlentities($val[1])."\n";
\r