Adding Project API Class, and anothers classes to handle bpmn layer model

This commit is contained in:
Erik Amaru Ortiz
2013-12-05 20:41:21 -04:00
parent ae2759579f
commit 0c7ca6ba97
6 changed files with 480 additions and 2 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace Services\Api\ProcessMaker;
use Luracast\Restler\RestException;
use ProcessMaker\Services\Api;
use ProcessMaker\Adapter\Bpmn\Model as BpmnModel;
/**
* Class Project
*
* @package Services\Api\ProcessMaker
* @author Erik Amaru Ortiz <aortiz.erik@gmail.com, erik@colosa.com>
*
* @protected
*/
class Project extends Api
{
function post($request_data)
{
try {
$bpmnModel = new BpmnModel();
return $bpmnModel->createProject($request_data);
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
function get($prjUid)
{
$project = BpmnModel::loadProject($prjUid);
return $project;
}
}