Ejemplo n.º 1
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);
     }
 }
Ejemplo n.º 2
0
 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);
     }
 }