2012-08-13 15:14:31 -04:00
|
|
|
<?php
|
|
|
|
|
|
2012-08-13 18:18:46 -04:00
|
|
|
class Services_Rest_Case
|
2012-08-13 15:14:31 -04:00
|
|
|
{
|
2012-08-30 17:35:39 -04:00
|
|
|
protected function get($id = '', $start=null, $limit=null, $type=null, $filter=null, $search=null, $process=null, $user=null, $status=null, $typeResource=null, $dateFrom=null, $dateTo=null)
|
2012-08-13 15:14:31 -04:00
|
|
|
{
|
2012-08-13 17:31:38 -04:00
|
|
|
if (empty($id)) {
|
2012-08-13 15:14:31 -04:00
|
|
|
// getting all records.
|
|
|
|
|
G::loadClass('applications');
|
2012-08-13 17:31:38 -04:00
|
|
|
$app = new Applications();
|
|
|
|
|
$userUid = Services_Rest_Auth::$userId;
|
|
|
|
|
|
2012-08-13 18:18:46 -04:00
|
|
|
return $app->getAll($userUid, $start, $limit, $type, $filter, $search, $process, $user, $status, $typeResource, $dateFrom, $dateTo);
|
2012-08-13 15:14:31 -04:00
|
|
|
} else {
|
|
|
|
|
// get a specific record.
|
|
|
|
|
G::loadClass('wsBase');
|
2012-08-13 17:31:38 -04:00
|
|
|
$wsBase = new wsBase();
|
|
|
|
|
return $wsBase->getCaseInfo($id);
|
2012-08-13 15:14:31 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|