Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • Debug
  • FilterInput
  • Highlighter
  • Language
  • Loader
  • Metagen
  • Request
  • Utilities
  • Yaml
  • Overview
  • Namespace
  • Class
  • Tree

Class Highlighter

Highlighter

Namespace: Xmf
Package: Xmf
Category: Xmf\Module\Highlighter
Copyright: 2011-2013 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Richard Griffith richard@geekwright.com
Version: Release: 1.0
Since: 1.0
Link: http://xoops.org
Located at oops_lib/Xmf/Highlighter.php
Methods summary
public static string
# apply( mixed $words, string $body, string $pre = '<strong>', string $post = '</strong>' )

Apply highlight to words in body text

Apply highlight to words in body text

Surround occurances of words in body with pre in front and post behing. Considers only occurances of words outside of HTML tags.

Parameters

$words
words to highlight
$body
body of html text to highlight
$pre
string to begin a highlight
$post
string to end a highlight

Returns

string
highlighted body
API documentation generated by ApiGen