public static function Botcha::getRecipes in BOTCHA Spam Prevention 7.2
Same name and namespace in other branches
- 6.2 controller/botcha.controller.inc \Botcha::getRecipes()
Get a list of all BOTCHA recipes objects.
Parameters
boolean $reset:
Return value
array
1 call to Botcha::getRecipes()
- botcha_recipebook_form in ./
botcha.admin.inc - Edit existent or add a new recipe book.
File
- controller/
botcha.controller.inc, line 395 - Contains Botcha class.
Class
- Botcha
- Singleton realization of botcha application.
Code
public static function getRecipes($reset = FALSE) {
$recipes = array();
$rs = array_keys(BotchaRecipeModel::getRecipes());
foreach ($rs as $recipe_id) {
$recipe_session =& $_SESSION[self::BOTCHA_SESSION_RECIPES][$recipe_id];
if (empty($recipe_session) || $reset) {
Botcha::setRecipe(BotchaRecipe::getRecipe($recipe_id));
}
$recipes[$recipe_id] = unserialize($recipe_session);
}
return $recipes;
}