*/ class PhpGtkDoc_Search2_Result_Html { /** * The result types are replaced with * this titles in the output * * @var array */ protected static $arTypeTitles = array( 'class' => 'Classes', 'method' => 'Methods', 'property' => 'Properties', 'field' => 'Fields', 'signal' => 'Signals', 'enum' => 'Enums', 'constructor' => 'Constructors', 'tutorial' => 'Tutorials', 'unknown' => 'Unknown type' ); /** * The levels have this titles * * @var array */ protected static $arLevelTitles = array( 1 => 'Very relevant', 2 => 'Relevant', 3 => 'Not so relevant' ); /** * Formats the result as html and returns it. * * @param array $arResult The result you get from PhpGtkDoc_Search2::find() * @param string $strPrefix The prefix to put before the file names * @param string $strFilter The type filter (pass e.g. "method" to find methods only) * * @return string Nicely formatted ascii output */ public static function format($arResult, $strPrefix = '', $strFilter = '') { $strOutput = ''; foreach ($arResult as $nLevel => $arLevel) { $strLevelOutput = ''; foreach ($arLevel as $strType => $arFiles) { if ($strFilter != '' && $strType != $strFilter) { continue; } $strLevelOutput .= '

' . self::$arTypeTitles[$strType] . "

\r\n"; $strLevelOutput .= ''; } if ($strLevelOutput != '') { $strOutput .= '

' . self::$arLevelTitles[$nLevel] . "

\r\n" . $strLevelOutput; } } return $strOutput; }//public static function format($arResult, $strPrefix = '', $strFilter = '') }//class PhpGtkDoc_Search2_Result_Html ?>