Class Metagen
Metagen facilitates generating and assigning page meta tags
Package: Xmf
Category: Xmf\Metagen
Copyright: 2011-2016 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
Link: http://xoops.org
Located at lass/libraries/vendor/xoops/xmf/src/Xmf/Metagen.php
public static
|
|
public static
|
|
public static
|
|
protected static
|
|
protected 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 |
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. |
protected static
integer[]
|
#
getNeedlePositions( string $haystack, mixed $needles )
getNeedlePositions - Essentially this is a strpos() for an array of needles. Given a haystack and an array of needles, return an array of all initial positions, if any, of those needles in that haystack. |
protected static
string
|
|
protected static
string
|
|
public 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. |
protected static
|
string |
ENCODING
mbstring encoding |
#
'UTF-8'
|
string |
ELLIPSIS
horizontal ellipsis This will be used to replace omitted text. |
#
"..."
|