2012-08-13 15:14:31 -04:00
|
|
|
<?php
|
|
|
|
|
|
2012-08-13 17:31:38 -04:00
|
|
|
class Services_Rest_Application
|
2012-08-13 15:14:31 -04:00
|
|
|
{
|
2012-08-13 17:31:38 -04:00
|
|
|
protected function get($id = '', $type = null, $start = null, $limit = 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;
|
|
|
|
|
|
|
|
|
|
return $app->getAll($userUid, $start, $limit, $type);
|
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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|