コード例 #1
0
ファイル: htmlWriter.php プロジェクト: Naatan/CrossORM
 /** Build the navigation bar
  *
  * @return str
  */
 function _nav($path)
 {
     $output = '<div class="header">' . "\n";
     $output .= '<h1>' . $this->_doclet->getHeader() . "</h1>\n";
     if ($this->_sections) {
         $output .= "<ul>\n";
         foreach ($this->_sections as $section) {
             if (isset($section['selected']) && $section['selected']) {
                 $output .= '<li class="active">' . $section['title'] . "</li>\n";
             } else {
                 if (isset($section['url'])) {
                     $output .= '<li><a href="' . str_repeat('../', $this->_depth) . $section['url'] . '">' . $section['title'] . "</a></li>\n";
                 } else {
                     $output .= '<li>' . $section['title'] . '</li>';
                 }
             }
         }
         $output .= "</ul>\n";
     }
     $output .= "</div>\n\n";
     $output .= '<div class="small_links">' . "\n";
     $output .= '<a href="' . str_repeat('../', $this->_depth) . 'index.html" target="_top">Frames</a>' . "\n";
     $output .= '<a href="' . str_repeat('../', $this->_depth) . $path . '" target="_top">No frames</a>' . "\n";
     $output .= "</div>\n";
     $thisClass = strtolower(get_class($this));
     if ($thisClass == 'classwriter') {
         $output .= '<div class="small_links">' . "\n";
         $output .= 'Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>' . "\n";
         $output .= 'Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>' . "\n";
         $output .= "</div>\n";
     } elseif ($thisClass == 'functionwriter') {
         $output .= '<div class="small_links">' . "\n";
         $output .= 'Summary: <a href="#summary_function">Function</a>' . "\n";
         $output .= 'Detail: <a href="#detail_function">Function</a>' . "\n";
         $output .= "</div>\n";
     } elseif ($thisClass == 'globalwriter') {
         $output .= '<div class="small_links">' . "\n";
         $output .= 'Summary: <a href="#summary_global">Global</a>' . "\n";
         $output .= 'Detail: <a href="#detail_global">Global</a>' . "\n";
         $output .= "</div>\n";
     }
     return $output;
 }