Class: Favorites_Model

Source Location: /tinymvc/myapp/models/favorites_model.php

Class Overview [line 9]

AbstractModel
   |
   --Favorites_Model

Data model for user Favorites. Handles adding, deleting, and retrieving favorites/saved lists.

Author(s):

  • Monte Ohrt

Version:

Copyright:

Variables

Constants

Methods


Inherited Variables

Inherited Constants

Inherited Methods

Class: AbstractModel

AbstractModel::__construct()
class constructor


Class Details

Data model for user Favorites. Handles adding, deleting, and retrieving favorites/saved lists.

Tags:

[ Top ]


Class Variables


Class Methods

addFood

void addFood( int $userId, string $food)

[line 101]

Adds a favorite food to the user's profile.

Parameters:

  • string $food - The name of the food to add.
  • int $userId - The userid to use.

[ Top ]

addRecipe

void addRecipe( int $userId, int $recipeId)

[line 118]

Adds a recipe to the user's profile.

Parameters:

  • int $recipeId - The recipe id to add.
  • int $userId - The userid to use.

[ Top ]

addSpecial

void addSpecial( int $userId, int $specialId)

[line 135]

Adds a special to the user's profile.

Parameters:

  • int $specialId - The special id to add.
  • int $userId - The userid to use.

[ Top ]

getSavedFoods

array getSavedFoods( int $userId)

[line 17]

Retrieves a list of the user's favorite foods.

Parameters:

  • int $userId - The userid to use.

[ Top ]

getSavedRecipeIds

array getSavedRecipeIds( int $userId)

[line 29]

Retrieves a list of the user's saved recipes (ids only).

Parameters:

  • int $userId - The userid to use.

[ Top ]

getSavedRecipes

array getSavedRecipes( int $userId, &$recipeModel, Recipe_Model $recipeModel)

[line 47]

Retrieves a list of the user's saved recipes (including associative data).

Parameters:

  • Recipe_Model $recipeModel - The recipe model.
  • int $userId - The userid to use.
  • &$recipeModel -

[ Top ]

getSavedSpecialIds

array getSavedSpecialIds( int $userId)

[line 65]

Retrieves a list of the user's saved specials (ids only).

Parameters:

  • int $userId - The userid to use.

[ Top ]

getSavedSpecials

array getSavedSpecials( int $userId, &$specialModel, Special_Model $specialModel)

[line 82]

Retrieves a list of the user's saved specials (including associative data).

Parameters:

  • Special_Model $specialModel - The Special Model.
  • int $userId - The userid to use.
  • &$specialModel -

[ Top ]

removeFood

void removeFood( int $userId, string $food)

[line 152]

Removes a food from the user's profile.

Parameters:

  • string $food - The name of the food to remove.
  • int $userId - The userid to use.

[ Top ]

removeRecipe

void removeRecipe( int $userId, int $recipeId)

[line 166]

Removes a recipe from the user's profile.

Parameters:

  • int $recipeId - The recipe id to remove.
  • int $userId - The userid to use.

[ Top ]

removeSpecial

void removeSpecial( int $userId, int $specialId)

[line 180]

Removes a special from the user's profile.

Parameters:

  • int $specialId - The special id to remove.
  • int $userId - The userid to use.

[ Top ]


Class Constants


Documentation generated on Tue, 26 May 2009 14:50:33 -0700 by phpDocumentor 1.4.1