Class Metagen
Metagen facilitates generating and assigning page meta tags
Package: Xmf
Category: Xmf\Module\Metagen
Copyright: 2011-2014 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
Author: trabis lusopoemas@gmail.com
Version: Release: 1.0
Since: 1.0
Link: http://xoops.org
Located at oops_lib/Xmf/Metagen.php
public static
|
|
public static
|
|
public static
|
|
public static
array
|
#
generateKeywords( string $body, integer $count = 20, integer $minLength = 4, string[]|null $forceKeys = null )
generateKeywords builds a set of keywords from text body |
protected static
boolean
|
#
checkStopWords( string $key )
checkStopWords - look up a word in a list of stop words and classify it as a significant word or a stop word. |
public static
string
|
#
generateDescription( string $body, integer $wordCount = 100 )
generateDescription - generate a short description from a body of text |
public static
|
#
generateMetaTags( string $title, string $body, integer $count = 20, integer $minLength = 4, integer $wordCount = 100, string[]|null $forceKeys = null )
generateMetaTags - generate and assign all meta tags |
protected static
boolean
|
|
public static
string
|
#
generateSeoTitle( string $title = '', string $extension = '' )
Create a title for the short_url field of an article |
public static
string
|
#
getSearchSummary( string $haystack, mixed $needles = null, integer $length = 120 )
getSearchSummary splits a string into string no larger than a specified length, and centered around the first occurrence of any of an array of needles, or starting at the beginning of the string if no needles are specified or found. |
protected static
string
|
#
asPlainText( string $rawText )
asPlainText - clean string to be plain text, without control characters such as newlines, html markup, or leading trailing or repeating spaces. |
string |
ELLIPSIS
Unicode horizontal ellipsis U+2026 This will be used to replace omitted text. |
#
"…"
|