vB_Akismet
in package
Uses
vB_Trait_NoSerialize
Class to handle interacting with the Akismet service
Table of Contents
- $_akismetApiUrl : string
- Akismet built URL
- $akismetBoard : string
- Akismet board URL
- $akismetKey : string
- Akismet key
- $akismetVersion : string
- Akismet version, used in URI
- $hostUrl : mixed
- $instance : mixed
- $options : mixed
- $verified : mixed
- __serialize() : mixed
- __sleep() : mixed
- __unserialize() : mixed
- __wakeup() : mixed
- instance() : mixed
- Enforces singleton use
- markAsHam() : string
- Identify a missed identified item as ham (false positive)
- markAsSpam() : string
- Identify a missed item as spam
- verifyText() : string
- Makes a verification call to Aksimet to check content
- _build() : bool
- Verify that the supplied Akismet key is valid and build the API URL
- _submit() : string
- Submits a request to the Akismet service (POST)
- setParams() : array<string|int, mixed>
- Set params
- __construct() : mixed
- Constructor
Properties
$_akismetApiUrl
Akismet built URL
protected
string
$_akismetApiUrl
=
ull
$akismetBoard
Akismet board URL
protected
string
$akismetBoard
= ''
$akismetKey
Akismet key
protected
string
$akismetKey
= ''
$akismetVersion
Akismet version, used in URI
protected
string
$akismetVersion
= '1.1'
$hostUrl
protected
mixed
$hostUrl
= 'rest.akismet.com'
$instance
protected
static mixed
$instance
$options
protected
mixed
$options
$verified
protected
mixed
$verified
=
ull
Methods
__serialize()
public
__serialize() : mixed
Return values
mixed —__sleep()
public
__sleep() : mixed
Return values
mixed —__unserialize()
public
__unserialize(mixed $serialized) : mixed
Parameters
- $serialized : mixed
Return values
mixed —__wakeup()
public
__wakeup() : mixed
Return values
mixed —instance()
Enforces singleton use
public
static instance() : mixed
Return values
mixed —markAsHam()
Identify a missed identified item as ham (false positive)
public
markAsHam(mixed $params) : string
Parameters
- $params : mixed
Return values
string —direct result from API call
markAsSpam()
Identify a missed item as spam
public
markAsSpam(mixed $params) : string
Parameters
- $params : mixed
Return values
string —direct result from API call
verifyText()
Makes a verification call to Aksimet to check content
public
verifyText(mixed $params) : string
Parameters
- $params : mixed
Return values
string —spam or ham
_build()
Verify that the supplied Akismet key is valid and build the API URL
protected
_build() : bool
Return values
bool —True if the building succeeded else false
_submit()
Submits a request to the Akismet service (POST)
protected
_submit(mixed $submitUrl, mixed $params) : string
Parameters
- $submitUrl : mixed
- $params : mixed
Tags
Return values
string —Data returned by Akismet
setParams()
Set params
protected
setParams(mixed $params) : array<string|int, mixed>
Parameters
- $params : mixed
Return values
array<string|int, mixed> —Params
__construct()
Constructor
private
__construct() : mixed