822 lines
20 KiB
HTML
822 lines
20 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
|
||
|
<title>Class Services_Model</title>
|
||
|
|
||
|
<link rel="stylesheet" href="resources/bootstrap.min.css?08b23951ef4599ca9cbf1f902d0e8290c9653ddd">
|
||
|
<link rel="stylesheet" href="resources/style.css?062e9e59e0b8c44fbaaded5b7ffc21f907b78669">
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<div id="navigation" class="navbar navbar-fixed-top">
|
||
|
<div class="navbar-inner">
|
||
|
<div class="container">
|
||
|
<a href="index.html" class="brand">Overview</a>
|
||
|
<div class="nav-collapse">
|
||
|
<ul class="nav">
|
||
|
<li class="active">
|
||
|
<span>Class</span> </li>
|
||
|
|
||
|
<li class="divider-vertical"></li>
|
||
|
|
||
|
<li>
|
||
|
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="todo.html" title="Todo list"><span>Todo</span></a>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="left">
|
||
|
<div id="menu">
|
||
|
<form id="search" class="form-search">
|
||
|
<input type="hidden" name="cx" value="">
|
||
|
<input type="hidden" name="ie" value="UTF-8">
|
||
|
<input type="text" name="q" class="search-query" placeholder="Search">
|
||
|
</form>
|
||
|
|
||
|
|
||
|
<div id="groups">
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div id="elements">
|
||
|
<h3>Classes</h3>
|
||
|
<ul>
|
||
|
<li><a href="class-Admins_Model.html">Admins_Model</a></li>
|
||
|
<li><a href="class-Appointments.html">Appointments</a></li>
|
||
|
<li><a href="class-Appointments_Model.html">Appointments_Model</a></li>
|
||
|
<li><a href="class-Backend.html">Backend</a></li>
|
||
|
<li><a href="class-Backend_api.html">Backend_api</a></li>
|
||
|
<li><a href="class-Customers_Model.html">Customers_Model</a></li>
|
||
|
<li><a href="class-Errors.html">Errors</a></li>
|
||
|
<li><a href="class-Google.html">Google</a></li>
|
||
|
<li><a href="class-Google_Sync.html">Google_Sync</a></li>
|
||
|
<li><a href="class-Notifications.html">Notifications</a></li>
|
||
|
<li><a href="class-Providers_Model.html">Providers_Model</a></li>
|
||
|
<li><a href="class-Roles_Model.html">Roles_Model</a></li>
|
||
|
<li><a href="class-Secretaries_Model.html">Secretaries_Model</a></li>
|
||
|
<li class="active"><a href="class-Services_Model.html">Services_Model</a></li>
|
||
|
<li><a href="class-Settings_Model.html">Settings_Model</a></li>
|
||
|
<li><a href="class-Test.html">Test</a></li>
|
||
|
<li><a href="class-Unit_tests.html">Unit_tests</a></li>
|
||
|
<li><a href="class-Unit_tests_admins_model.html">Unit_tests_admins_model</a></li>
|
||
|
<li><a href="class-Unit_tests_appointments_model.html">Unit_tests_appointments_model</a></li>
|
||
|
<li><a href="class-Unit_tests_customers_model.html">Unit_tests_customers_model</a></li>
|
||
|
<li><a href="class-Unit_tests_providers_model.html">Unit_tests_providers_model</a></li>
|
||
|
<li><a href="class-Unit_tests_secretaries_model.html">Unit_tests_secretaries_model</a></li>
|
||
|
<li><a href="class-Unit_tests_services_model.html">Unit_tests_services_model</a></li>
|
||
|
<li><a href="class-Unit_tests_settings_model.html">Unit_tests_settings_model</a></li>
|
||
|
<li><a href="class-User.html">User</a></li>
|
||
|
<li><a href="class-User_Model.html">User_Model</a></li>
|
||
|
</ul>
|
||
|
|
||
|
<h3>Interfaces</h3>
|
||
|
<ul>
|
||
|
<li><a href="class-Admins_Model.html">Admins_Model</a></li>
|
||
|
<li><a href="class-Appointments.html">Appointments</a></li>
|
||
|
<li><a href="class-Appointments_Model.html">Appointments_Model</a></li>
|
||
|
<li><a href="class-Backend.html">Backend</a></li>
|
||
|
<li><a href="class-Backend_api.html">Backend_api</a></li>
|
||
|
<li><a href="class-Customers_Model.html">Customers_Model</a></li>
|
||
|
<li><a href="class-Errors.html">Errors</a></li>
|
||
|
<li><a href="class-Google.html">Google</a></li>
|
||
|
<li><a href="class-Google_Sync.html">Google_Sync</a></li>
|
||
|
<li><a href="class-Notifications.html">Notifications</a></li>
|
||
|
<li><a href="class-Providers_Model.html">Providers_Model</a></li>
|
||
|
<li><a href="class-Roles_Model.html">Roles_Model</a></li>
|
||
|
<li><a href="class-Secretaries_Model.html">Secretaries_Model</a></li>
|
||
|
<li class="active"><a href="class-Services_Model.html">Services_Model</a></li>
|
||
|
<li><a href="class-Settings_Model.html">Settings_Model</a></li>
|
||
|
<li><a href="class-Test.html">Test</a></li>
|
||
|
<li><a href="class-Unit_tests.html">Unit_tests</a></li>
|
||
|
<li><a href="class-Unit_tests_admins_model.html">Unit_tests_admins_model</a></li>
|
||
|
<li><a href="class-Unit_tests_appointments_model.html">Unit_tests_appointments_model</a></li>
|
||
|
<li><a href="class-Unit_tests_customers_model.html">Unit_tests_customers_model</a></li>
|
||
|
<li><a href="class-Unit_tests_providers_model.html">Unit_tests_providers_model</a></li>
|
||
|
<li><a href="class-Unit_tests_secretaries_model.html">Unit_tests_secretaries_model</a></li>
|
||
|
<li><a href="class-Unit_tests_services_model.html">Unit_tests_services_model</a></li>
|
||
|
<li><a href="class-Unit_tests_settings_model.html">Unit_tests_settings_model</a></li>
|
||
|
<li><a href="class-User.html">User</a></li>
|
||
|
<li><a href="class-User_Model.html">User_Model</a></li>
|
||
|
</ul>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="splitter"></div>
|
||
|
|
||
|
<div id="right">
|
||
|
<div id="rightInner">
|
||
|
<div id="content" class="class">
|
||
|
<h1>Class Services_Model</h1>
|
||
|
|
||
|
|
||
|
|
||
|
<dl class="tree well">
|
||
|
<dd style="padding-left:0px">
|
||
|
CI_Model
|
||
|
|
||
|
|
||
|
</dd>
|
||
|
<dd style="padding-left:30px">
|
||
|
<img src="resources/inherit.png" alt="Extended by">
|
||
|
<b><span>Services_Model</span></b>
|
||
|
|
||
|
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div class="alert alert-info">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<b>Located at</b> <a href="source-class-Services_Model.html#2-355" title="Go to source code">services_model.php</a>
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<h2>Methods summary</h2>
|
||
|
<table class="summary table table-bordered table-striped methods" id="methods">
|
||
|
<tr data-order="__construct" id="___construct">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#___construct">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#3-8" title="Go to source code">__construct</a>( )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Class Constructor</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Class Constructor</p>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="add" id="_add">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
numeric
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_add">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#10-27" title="Go to source code">add</a>( <span>array <var>$service</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Add (insert or update) a service record on the database</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Add (insert or update) a service record on the database</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$service</var></dt>
|
||
|
<dd><p>Contains the service data. If an 'id' value is provided then
|
||
|
the record will be updated.</p></dd>
|
||
|
</dl></div>
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
numeric<br>Returns the record id.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="insert" id="_insert">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
integer
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_insert">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#29-40" title="Go to source code">insert</a>( <span>array <var>$service</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Insert service record into database.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Insert service record into database.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$service</var></dt>
|
||
|
<dd>Contains the service record data.</dd>
|
||
|
</dl></div>
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
integer<br>Returns the new service record id.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="update" id="_update">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_update">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#42-53" title="Go to source code">update</a>( <span>array <var>$service</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Update service record.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Update service record.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$service</var></dt>
|
||
|
<dd><p>Contains the service data. The record id needs to be included in
|
||
|
the array.</p></dd>
|
||
|
</dl></div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="exists" id="_exists">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_exists">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#55-76" title="Go to source code">exists</a>( <span>array <var>$service</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Checks whether an service record already exists in the database.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Checks whether an service record already exists in the database.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$service</var></dt>
|
||
|
<dd><p>Contains the service data. Name, duration and price values
|
||
|
are mandatory in order to perform the checks.</p></dd>
|
||
|
</dl></div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="validate" id="_validate">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
boolean
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_validate">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#78-126" title="Go to source code">validate</a>( <span>array <var>$service</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Validate a service record data.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Validate a service record data.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$service</var></dt>
|
||
|
<dd>Contains the service data.</dd>
|
||
|
</dl></div>
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
boolean<br>Returns the validation result.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="find_record_id" id="_find_record_id">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_find_record_id">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#128-155" title="Go to source code">find_record_id</a>( <span>array <var>$service</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Get the record id of an existing record.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Get the record id of an existing record.</p>
|
||
|
|
||
|
<p>NOTICE! The record must exist, otherwise an exeption will be raised.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$service</var></dt>
|
||
|
<dd><p>Contains the service record data. Name, duration and price values
|
||
|
are mandatory for this method to complete.</p></dd>
|
||
|
</dl></div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="delete" id="_delete">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
boolean
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_delete">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#157-174" title="Go to source code">delete</a>( <span>numeric <var>$service_id</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Delete a service record from database.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Delete a service record from database.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$service_id</var></dt>
|
||
|
<dd>Record id to be deleted.</dd>
|
||
|
</dl></div>
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
boolean<br>Returns the delete operation result.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="get_row" id="_get_row">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
array
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_get_row">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#176-189" title="Go to source code">get_row</a>( <span>numeric <var>$service_id</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Get a specific row from the services db table.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Get a specific row from the services db table.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$service_id</var></dt>
|
||
|
<dd>The record's id to be returned.</dd>
|
||
|
</dl></div>
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
array<br><p>Returns an associative array with the selected
|
||
|
record's data. Each key has the same name as the database
|
||
|
field names.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="get_value" id="_get_value">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
string
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_get_value">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#191-219" title="Go to source code">get_value</a>( <span>string <var>$field_name</var></span>, <span>integer <var>$service_id</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Get a specific field value from the database.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Get a specific field value from the database.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$field_name</var></dt>
|
||
|
<dd><p>The field name of the value to be
|
||
|
returned.</p></dd>
|
||
|
<dt><var>$service_id</var></dt>
|
||
|
<dd>The selected record's id.</dd>
|
||
|
</dl></div>
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
string<br>Returns the records value from the database.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="get_batch" id="_get_batch">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
array
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_get_batch">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#221-236" title="Go to source code">get_batch</a>( <span>string <var>$where_clause</var> = <span class="php-keyword1">NULL</span></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Get all, or specific records from service's table.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Get all, or specific records from service's table.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$where_clause</var></dt>
|
||
|
<dd><p>$whereClause (OPTIONAL) The WHERE clause of
|
||
|
the query to be executed. DO NOT INCLUDE 'WHERE' KEYWORD.</p></dd>
|
||
|
</dl></div>
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
array<br>Returns the rows from the database.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<h4>Example</h4>
|
||
|
<div class="list">
|
||
|
$this->Model->getBatch('id = ' . $recordId);<br>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="get_available_services" id="_get_available_services">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
array
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_get_available_services">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#238-255" title="Go to source code">get_available_services</a>( )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>This method returns all the services from the database.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>This method returns all the services from the database.</p>
|
||
|
|
||
|
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
array<br><p>Returns an object array with all the
|
||
|
database services.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="add_category" id="_add_category">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
integer
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_add_category">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#257-277" title="Go to source code">add_category</a>( <span>array <var>$category</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Add (insert or update) a service category record into database.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Add (insert or update) a service category record into database.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$category</var></dt>
|
||
|
<dd>Containst the service category data.</dd>
|
||
|
</dl></div>
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
integer<br>Returns the record id.s
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="delete_category" id="_delete_category">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
boolean
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_delete_category">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#279-298" title="Go to source code">delete_category</a>( <span>numeric <var>$category_id</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Delete a service category record from the database.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Delete a service category record from the database.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$category_id</var></dt>
|
||
|
<dd>Record id to be deleted.</dd>
|
||
|
</dl></div>
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
boolean<br>Returns the delete operation result.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="get_category" id="_get_category">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
array
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_get_category">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#300-318" title="Go to source code">get_category</a>( <span>numeric <var>$category_id</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Get a service category record data.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Get a service category record data.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$category_id</var></dt>
|
||
|
<dd>Record id to be retrieved.</dd>
|
||
|
</dl></div>
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
array<br>Returns the record data from the database.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="get_all_categories" id="_get_all_categories">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
array
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_get_all_categories">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#320-328" title="Go to source code">get_all_categories</a>( <span> <var>$where</var> = <span class="php-quote">''</span></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Get all service category records from database.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Get all service category records from database.</p>
|
||
|
|
||
|
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
array<br>Returns an array that contains all the service category records.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
<tr data-order="validate_category" id="_validate_category">
|
||
|
|
||
|
<td class="attributes"><code>
|
||
|
public
|
||
|
boolean
|
||
|
|
||
|
</code>
|
||
|
</td>
|
||
|
|
||
|
<td class="name"><div>
|
||
|
<a class="anchor" href="#_validate_category">#</a>
|
||
|
<code><a href="source-class-Services_Model.html#330-354" title="Go to source code">validate_category</a>( <span>array <var>$category</var></span> )</code>
|
||
|
|
||
|
<div class="description short">
|
||
|
<p>Validate a service category record data. This method must be used before adding
|
||
|
a service category record into database in order to secure the record integrity.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="description detailed hidden">
|
||
|
<p>Validate a service category record data. This method must be used before adding
|
||
|
a service category record into database in order to secure the record integrity.</p>
|
||
|
|
||
|
|
||
|
<h4>Parameters</h4>
|
||
|
<div class="list"><dl>
|
||
|
<dt><var>$category</var></dt>
|
||
|
<dd>Contains the service category data.</dd>
|
||
|
</dl></div>
|
||
|
|
||
|
<h4>Returns</h4>
|
||
|
<div class="list">
|
||
|
boolean<br>Returns the validation result.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
|
||
|
<h3>Magic methods summary</h3>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="footer">
|
||
|
API documentation generated by <a href="http://apigen.org">ApiGen</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<script src="resources/combined.js"></script>
|
||
|
<script src="elementlist.js"></script>
|
||
|
</body>
|
||
|
</html>
|