nyroFwk  0.2
Public Member Functions | Protected Member Functions | Protected Attributes
helper_akismet Class Reference
Inheritance diagram for helper_akismet:
object

Public Member Functions

 isSpam (array $vars=array())
 
 submitSpam (array $vars=array())
 
 submitHam (array $vars=array())
 
 setCommentVar ($key, $val)
 
 setAuthor ($author)
 
 setAuthorEmail ($email)
 
 setAuthorUrl ($url)
 
 setContent ($content)
 
 verifyKey ()
 
 getAttr ($name)
 
 setAttr ($name, $value)
 
 getCfg ()
 

Protected Member Functions

 sendRequest ($host, $path, $request)
 
 getQueryString ()
 
 beforeInit ()
 
 afterInit ()
 

Protected Attributes

 $cfg
 

Detailed Description

Akismet API call

Author
Nyro

Definition at line 12 of file akismet.class.php.

Member Function Documentation

◆ afterInit()

afterInit ( )
protectedinherited

Call just after the configuration initialisation

Definition at line 40 of file object.class.php.

◆ beforeInit()

beforeInit ( )
protectedinherited

Call just before the configuration initialisation

Definition at line 35 of file object.class.php.

◆ getAttr()

getAttr (   $name)
inherited

Get an attribute

Parameters
string$nameAttribute name
Returns
mixed|null The attribute or null if not set

Definition at line 48 of file object.class.php.

◆ getCfg()

getCfg ( )
inherited

Get the configuration object

Returns
config

Definition at line 67 of file object.class.php.

◆ getQueryString()

getQueryString ( )
protected

Create the query string regarding the current configuration

Returns
string

Definition at line 158 of file akismet.class.php.

◆ isSpam()

isSpam ( array  $vars = array())

Check if the current configured comment is Spam

Parameters
array$varsArray for setting comment variables using the setCommentVar function
Returns
bool True if it's spam, false if it's OK

Definition at line 20 of file akismet.class.php.

◆ sendRequest()

sendRequest (   $host,
  $path,
  $request 
)
protected

Send the request against the submitted parameters

Parameters
string$host
string$path
string$request
Returns
array

Definition at line 133 of file akismet.class.php.

◆ setAttr()

setAttr (   $name,
  $value 
)
inherited

Set an attribute

Parameters
string$nameAttribute name
mixed$valueAttribute value

Definition at line 58 of file object.class.php.

◆ setAuthor()

setAuthor (   $author)

Set the comment author

Parameters
strong$author

Definition at line 81 of file akismet.class.php.

◆ setAuthorEmail()

setAuthorEmail (   $email)

Set the author email

Parameters
string$email

Definition at line 90 of file akismet.class.php.

◆ setAuthorUrl()

setAuthorUrl (   $url)

Set the author url

Parameters
string$url

Definition at line 99 of file akismet.class.php.

◆ setCommentVar()

setCommentVar (   $key,
  $val 
)

Set a comment var to be send. See http://akismet.com/development/api/ for available keys

Parameters
string$key
string$val

Definition at line 72 of file akismet.class.php.

◆ setContent()

setContent (   $content)

Set the comment content

Parameters
string$content

Definition at line 108 of file akismet.class.php.

◆ submitHam()

submitHam ( array  $vars = array())

Submit a comment as ham

Parameters
array$varsArray for setting comment variables using the setCommentVar function

Definition at line 55 of file akismet.class.php.

◆ submitSpam()

submitSpam ( array  $vars = array())

Submit a comment as spam

Parameters
array$varsArray for setting comment variables using the setCommentVar function

Definition at line 40 of file akismet.class.php.

◆ verifyKey()

verifyKey ( )

Verify the key validity

Returns
bool True if valid

Definition at line 117 of file akismet.class.php.

Field Documentation

◆ $cfg

$cfg
protectedinherited

Definition at line 17 of file object.class.php.


The documentation for this class was generated from the following file:
Generated on Sun Oct 15 2017 22:25:20 for nyroFwk by doxygen 1.8.13