You are here

class BotchaRecipebookNone in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.2 controller/botcha_recipebook.controller.inc \BotchaRecipebookNone
  2. 6.3 controller/recipebook/botcha.recipebook.controller.inc \BotchaRecipebookNone
  3. 7.2 controller/botcha_recipebook.controller.inc \BotchaRecipebookNone

Dummy class, created for data consistency and for interface unifying. When there is no recipe book binded to form, this class is used as a handler. It has no logic at all - by design.

Hierarchy

Expanded class hierarchy of BotchaRecipebookNone

File

controller/recipebook/botcha.recipebook.controller.inc, line 336
Controller layer of the BotchaRecipebook objects.

View source
class BotchaRecipebookNone extends BotchaRecipebook {

  // @todo Refactor this since it is duplication.
  public function __construct($id = NULL) {
    $this->id = !empty($id) ? $id : 'none';
    $this
      ->setTitle('None');
    $this
      ->setDescription('Help class: "Null object" pattern.');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BotchaRecipebook::$description public property Description of the recipe book.
BotchaRecipebook::$forms protected property
BotchaRecipebook::$id public property Identifier of the recipe book.
BotchaRecipebook::$recipes protected property
BotchaRecipebook::$title public property A title of the book.
BotchaRecipebook::apply public function
BotchaRecipebook::getDescription public function
BotchaRecipebook::getForms public function @todo BotchaRecipebook getForms Description.
BotchaRecipebook::getRecipes public function @todo BotchaRecipebook getRecipes Description.
BotchaRecipebook::getTitle public function
BotchaRecipebook::handle public function Handle form depending on the result of spam check.
BotchaRecipebook::isApplicable public function
BotchaRecipebook::isSpam public function Spam check. Currently the logic is as follows: if we could find a recipe that failed spam check - then we consider this form submission as spam and decline it.
BotchaRecipebook::setDescription public function
BotchaRecipebook::setForm public function
BotchaRecipebook::setRecipe public function
BotchaRecipebook::setTitle public function
BotchaRecipebook::unsetForm public function
BotchaRecipebook::unsetRecipe public function
BotchaRecipebookNone::__construct public function Overrides BotchaRecipebook::__construct