public static function getIngredientList($session) { $ingredient = new IngredientCollection(); $ingredient->addFilter("name LIKE '%" . $session['query'] . "%'"); $ingredient->load(); return $ingredient->export(); }
public function getPrice() { $ingredientList = new IngredientCollection(); $ingredientList->loadByCocktail($this->getId()); if ($this->isTopTen()) { $multiplier = 5; } else { if ($this->isFlopTen()) { $multiplier = 3; } else { $multiplier = 1; } } return $ingredientList->getPrice($multiplier); }