CODE STYLE for several files:
src/BusinessModel/CaseScheduler.php src/BusinessModel/DataBaseConnection.php src/BusinessModel/OutputDocument.php src/BusinessModel/ProcessSupervisor.php src/BusinessModel/Task.php src/ProcessMaker/Adapter/Bpmn/Model.php src/ProcessMaker/Adapter/Workflow.php src/Services/Api/ProcessMaker/Project.php src/Services/Api/ProcessMaker/Project/CaseScheduler.php src/Services/Api/ProcessMaker/Project/DataBaseConnection.php src/Services/Api/ProcessMaker/Project/OutputDocuments.php src/Services/Api/ProcessMaker/Project/ProcessPermissions.php src/Services/Api/ProcessMaker/Test.php src/Services/Api/ProcessMaker/Test2.php src/Services/Api/ProcessMaker/Test3.php src/Services/Api/ProcessMaker/Type.php
This commit is contained in:
@@ -302,7 +302,8 @@ class CaseScheduler
|
||||
$nSW = 0;
|
||||
$aData['SCH_DAYS_PERFORM_TASK'] = '';
|
||||
switch ($sOption) {
|
||||
case '1': // Option 1
|
||||
case '1':
|
||||
// Option 1
|
||||
$aData['SCH_DAYS_PERFORM_TASK'] = '1';
|
||||
$sValue = $aData['SCH_DAYS_PERFORM_TASK'];
|
||||
switch ($sValue) {
|
||||
@@ -548,7 +549,8 @@ class CaseScheduler
|
||||
$nSW = 0;
|
||||
$aData['SCH_DAYS_PERFORM_TASK'] = '';
|
||||
switch ($sOption) {
|
||||
case '1': // Option 1
|
||||
case '1':
|
||||
// Option 1
|
||||
$aData['SCH_DAYS_PERFORM_TASK'] = '1';
|
||||
$sValue = $aData['SCH_DAYS_PERFORM_TASK'];
|
||||
switch ($sValue) {
|
||||
@@ -737,3 +739,4 @@ class CaseScheduler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ class DataBaseConnection
|
||||
if (isset($dataDBConnection['DBS_TYPE'])) {
|
||||
$typesExists = array();
|
||||
G::LoadClass( 'dbConnections' );
|
||||
$dbs = new dbConnections($sProcessUid);;
|
||||
$dbs = new dbConnections($sProcessUid);
|
||||
$dbServices = $dbs->getDbServicesAvailables();
|
||||
foreach ($dbServices as $value) {
|
||||
$typesExists[] = $value['id'];
|
||||
@@ -98,7 +98,7 @@ class DataBaseConnection
|
||||
if (isset($dataDBConnection['DBS_TYPE'])) {
|
||||
$typesExists = array();
|
||||
|
||||
$dbs = new dbConnections($sProcessUid);;
|
||||
$dbs = new dbConnections($sProcessUid);
|
||||
$dbServices = $dbs->getDbServicesAvailables();
|
||||
foreach ($dbServices as $value) {
|
||||
$typesExists[] = $value['id'];
|
||||
@@ -181,7 +181,8 @@ class DataBaseConnection
|
||||
}
|
||||
|
||||
|
||||
public function testConnection ($dataCon) {
|
||||
public function testConnection($dataCon)
|
||||
{
|
||||
$resp = array();
|
||||
$resp['resp'] = false;
|
||||
|
||||
@@ -241,4 +242,3 @@ class DataBaseConnection
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ class OutputDocument
|
||||
$oCriteria->addAlias('C1', 'CONTENT');
|
||||
$oCriteria->addAlias('C2', 'CONTENT');
|
||||
$oCriteria->addAlias('C3', 'CONTENT');
|
||||
$oCriteria->addAlias('C4', 'CONTENT'); $aConditions = array();
|
||||
$oCriteria->addAlias('C4', 'CONTENT');
|
||||
$aConditions = array();
|
||||
$aConditions[] = array(\OutputDocumentPeer::OUT_DOC_UID, 'C1.CON_ID' );
|
||||
$aConditions[] = array('C1.CON_CATEGORY', $sDelimiter . 'OUT_DOC_TITLE' . $sDelimiter );
|
||||
$aConditions[] = array('C1.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter );
|
||||
@@ -398,6 +399,5 @@ class OutputDocument
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class ProcessSupervisor
|
||||
'usr_email' => $aRow['USR_EMAIL'] );
|
||||
$oDataset->next();
|
||||
}
|
||||
if ($aResp == null){
|
||||
if ($aResp == null) {
|
||||
$aResp = array();
|
||||
}
|
||||
return $aResp;
|
||||
|
||||
@@ -1482,5 +1482,5 @@ class Task
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ class Model
|
||||
$flows = array_key_exists('flows', $diagramData) ? $diagramData['flows'] : array();
|
||||
$artifacts = array_key_exists('artifacts', $diagramData) ? $diagramData['artifacts'] : array();
|
||||
|
||||
foreach($lanesets as $lanesetData) {
|
||||
foreach ($lanesets as $lanesetData) {
|
||||
$lanesetData = array_change_key_case((array) $lanesetData, CASE_UPPER);
|
||||
|
||||
$laneset = new Laneset();
|
||||
@@ -189,7 +189,7 @@ class Model
|
||||
$mapId['laneset'][$oldLnsUid] = $lnsUid;
|
||||
}
|
||||
|
||||
foreach($lanes as $laneData) {
|
||||
foreach ($lanes as $laneData) {
|
||||
$laneData = array_change_key_case((array) $laneData, CASE_UPPER);
|
||||
$oldLanUid = $laneData['LNS_UID'];
|
||||
|
||||
@@ -210,7 +210,7 @@ class Model
|
||||
* 2. crate bound record for each object created previously
|
||||
*/
|
||||
|
||||
foreach($activities as $activityData) {
|
||||
foreach ($activities as $activityData) {
|
||||
$activityData = array_change_key_case((array) $activityData, CASE_UPPER);
|
||||
|
||||
$activity = new Activity();
|
||||
@@ -237,7 +237,7 @@ class Model
|
||||
$bound->save();
|
||||
}
|
||||
|
||||
foreach($events as $eventData) {
|
||||
foreach ($events as $eventData) {
|
||||
$eventData = array_change_key_case((array) $eventData, CASE_UPPER);
|
||||
|
||||
$event = new Event();
|
||||
@@ -264,7 +264,7 @@ class Model
|
||||
$bound->save();
|
||||
}
|
||||
|
||||
foreach($gateways as $gatewayData) {
|
||||
foreach ($gateways as $gatewayData) {
|
||||
$gatewayData = array_change_key_case((array) $gatewayData, CASE_UPPER);
|
||||
|
||||
// fix data
|
||||
@@ -296,7 +296,7 @@ class Model
|
||||
$bound->save();
|
||||
}
|
||||
|
||||
foreach($flows as $flowData) {
|
||||
foreach ($flows as $flowData) {
|
||||
$flowData = array_change_key_case((array) $flowData, CASE_UPPER);
|
||||
|
||||
$floState = json_encode($flowData['FLO_STATE']);
|
||||
@@ -340,7 +340,7 @@ class Model
|
||||
$uids[] = array('old_uid' => $oldFloUid, 'new_uid' => $floUid, 'object' => 'flow');
|
||||
}
|
||||
|
||||
foreach($artifacts as $artifactData) {
|
||||
foreach ($artifacts as $artifactData) {
|
||||
$artifactData = array_change_key_case((array) $artifactData, CASE_UPPER);
|
||||
|
||||
$artifact = new Artifact();
|
||||
@@ -376,7 +376,7 @@ class Model
|
||||
|
||||
$project = self::getBpmnObjectBy('Project', ProjectPeer::PRJ_UID, $prjUid, true);
|
||||
|
||||
if(empty($project)) {
|
||||
if (empty($project)) {
|
||||
throw new \RuntimeException("Project with id: $prjUid, does not exists. ");
|
||||
}
|
||||
|
||||
@@ -496,7 +496,8 @@ class Model
|
||||
|
||||
public static function updateDiagram($prjUid, $proUid, $diff)
|
||||
{
|
||||
echo 'DIFF'.PHP_EOL; print_r($diff);
|
||||
echo 'DIFF'. PHP_EOL;
|
||||
print_r($diff);
|
||||
|
||||
//return false;
|
||||
$mapId = array();
|
||||
@@ -514,31 +515,25 @@ class Model
|
||||
switch ($element) {
|
||||
case 'laneset':
|
||||
break;
|
||||
|
||||
case 'lanes':
|
||||
break;
|
||||
|
||||
case 'activities':
|
||||
$activity = ActivityPeer::retrieveByPk($data['ACT_UID']);
|
||||
$activity->fromArray($data);
|
||||
$activity->save();
|
||||
break;
|
||||
|
||||
case 'events':
|
||||
$event = EventPeer::retrieveByPk($data['EVN_UID']);
|
||||
$event->fromArray($data);
|
||||
$event->save();
|
||||
break;
|
||||
|
||||
case 'gateways':
|
||||
$gateway = GatewayPeer::retrieveByPk($data['GAT_UID']);
|
||||
$gateway->fromArray($data);
|
||||
$gateway->save();
|
||||
break;
|
||||
|
||||
case 'flows':
|
||||
break;
|
||||
|
||||
case 'artifacts':
|
||||
break;
|
||||
}
|
||||
@@ -553,10 +548,8 @@ class Model
|
||||
switch ($element) {
|
||||
case 'laneset':
|
||||
break;
|
||||
|
||||
case 'lanes':
|
||||
break;
|
||||
|
||||
case 'activities':
|
||||
$uidData = array('old_uid' => $data['ACT_UID'], 'object' => 'Activity');
|
||||
|
||||
@@ -571,18 +564,12 @@ class Model
|
||||
$uidData['new_uid'] = $activity->getActUid();
|
||||
$uids[] = $uidData;
|
||||
break;
|
||||
|
||||
case 'events':
|
||||
|
||||
break;
|
||||
|
||||
case 'gateways':
|
||||
|
||||
break;
|
||||
|
||||
case 'flows':
|
||||
break;
|
||||
|
||||
case 'artifacts':
|
||||
break;
|
||||
}
|
||||
@@ -597,10 +584,8 @@ class Model
|
||||
switch ($element) {
|
||||
case 'laneset':
|
||||
break;
|
||||
|
||||
case 'lanes':
|
||||
break;
|
||||
|
||||
case 'activities':
|
||||
$activity = ActivityPeer::retrieveByPK($uid);
|
||||
$activity->delete();
|
||||
@@ -608,18 +593,12 @@ class Model
|
||||
$uidData['new_uid'] = $activity->getActUid();
|
||||
$uids[] = $uidData;
|
||||
break;
|
||||
|
||||
case 'events':
|
||||
|
||||
break;
|
||||
|
||||
case 'gateways':
|
||||
|
||||
break;
|
||||
|
||||
case 'flows':
|
||||
break;
|
||||
|
||||
case 'artifacts':
|
||||
break;
|
||||
}
|
||||
@@ -627,6 +606,7 @@ class Model
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function deleteProject($prjUid)
|
||||
{
|
||||
$project = self::loadProject($prjUid);
|
||||
|
||||
@@ -62,7 +62,6 @@ class Workflow
|
||||
switch ($flow['FLO_TYPE']) {
|
||||
case 'SEQUENCE':
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new \LogicException(sprintf(
|
||||
"Unsupported flow type: %s, ProcessMaker only support type '', Given: '%s'",
|
||||
@@ -82,7 +81,6 @@ class Workflow
|
||||
'_action' => 'CREATE'
|
||||
);
|
||||
break;
|
||||
|
||||
case 'bpmnGateway':
|
||||
$gatUid = $flow['FLO_ELEMENT_DEST'];
|
||||
// if it is a gateway it can fork one or more routes
|
||||
@@ -98,23 +96,18 @@ class Workflow
|
||||
case 'SELECTION':
|
||||
$routeType = 'SELECT';
|
||||
break;
|
||||
|
||||
case 'EVALUATION':
|
||||
$routeType = 'EVALUATE';
|
||||
break;
|
||||
|
||||
case 'PARALLEL':
|
||||
$routeType = 'PARALLEL';
|
||||
break;
|
||||
|
||||
case 'PARALLEL_EVALUATION':
|
||||
$routeType = 'PARALLEL-BY-EVALUATION';
|
||||
break;
|
||||
|
||||
case 'PARALLEL_JOIN':
|
||||
$routeType = 'SEC-JOIN';
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new \LogicException(sprintf("Unsupported Gateway type: %s", $gateway['GAT_TYPE']));
|
||||
}
|
||||
@@ -138,7 +131,6 @@ class Workflow
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'bpmnEvent':
|
||||
$evnUid = $flow['FLO_ELEMENT_DEST'];
|
||||
$event = BpmnModel::getBpmnObjectBy('Event', \BpmnEventPeer::EVN_UID, $evnUid);
|
||||
@@ -191,3 +183,4 @@ class Workflow
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ use ProcessMaker\Adapter\Workflow;
|
||||
*/
|
||||
class Project extends Api
|
||||
{
|
||||
function index()
|
||||
public function index()
|
||||
{
|
||||
try {
|
||||
$projects = BpmnModel::loadProjects();
|
||||
@@ -30,7 +30,7 @@ class Project extends Api
|
||||
/**
|
||||
* @status 201
|
||||
*/
|
||||
function post($request_data)
|
||||
public function post($request_data)
|
||||
{
|
||||
try {
|
||||
$config = array();
|
||||
@@ -62,7 +62,7 @@ class Project extends Api
|
||||
}
|
||||
}
|
||||
|
||||
function get($prjUid)
|
||||
public function get($prjUid)
|
||||
{
|
||||
try {
|
||||
$project = BpmnModel::loadProject($prjUid);
|
||||
@@ -73,7 +73,7 @@ class Project extends Api
|
||||
}
|
||||
}
|
||||
|
||||
function put($prjUid, $request_data)
|
||||
public function put($prjUid, $request_data)
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -85,7 +85,7 @@ class Project extends Api
|
||||
}
|
||||
}
|
||||
|
||||
function put22($prjUid, $request_data)
|
||||
public function put22($prjUid, $request_data)
|
||||
{
|
||||
try {
|
||||
$project = BpmnModel::loadProject($prjUid);
|
||||
|
||||
@@ -115,11 +115,11 @@ class CaseScheduler extends Api
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class CaseSchedulerStructure
|
||||
{ /**
|
||||
{
|
||||
/**
|
||||
* @var string {@from body} {@min 0} {@max 100}
|
||||
*/
|
||||
public $sch_name;
|
||||
@@ -232,6 +232,6 @@ class CaseSchedulerStructure
|
||||
* @var string {@from body} {@min 0} {@max 15}
|
||||
*/
|
||||
public $sch_repeat_every;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ use \Luracast\Restler\RestException;
|
||||
/**
|
||||
* Project\DataBaseConnection Api Controller
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @author Brayan Pereyra <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @protected
|
||||
@@ -74,9 +74,18 @@ class DataBaseConnection extends Api
|
||||
* @url POST /:projectUid/database-connection
|
||||
* @status 201
|
||||
*/
|
||||
public function doPostDataBaseConnection($projectUid, $request_data, $dbs_type, $dbs_server,
|
||||
$dbs_database_name, $dbs_username, $dbs_port, $dbs_encode, $dbs_password = '', $dbs_description = '')
|
||||
{
|
||||
public function doPostDataBaseConnection(
|
||||
$projectUid,
|
||||
$request_data,
|
||||
$dbs_type,
|
||||
$dbs_server,
|
||||
$dbs_database_name,
|
||||
$dbs_username,
|
||||
$dbs_port,
|
||||
$dbs_encode,
|
||||
$dbs_password = '',
|
||||
$dbs_description = ''
|
||||
) {
|
||||
try {
|
||||
$oDBConnection = new \BusinessModel\DataBaseConnection();
|
||||
$response = $oDBConnection->saveDataBaseConnection($projectUid, $request_data, true);
|
||||
@@ -106,9 +115,19 @@ class DataBaseConnection extends Api
|
||||
*
|
||||
* @url PUT /:projectUid/database-connection/:dbConnecionUid
|
||||
*/
|
||||
public function doPutDataBaseConnection($projectUid, $dbConnecionUid, $request_data, $dbs_type, $dbs_server,
|
||||
$dbs_database_name, $dbs_username, $dbs_port, $dbs_encode, $dbs_password = '', $dbs_description = '')
|
||||
{
|
||||
public function doPutDataBaseConnection(
|
||||
$projectUid,
|
||||
$dbConnecionUid,
|
||||
$request_data,
|
||||
$dbs_type,
|
||||
$dbs_server,
|
||||
$dbs_database_name,
|
||||
$dbs_username,
|
||||
$dbs_port,
|
||||
$dbs_encode,
|
||||
$dbs_password = '',
|
||||
$dbs_description = ''
|
||||
) {
|
||||
try {
|
||||
$request_data['dbs_uid'] = $dbConnecionUid;
|
||||
$oDBConnection = new \BusinessModel\DataBaseConnection();
|
||||
@@ -138,5 +157,3 @@ class DataBaseConnection extends Api
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -111,12 +111,11 @@ class OutputDocuments extends Api
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class OutputDocumentStructure
|
||||
{ /**
|
||||
{
|
||||
/**
|
||||
* @var string {@from body}
|
||||
*/
|
||||
public $out_doc_title;
|
||||
@@ -226,3 +225,4 @@ class OutputDocumentStructure
|
||||
*/
|
||||
public $out_doc_pdf_security_permissions;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,10 +84,21 @@ class ProcessPermissions extends Api
|
||||
* @url POST /:projectUid/process-permission/
|
||||
* @status 201
|
||||
*/
|
||||
public function doPostProcessPermission($projectUid, $request_data, $usr_uid, $op_user_relation, $op_case_status,
|
||||
$op_participate, $op_obj_type, $op_action, $tas_uid = '', $op_task_source = '', $dynaforms = '', $inputs = '',
|
||||
$outputs = '')
|
||||
{
|
||||
public function doPostProcessPermission(
|
||||
$projectUid,
|
||||
$request_data,
|
||||
$usr_uid,
|
||||
$op_user_relation,
|
||||
$op_case_status,
|
||||
$op_participate,
|
||||
$op_obj_type,
|
||||
$op_action,
|
||||
$tas_uid = '',
|
||||
$op_task_source = '',
|
||||
$dynaforms = '',
|
||||
$inputs = '',
|
||||
$outputs = ''
|
||||
) {
|
||||
try {
|
||||
$hiddenFields = array('task_target', 'group_user', 'task_source',
|
||||
'object_type', 'object', 'participated', 'action'
|
||||
@@ -131,10 +142,22 @@ class ProcessPermissions extends Api
|
||||
*
|
||||
* @url PUT /:projectUid/process-permission/:objectPermissionUid
|
||||
*/
|
||||
public function doPutProcessPermission($projectUid, $objectPermissionUid, $request_data, $usr_uid,
|
||||
$op_user_relation, $op_case_status, $op_participate, $op_obj_type, $op_action, $tas_uid = '',
|
||||
$op_task_source = '', $dynaforms = '', $inputs = '', $outputs = '')
|
||||
{
|
||||
public function doPutProcessPermission(
|
||||
$projectUid,
|
||||
$objectPermissionUid,
|
||||
$request_data,
|
||||
$usr_uid,
|
||||
$op_user_relation,
|
||||
$op_case_status,
|
||||
$op_participate,
|
||||
$op_obj_type,
|
||||
$op_action,
|
||||
$tas_uid = '',
|
||||
$op_task_source = '',
|
||||
$dynaforms = '',
|
||||
$inputs = '',
|
||||
$outputs = ''
|
||||
) {
|
||||
try {
|
||||
$request_data['pro_uid'] = $projectUid;
|
||||
$processPermissions = new \BusinessModel\ProcessPermissions();
|
||||
|
||||
@@ -8,7 +8,7 @@ class Test extends Api
|
||||
{
|
||||
protected $data = array();
|
||||
|
||||
function __construct()
|
||||
public function __construct()
|
||||
{
|
||||
if (! isset($_SESSION['__rest_tmp__'])) {
|
||||
$this->data[1] = array(
|
||||
@@ -23,12 +23,12 @@ class Test extends Api
|
||||
}
|
||||
}
|
||||
|
||||
function index()
|
||||
public function index()
|
||||
{
|
||||
return array_values($this->data);
|
||||
}
|
||||
|
||||
function get($id)
|
||||
public function get($id)
|
||||
{
|
||||
if (array_key_exists($id, $this->data)) {
|
||||
return $this->data[$id];
|
||||
@@ -37,7 +37,7 @@ class Test extends Api
|
||||
throw new RestException(400, "GET: Record not found. Record with id: $id does not exist!");
|
||||
}
|
||||
|
||||
function post($request_data = NULL)
|
||||
public function post($request_data = NULL)
|
||||
{
|
||||
$id = count($this->data) + 1;
|
||||
$this->data[$id] = array(
|
||||
@@ -62,7 +62,7 @@ class Test extends Api
|
||||
return $this->data[$id];
|
||||
}
|
||||
|
||||
function put($id, $request_data = NULL)
|
||||
public function put($id, $request_data = NULL)
|
||||
{
|
||||
if (array_key_exists($id, $this->data)) {
|
||||
if (array_key_exists('name', $request_data)) {
|
||||
@@ -82,7 +82,7 @@ class Test extends Api
|
||||
}
|
||||
}
|
||||
|
||||
function delete($id)
|
||||
public function delete($id)
|
||||
{
|
||||
if (array_key_exists($id, $this->data)) {
|
||||
$row = $this->data[$id];
|
||||
@@ -106,3 +106,4 @@ class Test extends Api
|
||||
$_SESSION['__rest_tmp__'] = $this->data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ use \Luracast\Restler\RestException;
|
||||
class Test2 extends Api
|
||||
{
|
||||
|
||||
function hello2()
|
||||
public function hello2()
|
||||
{
|
||||
return 'Hello #2';
|
||||
}
|
||||
@@ -15,7 +15,7 @@ class Test2 extends Api
|
||||
/**
|
||||
* @url GET /getHello
|
||||
*/
|
||||
function helloworld($param = '')
|
||||
public function helloworld($param = '')
|
||||
{
|
||||
return 'Greetings, from a overridden url ' . $param;
|
||||
}
|
||||
@@ -23,8 +23,9 @@ class Test2 extends Api
|
||||
/**
|
||||
* @url GET /sample/other/large/:name
|
||||
*/
|
||||
function sampleOther($name)
|
||||
public function sampleOther($name)
|
||||
{
|
||||
return 'Name: ' . $name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ use \Luracast\Restler\RestException;
|
||||
class Test3 extends Api
|
||||
{
|
||||
|
||||
function hello3()
|
||||
public function hello3()
|
||||
{
|
||||
return 'Hello #3';
|
||||
}
|
||||
@@ -15,8 +15,9 @@ class Test3 extends Api
|
||||
/**
|
||||
* @status 201
|
||||
*/
|
||||
function post2()
|
||||
public function post2()
|
||||
{
|
||||
return array('success' => true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ class Type
|
||||
*
|
||||
* @param string $email {@from body}{@type email}
|
||||
*/
|
||||
function postEmail($email)
|
||||
public function postEmail($email)
|
||||
{
|
||||
return $email;
|
||||
}
|
||||
@@ -18,7 +18,7 @@ class Type
|
||||
*
|
||||
* @param string $date {@from body}{@type date}
|
||||
*/
|
||||
function postDate($date)
|
||||
public function postDate($date)
|
||||
{
|
||||
return $date;
|
||||
}
|
||||
@@ -28,7 +28,7 @@ class Type
|
||||
*
|
||||
* @param string $datetime {@from body}{@type datetime}
|
||||
*/
|
||||
function postDatetime($datetime)
|
||||
public function postDatetime($datetime)
|
||||
{
|
||||
return $datetime;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class Type
|
||||
*
|
||||
* @param string $time {@from body}{@type time}
|
||||
*/
|
||||
function postTime($time)
|
||||
public function postTime($time)
|
||||
{
|
||||
return $time;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ class Type
|
||||
*
|
||||
* @param string $time {@from body}{@type time12}
|
||||
*/
|
||||
function postTime12($time12)
|
||||
public function postTime12($time12)
|
||||
{
|
||||
return $time12;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ class Type
|
||||
*
|
||||
* @param string $timestamp {@from body}{@type timestamp}
|
||||
*/
|
||||
function postTimestamp($timestamp)
|
||||
public function postTimestamp($timestamp)
|
||||
{
|
||||
return $timestamp;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ class Type
|
||||
*
|
||||
* @param array $integers {@type int}
|
||||
*/
|
||||
function postIntegers(array $integers)
|
||||
public function postIntegers(array $integers)
|
||||
{
|
||||
return $integers;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ class Type
|
||||
*
|
||||
* @param array $numbers {@type float}
|
||||
*/
|
||||
function postNumbers(array $numbers)
|
||||
public function postNumbers(array $numbers)
|
||||
{
|
||||
return $numbers;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ class Type
|
||||
*
|
||||
* @param array $timestamp {@from body}{@type time}
|
||||
*/
|
||||
function postTimes(array $timestamps)
|
||||
public function postTimes(array $timestamps)
|
||||
{
|
||||
return $timestamps;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ class Type
|
||||
*
|
||||
* @param array $timestamp {@from body}{@type timestamp}
|
||||
*/
|
||||
function postTimestamps(array $timestamps)
|
||||
public function postTimestamps(array $timestamps)
|
||||
{
|
||||
return $timestamps;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ class Type
|
||||
*
|
||||
* @return Author
|
||||
*/
|
||||
function postAuthor(Author $author)
|
||||
public function postAuthor(Author $author)
|
||||
{
|
||||
return $author;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ class Type
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function postAuthors(array $authors)
|
||||
public function postAuthors(array $authors)
|
||||
{
|
||||
return $authors;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ class Type
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function postObject(array $object)
|
||||
public function postObject(array $object)
|
||||
{
|
||||
return $object;
|
||||
}
|
||||
@@ -147,7 +147,7 @@ class Type
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function postArray(array $array)
|
||||
public function postArray(array $array)
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ class Type
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function postArrayOrObject(array $array)
|
||||
public function postArrayOrObject(array $array)
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ class Type
|
||||
/**
|
||||
* @param string $gender {@from body}{@choice male,female}
|
||||
*/
|
||||
function postChoise($gender)
|
||||
public function postChoise($gender)
|
||||
{
|
||||
return $gender;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ class Type
|
||||
/**
|
||||
* @param string $name $name 3 to 10 characters in length {@from body}{@min 3}{@max 10}
|
||||
*/
|
||||
function postMinmax($name)
|
||||
public function postMinmax($name)
|
||||
{
|
||||
return $name;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ class Type
|
||||
/**
|
||||
* @param string $name $name 3 to 10 characters in length {@from body}{@min 3}{@max 10}{@fix true}
|
||||
*/
|
||||
function postMinmaxfix($name)
|
||||
public function postMinmaxfix($name)
|
||||
{
|
||||
return $name;
|
||||
}
|
||||
@@ -191,11 +191,10 @@ class Type
|
||||
/**
|
||||
* @param integer $age {@choise 1,2}
|
||||
*/
|
||||
function postInt($age='')
|
||||
public function postInt($age='')
|
||||
{
|
||||
return '->'.$age;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Author
|
||||
|
||||
Reference in New Issue
Block a user