Example #1
0
/**
 * Create the phpdoc.hhp, contents.hhc files needed by MS HTML Help Compiler
 * to create a CHM file
 *
 * The output function generates the table of contents (contents.hhc)
 * and file list (phpdoc.hhp) files used to create a .CHM by the
 * free MS HTML Help compiler.
 * {@internal
 * Using {@link $hhp_files}, a list of all separate .html files
 * is created in CHM format, and written to phpdoc.hhp.  This list was
 * generated by {@link writefile}.
 *
 * Next, a call to the table of contents:
 * finishes things off}}
 * @link http://www.microsoft.com/downloads/release.asp?releaseid=33071
 * @uses generateTOC() assigns to the toc template variable
 */
function bug698356_Output()
{
    $templ =& $this->newSmarty();
    $file = $this->base_dir . PATH_DELIMITER;
    $file = str_replace('\\', PATH_DELIMITER, $file);
    $file = str_replace('//', PATH_DELIMITER, $file);
    $file = str_replace(PATH_DELIMITER, '\\', $file);
    $templ->assign('files', $this->hhp_files);
    $this->setTargetDir($this->base_dir);
    Converter::writefile('phpdoc.hhp', $templ->fetch('hhp.tpl'));
    $templ =& $this->newSmarty();
    $templ->assign('toc', $this->generateTOC());
    Converter::writefile('contents.hhc', $templ->fetch('contents.hhc.tpl'));
    phpDocumentor_out("NOTE: to create the documentation.chm file, you must now run Microsoft Help Workshop on phpdoc.hhp\n");
    phpDocumentor_out("To get the free Microsoft Help Workshop, browse to: http://www.microsoft.com/downloads/release.asp?releaseid=33071\n");
    flush();
}
 function addMessage($message)
 {
     return parent::addMessage($message);
     phpDocumentor_out($message . "\n");
     flush();
 }
Example #3
0
 /**
  * Figures out what output converter to use
  * @param string Output Converter Template name
  * @access private
  * @global array
  * @uses cleanConverterNamePieces
  * @uses phpDocumentor_out
  */
 function setupConverters($output = false)
 {
     global $_phpDocumentor_setting;
     if ($output) {
         $_phpDocumentor_setting['output'] = $output;
     }
     if (isset($_phpDocumentor_setting['output']) && !empty($_phpDocumentor_setting['output'])) {
         $c = explode(',', $_phpDocumentor_setting['output']);
         for ($i = 0; $i < count($c); $i++) {
             $c[$i] = explode(':', $c[$i]);
             $a = $c[$i][0];
             if (isset($c[$i][0])) {
                 $a = $this->cleanConverterNamePiece($c[$i][0]);
             } else {
                 $a = false;
             }
             if (isset($c[$i][1])) {
                 /*
                  * must allow "/" due to options like "DocBook/peardoc2"
                  */
                 $b = $this->cleanConverterNamePiece($c[$i][1], '\\/');
             } else {
                 $b = false;
             }
             if (isset($c[$i][2])) {
                 /*
                  * must allow "." due to options like "phpdoc.de"
                  * must allow "/" due to options like "DOM/default"
                  */
                 $d = $this->cleanConverterNamePiece($c[$i][2], '.\\/');
                 if (substr($d, -1) != "/") {
                     $d .= "/";
                 } else {
                     $d = 'default/';
                 }
             }
             if (strtoupper(trim($a)) == 'HTML' && trim($b) == 'default') {
                 phpDocumentor_out("WARNING: HTMLdefaultConverter is deprecated, using HTMLframesConverter.\n");
                 phpDocumentor_out("WARNING: template output is identical, HTMLframes is more flexible.\n");
                 phpDocumentor_out("WARNING: please adjust your usage\n");
                 flush();
                 $b = 'frames';
                 // change default to frames.
             }
             $this->render->addConverter(strtoupper(trim($a)), trim($b), trim($d));
         }
     } else {
         $this->render->addConverter('HTML', 'frames', 'default/');
     }
     if (empty($this->render->converters)) {
         addErrorDie(PDERROR_NO_CONVERTERS);
     }
 }
 function setupConverters($output = false)
 {
     global $_phpDocumentor_setting;
     if ($output) {
         $_phpDocumentor_setting['output'] = $output;
     }
     if (isset($_phpDocumentor_setting['output']) && !empty($_phpDocumentor_setting['output'])) {
         $c = explode(',', $_phpDocumentor_setting['output']);
         for ($i = 0; $i < count($c); $i++) {
             $c[$i] = explode(':', $c[$i]);
             $a = $c[$i][0];
             $b = false;
             $d = 'default/';
             if (count($c[$i]) > 1) {
                 $a = $c[$i][0];
                 $b = $c[$i][1];
                 if (isset($c[$i][2])) {
                     $d = $c[$i][2];
                     $d = str_replace("\\", "/", $d);
                     if (substr($d, -1) != "/") {
                         $d .= "/";
                     }
                 } else {
                     $d = 'default/';
                 }
             }
             if (strtoupper(trim($a)) == 'HTML' && trim($b) == 'default') {
                 phpDocumentor_out("WARNING: HTMLdefaultConverter is deprecated, using HTMLframesConverter.\n");
                 phpDocumentor_out("WARNING: template output is identical, HTMLframes is more flexible.\n");
                 phpDocumentor_out("WARNING: please adjust your usage\n");
                 flush();
                 $b = 'frames';
                 // change default to frames.
             }
             $this->render->addConverter(strtoupper(trim($a)), trim($b), trim($d));
         }
     } else {
         $this->render->addConverter('HTML', 'frames', 'default/');
     }
     if (empty($this->render->converters)) {
         addErrorDie(PDERROR_NO_CONVERTERS);
     }
 }