PHP Class SpamModel, vanilla

Inheritance: extends Gdn_Pluggable
Afficher le fichier Open project: vanilla/vanilla Class Usage Examples

Méthodes publiques

Свойство Type Description
$Disabled boolean

Protected Properties

Свойство Type Description
$_Instance SpamModel

Méthodes publiques

Méthode Description
disabled ( boolean | null $value = null ) : boolean Return whether or not the spam model is disabled.
isSpam ( string $RecordType, array $Data, array $Options = [] ) Check whether or not the record is spam.

Méthodes protégées

Méthode Description
_Instance ( ) : SpamModel
flagForReview ( string $recordType, integer $id, object | array $data ) Insert a SPAM Queue entry for the specified record and delete the record, if possible.

Method Details

_Instance() protected static méthode

protected static _Instance ( ) : SpamModel
Résultat SpamModel

disabled() public static méthode

Return whether or not the spam model is disabled.
public static disabled ( boolean | null $value = null ) : boolean
$value boolean | null
Résultat boolean

flagForReview() protected static méthode

Insert a SPAM Queue entry for the specified record and delete the record, if possible.
protected static flagForReview ( string $recordType, integer $id, object | array $data )
$recordType string The type of record we're flagging: Discussion or Comment.
$id integer ID of the record we're flagging.
$data object | array Properties used for updating/overriding the record's current values.

isSpam() public static méthode

Check whether or not the record is spam.
public static isSpam ( string $RecordType, array $Data, array $Options = [] )
$RecordType string By default, this should be one of the following: - Comment: A comment. - Discussion: A discussion. - User: A user registration.
$Data array The record data.
$Options array Options for fine-tuning this method call. - Log: Log the record if it is found to be spam.

Property Details

$Disabled public_oe static_oe property

public static bool $Disabled
Résultat boolean

$_Instance protected_oe static_oe property

protected static SpamModel $_Instance
Résultat SpamModel