rename getRecipeByID() to getByID()
This commit is contained in:
parent
7fca2e6d78
commit
300f11bb06
@ -126,7 +126,7 @@ final class RecipeController
|
|||||||
if (count($A_urlParams) !== 1 ) throw new HTTPSpecialCaseException(404);
|
if (count($A_urlParams) !== 1 ) throw new HTTPSpecialCaseException(404);
|
||||||
|
|
||||||
|
|
||||||
$O_recipe = RecipeModel::getRecipeByID($A_urlParams[0]);
|
$O_recipe = RecipeModel::getByID($A_urlParams[0]);
|
||||||
|
|
||||||
header("Content-Type: image");
|
header("Content-Type: image");
|
||||||
if (isset($O_recipe)) {
|
if (isset($O_recipe)) {
|
||||||
|
|||||||
@ -73,7 +73,7 @@ final class RecipeModel
|
|||||||
return $O_recipe;
|
return $O_recipe;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getRecipeByID($I_id)
|
public static function getByID($I_id)
|
||||||
{
|
{
|
||||||
$O_model = Model::get();
|
$O_model = Model::get();
|
||||||
$stmt = $O_model->prepare("SELECT * FROM RECIPE WHERE ID=:id");
|
$stmt = $O_model->prepare("SELECT * FROM RECIPE WHERE ID=:id");
|
||||||
@ -157,7 +157,7 @@ final class RecipeModel
|
|||||||
|
|
||||||
public static function getFullRecipeById($I_id)
|
public static function getFullRecipeById($I_id)
|
||||||
{
|
{
|
||||||
$O_recipe = self::getRecipeByID($I_id);
|
$O_recipe = self::getByID($I_id);
|
||||||
$O_recipe->getFullRecipe();
|
$O_recipe->getFullRecipe();
|
||||||
return $O_recipe;
|
return $O_recipe;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user