Begin work on recipe model class
This commit is contained in:
parent
9f1c105167
commit
b41ee9870b
69
modules/ORB/System/Recipe.pm
Normal file
69
modules/ORB/System/Recipe.pm
Normal file
@ -0,0 +1,69 @@
|
||||
## @file
|
||||
# This file contains the implementation of the Recipe model.
|
||||
#
|
||||
# @author Chris Page <chris@starforge.co.uk>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## @class Recipe
|
||||
|
||||
package ORB::System::Entity;
|
||||
|
||||
# Current uses of this module:
|
||||
#
|
||||
# - ingredients
|
||||
# - preparation methods
|
||||
# - states
|
||||
# - tags
|
||||
# - types
|
||||
# - units
|
||||
|
||||
use strict;
|
||||
use parent qw(Webperl::SystemModule);
|
||||
use v5.14;
|
||||
|
||||
use Webperl::Utils qw(hash_or_hashref);
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Constructor
|
||||
|
||||
## @cmethod $ new(%args)
|
||||
# Create a new Recipe object to manage recipe creation and management.
|
||||
# The minimum values you need to provide are:
|
||||
#
|
||||
# - `dbh` - The database handle to use for queries.
|
||||
# - `settings` - The system settings object
|
||||
# - `logger` - The system logger object.
|
||||
#
|
||||
# @param args A hash of key value pairs to initialise the object with.
|
||||
# @return A new Recipe object, or undef if a problem occured.
|
||||
sub new {
|
||||
my $invocant = shift;
|
||||
my $class = ref($invocant) || $invocant;
|
||||
my $self = $class -> SUPER::new(@_);
|
||||
|
||||
return $self
|
||||
}
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Recipe creation and deletion
|
||||
|
||||
## @method $ create(%args)
|
||||
#
|
||||
|
||||
|
||||
|
||||
1;
|
Loading…
x
Reference in New Issue
Block a user