Welcompose
[ class tree: Welcompose ] [ index: Welcompose ] [ all elements ]

Class: Community_AntiSpamPlugin

Source Location: /community_classes/antispamplugin.class.php

Class Overview




Variables

Methods



Class Details

[line 38]


[ Top ]


Class Variables

static $instance =  null

[line 45]

Singleton



Tags:

access:  public

Type:   object


[ Top ]

$base =  null

[line 52]

Reference to base class



Tags:

access:  public

Type:   object


[ Top ]



Class Methods


constructor __construct [line 59]

Community_AntiSpamPlugin __construct( )

Start instance of base class, load configuration and establish database connection. Please don't call the constructor direcly, use the singleton pattern instead.



Tags:

access:  public


[ Top ]

method addAntiSpamPlugin [line 85]

int addAntiSpamPlugin( array $sqlData)

Adds anti spam plugin to the anti spam plugin table. Takes a field=>value array with anti spam plugin data as first argument. Returns insert id.



Tags:

return:  Insert id
throws:  Community_AntiSpamPluginException
access:  public


Parameters:

array   $sqlData   Row data

[ Top ]

method antiSpamPluginBelongsToCurrentProject [line 465]

int antiSpamPluginBelongsToCurrentProject( int $anti_spam_plugin)

Tests whether given anti spam plugin belongs to current project. Takes the anti spam plugin id as first argument. Returns bool.



Tags:

return:  bool
throws:  Community_AntiSpamPluginException
access:  public


Parameters:

int   $anti_spam_plugin   Blog commen status id

[ Top ]

method antiSpamPluginBelongsToCurrentUser [line 511]

bool antiSpamPluginBelongsToCurrentUser( int $anti_spam_plugin)

Test whether anti spam plugin belongs to current user or not. Takes the anti spam plugin id as first argument. Returns bool.



Tags:

throws:  Community_Blogcommenstatus
access:  public


Parameters:

int   $anti_spam_plugin   Anti spam plugin id

[ Top ]

method countAntiSpamPlugins [line 353]

array countAntiSpamPlugins( [array $params = array()])

Method to count the existing anti spam plugins. Takes key=>value array with count params as first argument. Returns array.

List of supported params:

No params supported.




Tags:

throws:  Community_AntiSpamPluginException
access:  public


Parameters:

array   $params   Count params

[ Top ]

method deleteAntiSpamPlugin [line 162]

int deleteAntiSpamPlugin( int $id)

Removes anti spam plugin from the anti spam plugins table. Takes the anti spam plugin id as first argument. Returns amount of affected rows.



Tags:

return:  Amount of affected rows
throws:  Community_AntiSpamPluginException
access:  public


Parameters:

int   $id   Anti spam plugin id

[ Top ]

method selectAntiSpamPlugin [line 200]

array selectAntiSpamPlugin( int $id)

Selects one anti spam plugin. Takes the anti spam plugin id as first argument. Returns array with anti spam plugin information.



Tags:

throws:  Community_AntiSpamPluginException
access:  public


Parameters:

int   $id   Anti spam plugin id

[ Top ]

method selectAntiSpamPlugins [line 261]

array selectAntiSpamPlugins( [array $params = array()])

Method to select one or more anti spam plugins. Takes key=>value array with select params as first argument. Returns array.

List of supported params:

  • order_macro, string, optional: Sorting instructions
  • start, int, optional: row offset
  • limit, int, optional: amount of rows to return




Tags:

throws:  Community_AntiSpamPluginException
access:  public


Parameters:

array   $params   Select params

[ Top ]

method testForUniqueName [line 407]

bool testForUniqueName( string $name, [int $id = null])

Tests given anti spam plugin name for uniqueness. Takes the anti spam plugin name as first argument and an optional anti spam plugin id as second argument.

If the anti spam plugin id is given, this anti spam plugin won't be considered when checking for uniqueness (useful for updates). Returns boolean true if anti spam plugin name is unique.




Tags:

throws:  Community_AntiSpamPluginException
access:  public


Parameters:

string   $name   Anti spam plugin name
int   $id   Anti spam plugin id

[ Top ]

method updateAntiSpamPlugin [line 119]

int updateAntiSpamPlugin( int $id, array $sqlData)

Updates anti spam plugin. Takes the anti spam plugin id as first argument, a field=>value array with the new anti spam plugin data as second argument.

Returns amount of affected rows.




Tags:

return:  Affected rows
throws:  Community_AntiSpamPluginException
access:  public


Parameters:

int   $id   Anti spam plugin id
array   $sqlData   Row data

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:51:40 +0100 by phpDocumentor 1.4.3