Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 7817978d39
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (36 sloc) 1.158 kB
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Model for Services
*
* PHP version 5
* LICENSE: This source file is subject to LGPL license
* that is available through the world-wide-web at the following URI:
* http://www.gnu.org/copyleft/lesser.html
* @author Ushahidi Team <team@ushahidi.com>
* @package Ushahidi - http://source.ushahididev.com
* @module Service Model
* @copyright Ushahidi - http://www.ushahidi.com
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License (LGPL)
*/
class Service_Model extends ORM
{
protected $has_many = array('reporter');
//protected $has_many = array('incident');
// Database table name
protected $table_name = 'service';
function find_by_id($service_id) {
return ORM::factory('service', $service_id);
}
function name() {
return $this->service_name;
}
static function get_array()
{
$all_services = ORM::factory('service')->find_all();
$service_array = array();
foreach ($all_services as $service) {
$service_array[$service->id] = $service->service_name;
}
return $service_array;
}
}
Jump to Line
Something went wrong with that request. Please try again.