EasyBlogString
in package
Table of Contents
Properties
- $config : mixed
Methods
- __construct() : mixed
- abs2rel() : mixed
- convert absolute url to relative url
- addNoFollow() : string
- This would inject a rel=nofollow attribute into anchor links.
- cleanHtml() : mixed
- countWord() : mixed
- Method to count the words in a string
- darken() : mixed
- Darken a given color
- encodeURL() : mixed
- endsWith() : mixed
- Method to determine if the string ends with the certain words
- escape() : mixed
- Escapes a string
- filterHtml() : mixed
- Given a set of content, filter the content by normalizing the content
- fixUnclosedTags() : mixed
- Method to fix unclosed html tag and quotes
- fixUTF8() : mixed
- forceLatin1() : mixed
- forceUTF8() : mixed
- getBlockedWords() : array<string|int, mixed>
- Returns an array of blocked words.
- getImage() : mixed
- Captures the first <img> tag in a given content
- getLangCode() : mixed
- Retrieves the language code
- getNoun() : mixed
- hasBlockedWords() : bool
- Determines if the text provided contains any blocked words
- hexToRGB() : mixed
- Converts color code into RGB values
- htmlAnchorLink() : mixed
- Ensure that the link contains a valid http link
- isChineseString() : mixed
- Method to check if string is chinese characters
- isHyperlink() : mixed
- Determines if the given string is a valid url
- isJapaneseString() : mixed
- Method to check if string is japanese characters
- isKoreanString() : mixed
- Method to check if string is korean characters
- isValidDomain() : mixed
- Determines if the domain is valid
- isValidEmail() : mixed
- Determines if the domain is valid
- linkTweets() : mixed
- normalizeUrl() : mixed
- Normalizes an URL and ensure that it contains the protocol
- patchContent() : mixed
- Method to patch the contents from previous upgrades
- processAMP() : mixed
- Process image to be used in AMP Article
- rel2abs() : mixed
- relAddSlashes() : mixed
- Method to add initial slashes on relative url
- removeEmoji() : mixed
- Method to remove known emoji
- removeFirstImage() : mixed
- Removes the first <img> tag in a given content
- replaceColumnBlockHTMLCode() : mixed
- Replace the old to new columns block HTML DOM from previous upgrades
- searchImage() : mixed
- Search for an image tag in a given content
- stripKnownTags() : mixed
- Strip off known extension tags
- tidyHTMLContent() : mixed
- trimEmptySpace() : mixed
- Trim any linefeed and non-breaking space.
- truncateWithHtml() : mixed
- Method to truncate the string while maintaining the HTML integrity of the string
- unhtmlentities() : mixed
- A pior php 4.3.0 version of html_entity_decode
- url2link() : mixed
Properties
$config
public
mixed
$config
= \null
Methods
__construct()
public
__construct() : mixed
abs2rel()
convert absolute url to relative url
public
abs2rel(mixed $url[, mixed $includeBase = false ]) : mixed
Parameters
- $url : mixed
- $includeBase : mixed = false
Tags
addNoFollow()
This would inject a rel=nofollow attribute into anchor links.
public
static addNoFollow(string $content) : string
Parameters
- $content : string
-
The content subject.
Tags
Return values
string —The content which is fixed.
cleanHtml()
public
cleanHtml([mixed $content = '' ]) : mixed
Parameters
- $content : mixed = ''
countWord()
Method to count the words in a string
public
countWord(mixed $string[, mixed $recalculate = false ]) : mixed
Parameters
- $string : mixed
- $recalculate : mixed = false
Tags
darken()
Darken a given color
public
darken(mixed $rgb[, mixed $darker = 2 ]) : mixed
Parameters
- $rgb : mixed
- $darker : mixed = 2
Tags
encodeURL()
public
static encodeURL(mixed $url) : mixed
Parameters
- $url : mixed
endsWith()
Method to determine if the string ends with the certain words
public
endsWith(mixed $words, mixed $string) : mixed
Parameters
- $words : mixed
- $string : mixed
Tags
escape()
Escapes a string
public
static escape(mixed $string) : mixed
Parameters
- $string : mixed
Tags
filterHtml()
Given a set of content, filter the content by normalizing the content
public
filterHtml([mixed $content = '' ]) : mixed
Parameters
- $content : mixed = ''
Tags
fixUnclosedTags()
Method to fix unclosed html tag and quotes
public
fixUnclosedTags(mixed $content) : mixed
Parameters
- $content : mixed
Tags
fixUTF8()
public
static fixUTF8(mixed $text) : mixed
Parameters
- $text : mixed
forceLatin1()
public
static forceLatin1(mixed $text) : mixed
Parameters
- $text : mixed
forceUTF8()
public
static forceUTF8(mixed $text) : mixed
Parameters
- $text : mixed
Tags
getBlockedWords()
Returns an array of blocked words.
public
getBlockedWords() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getImage()
Captures the first <img> tag in a given content
public
getImage(mixed $contents) : mixed
Parameters
- $contents : mixed
Tags
getLangCode()
Retrieves the language code
public
getLangCode() : mixed
Tags
getNoun()
public
getNoun(mixed $var, mixed $count[, mixed $includeCount = false ]) : mixed
Parameters
- $var : mixed
- $count : mixed
- $includeCount : mixed = false
hasBlockedWords()
Determines if the text provided contains any blocked words
public
hasBlockedWords(string $text) : bool
Parameters
- $text : string
-
The text to lookup for
Tags
Return values
bool —True if contains blocked words, false otherwise.
hexToRGB()
Converts color code into RGB values
public
hexToRGB(mixed $hex) : mixed
Parameters
- $hex : mixed
Tags
htmlAnchorLink()
Ensure that the link contains a valid http link
public
static htmlAnchorLink(mixed $url, mixed $string) : mixed
Parameters
- $url : mixed
- $string : mixed
Tags
isChineseString()
Method to check if string is chinese characters
public
isChineseString(mixed $str) : mixed
Parameters
- $str : mixed
Tags
isHyperlink()
Determines if the given string is a valid url
public
isHyperlink(mixed $string) : mixed
Parameters
- $string : mixed
Tags
isJapaneseString()
Method to check if string is japanese characters
public
isJapaneseString(mixed $str) : mixed
Parameters
- $str : mixed
Tags
isKoreanString()
Method to check if string is korean characters
public
isKoreanString(mixed $str) : mixed
Parameters
- $str : mixed
Tags
isValidDomain()
Determines if the domain is valid
public
isValidDomain(mixed $url) : mixed
Parameters
- $url : mixed
Tags
isValidEmail()
Determines if the domain is valid
public
isValidEmail(mixed $data[, mixed $strict = false ]) : mixed
Parameters
- $data : mixed
- $strict : mixed = false
Tags
linkTweets()
public
static linkTweets(mixed $source) : mixed
Parameters
- $source : mixed
normalizeUrl()
Normalizes an URL and ensure that it contains the protocol
public
normalizeUrl(mixed $url) : mixed
Parameters
- $url : mixed
Tags
patchContent()
Method to patch the contents from previous upgrades
public
patchContent(mixed $text) : mixed
Parameters
- $text : mixed
Tags
processAMP()
Process image to be used in AMP Article
public
processAMP(mixed $content) : mixed
Parameters
- $content : mixed
Tags
rel2abs()
public
static rel2abs(mixed $rel, mixed $base) : mixed
Parameters
- $rel : mixed
- $base : mixed
relAddSlashes()
Method to add initial slashes on relative url
public
relAddSlashes(mixed $string) : mixed
Parameters
- $string : mixed
Tags
removeEmoji()
Method to remove known emoji
public
removeEmoji(mixed $string) : mixed
Parameters
- $string : mixed
Tags
removeFirstImage()
Removes the first <img> tag in a given content
public
removeFirstImage(mixed $contents) : mixed
Parameters
- $contents : mixed
Tags
replaceColumnBlockHTMLCode()
Replace the old to new columns block HTML DOM from previous upgrades
public
replaceColumnBlockHTMLCode(mixed $text) : mixed
Parameters
- $text : mixed
Tags
searchImage()
Search for an image tag in a given content
public
searchImage(mixed $content[, mixed $limit = 1 ]) : mixed
Parameters
- $content : mixed
- $limit : mixed = 1
Tags
stripKnownTags()
Strip off known extension tags
public
stripKnownTags(mixed $text) : mixed
Parameters
- $text : mixed
Tags
tidyHTMLContent()
public
static tidyHTMLContent(mixed $content) : mixed
Parameters
- $content : mixed
trimEmptySpace()
Trim any linefeed and non-breaking space.
public
trimEmptySpace(mixed $text) : mixed
Parameters
- $text : mixed
Tags
truncateWithHtml()
Method to truncate the string while maintaining the HTML integrity of the string
public
truncateWithHtml(mixed $text[, mixed $max = 250 ][, mixed $ending = '' ][, mixed $exact = false ]) : mixed
Parameters
- $text : mixed
- $max : mixed = 250
- $ending : mixed = ''
- $exact : mixed = false
Tags
unhtmlentities()
A pior php 4.3.0 version of html_entity_decode
public
static unhtmlentities(mixed $string) : mixed
Parameters
- $string : mixed
url2link()
public
static url2link(mixed $string) : mixed
Parameters
- $string : mixed