/** * getById function. Get Recipe Object by id in array. In fact it is only to use a more modern and convenient way to access data. For the sake of coherence ! * * @access public * @static * @param int id - $id * @return Recipe Object */ public static function getById($id) { if (Category::getDataAt($id)) { return new Category($id); } return null; }