當前位置: 首頁>>代碼示例>>PHP>>正文


PHP QM_Output_Html類代碼示例

本文整理匯總了PHP中QM_Output_Html的典型用法代碼示例。如果您正苦於以下問題:PHP QM_Output_Html類的具體用法?PHP QM_Output_Html怎麽用?PHP QM_Output_Html使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了QM_Output_Html類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct(QM_Collector $collector)
 {
     parent::__construct($collector);
     add_filter('qm/output/menus', array($this, 'admin_menu'), 20);
     add_filter('qm/output/title', array($this, 'admin_title'), 20);
     add_filter('qm/output/menu_class', array($this, 'admin_class'));
 }
開發者ID:pfkellogg,項目名稱:hooks_good_one,代碼行數:7,代碼來源:db_queries.php

示例2: __construct

 public function __construct(QM_Collector $collector)
 {
     parent::__construct($collector);
     add_filter('qm/output/title', array($this, 'admin_title'), 10);
 }
開發者ID:L0k1slnk,項目名稱:weddly,代碼行數:5,代碼來源:overview.php

示例3: __construct

 public function __construct(QM_Collector $collector)
 {
     parent::__construct($collector);
     add_filter('qm/output/menus', array($this, 'admin_menu'), 55);
 }
開發者ID:johnbillion,項目名稱:query-monitor,代碼行數:5,代碼來源:rewrites.php

示例4: output_filename

 public static function output_filename($text, $file, $line = 1)
 {
     # Further reading:
     # http://simonwheatley.co.uk/2012/07/clickable-stack-traces/
     # https://github.com/grych/subl-handler
     if (!isset(self::$file_link_format)) {
         $format = ini_get('xdebug.file_link_format');
         $format = apply_filters('qm/output/file_link_format', $format);
         if (empty($format)) {
             self::$file_link_format = false;
         } else {
             self::$file_link_format = str_replace(array('%f', '%l'), array('%1$s', '%2$d'), $format);
         }
     }
     if (false === self::$file_link_format) {
         return $text;
     }
     $link = sprintf(self::$file_link_format, urlencode($file), $line);
     return sprintf('<a href="%s">%s</a>', $link, $text);
 }
開發者ID:pfkellogg,項目名稱:hooks_good_one,代碼行數:20,代碼來源:Html.php

示例5: output_filename

 /**
  * Returns a file path, name, and line number. Safe for output.
  *
  * If clickable file links are enabled, a link such as this is returned:
  *
  *     <a href="subl://open/?line={line}&url={file}">{text}</a>
  *
  * Otherwise, the display text and file details such as this is returned:
  *
  *     {text}<br>{file}:{line}
  *
  * @param  string $text The display text, such as a function name or file name.
  * @param  string $file The full file path and name.
  * @param  int    $line Optional. A line number, if appropriate.
  * @return string The fully formatted file link or file name, safe for output.
  */
 public static function output_filename($text, $file, $line = 0)
 {
     if (empty($file)) {
         return esc_html($text);
     }
     # Further reading:
     # http://simonwheatley.co.uk/2012/07/clickable-stack-traces/
     # https://github.com/grych/subl-handler
     $link_line = $line ? $line : 1;
     if (!isset(self::$file_link_format)) {
         $format = ini_get('xdebug.file_link_format');
         $format = apply_filters('qm/output/file_link_format', $format);
         if (empty($format)) {
             self::$file_link_format = false;
         } else {
             self::$file_link_format = str_replace(array('%f', '%l'), array('%1$s', '%2$d'), $format);
         }
     }
     if (false === self::$file_link_format) {
         $fallback = QM_Util::standard_dir($file, '');
         if ($line) {
             $fallback .= ':' . $line;
         }
         $return = esc_html($text);
         if ($fallback !== $text) {
             $return .= '<br><span class="qm-info">&nbsp;' . esc_html($fallback) . '</span>';
         }
         return $return;
     }
     $link = sprintf(self::$file_link_format, urlencode($file), intval($link_line));
     return sprintf('<a href="%s">%s</a>', esc_attr($link), esc_html($text));
 }
開發者ID:darbymanning,項目名稱:Family-Church,代碼行數:48,代碼來源:Html.php


注:本文中的QM_Output_Html類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。