当前位置: 首页>>代码示例>>PHP>>正文


PHP ActivitiResponseObject类代码示例

本文整理汇总了PHP中ActivitiResponseObject的典型用法代码示例。如果您正苦于以下问题:PHP ActivitiResponseObject类的具体用法?PHP ActivitiResponseObject怎么用?PHP ActivitiResponseObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ActivitiResponseObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: parseResponse

 public function parseResponse($url, $response, $returnType, $isArray, $expectedHttpCodes, $errorHttpCodes)
 {
     // parse response
     $header = false;
     $content = array();
     $status = null;
     foreach (explode("\r\n", $response) as $line) {
         if (strpos($line, 'HTTP/1.1') === 0) {
             $lineParts = explode(' ', $line);
             $status = intval($lineParts[1]);
             $header = true;
         } else {
             if ($line == '') {
                 $header = false;
             } else {
                 if ($header) {
                     $line = explode(': ', $line);
                     switch ($line[0]) {
                         case 'Status':
                             $status = intval(substr($line[1], 0, 3));
                             break;
                     }
                 } else {
                     $content[] = $line;
                 }
             }
         }
     }
     if (is_null($status)) {
         throw new ActivitiClientException("No valid response accepted, URL [{$url}]", ActivitiClientException::NO_VALID_RESPONSE);
     }
     if (in_array($status, $expectedHttpCodes)) {
         $response = implode("\r\n", $content);
         if (!trim($response)) {
             return;
         }
         if ($returnType == 'string') {
             return $response;
         }
         $response = json_decode($response);
         if ($returnType) {
             if ($isArray) {
                 return ActivitiResponseObject::fromArray($response, $returnType);
             }
             return new $returnType($response);
         }
         return;
     }
     if ($response && json_decode(implode("\n", $content))) {
         $error = json_decode(implode("\n", $content));
         if (isset($error->statusCode) && isset($error->errorMessage)) {
             throw new ActivitiClientException("Status [{$error->statusCode}], URL [{$url}]: {$error->errorMessage}", ActivitiClientException::INVALID_HTTP_CODE);
         }
     }
     if (isset($errorHttpCodes[$status])) {
         throw new ActivitiClientException("Status [{$status}], URL [{$url}]: " . $errorHttpCodes[$status], ActivitiClientException::INVALID_HTTP_CODE);
     }
     if (ActivitiResponseType::isExpectedCode($status)) {
         throw new ActivitiClientException("Status [{$status}], URL [{$url}]: " . ActivitiResponseType::getCodeDescription($status), ActivitiClientException::INVALID_HTTP_CODE);
     }
     throw new ActivitiClientException("Unexpected status [{$status}], URL [{$url}]", ActivitiClientException::INVALID_HTTP_CODE);
 }
开发者ID:DBezemer,项目名称:server,代码行数:62,代码来源:ActivitiClientBase.php

示例2: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'name' => 'string', 'type' => 'string', 'value' => '', 'readable' => 'boolean', 'writable' => 'boolean', 'required' => 'boolean', 'datePattern' => '', 'enumValues' => 'array<ActivitiGetFormDataResponseDataFormPropertyEnumValue>'));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiGetFormDataResponseDataFormProperty.php

示例3: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'activityId' => 'string', 'activityName' => 'string', 'activityType' => 'string', 'processDefinitionId' => 'string', 'processDefinitionUrl' => 'string', 'processInstanceId' => 'string', 'processInstanceUrl' => 'string', 'executionId' => 'string', 'taskId' => 'string', 'calledProcessInstanceId' => '', 'assignee' => 'string', 'startTime' => 'string', 'endTime' => 'string', 'durationInMillis' => 'int', 'tenantId' => ''));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiQueryForHistoricActivityInstancesResponseData.php

示例4: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'processInstanceUrl' => 'string', 'message' => 'string', 'author' => 'string', 'time' => 'string', 'processInstanceId' => 'string'));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiGetCommentOnHistoricProcessInstanceResponse.php

示例5: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('name' => 'string', 'key' => 'string', 'category' => 'string', 'version' => 'int', 'metaInfo' => 'string', 'deploymentId' => 'string', 'id' => 'string', 'url' => 'string', 'createTime' => 'string', 'lastUpdateTime' => 'string', 'deploymentUrl' => 'string', 'tenantId' => ''));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiGetListOfModelsResponseData.php

示例6: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('type' => 'string', 'userId' => 'string', 'groupId' => '', 'taskId' => 'string', 'taskUrl' => 'string', 'processInstanceId' => '', 'processInstanceUrl' => ''));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiGetTheIdentityLinksOfHistoricTaskInstanceResponse.php

示例7: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('gonzo' => 'string'));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiGetAnEventOnTaskResponseMessage.php

示例8: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'processDefinitionId' => 'string', 'processDefinitionUrl' => 'string', 'processInstanceId' => 'string', 'processInstanceUrl' => 'string', 'executionId' => 'string', 'name' => 'string', 'description' => 'string', 'deleteReason' => '', 'owner' => 'string', 'assignee' => 'string', 'startTime' => 'string', 'endTime' => 'string', 'durationInMillis' => 'int', 'workTimeInMillis' => 'int', 'claimTime' => 'string', 'taskDefinitionKey' => 'string', 'formKey' => '', 'priority' => 'int', 'dueDate' => 'string', 'parentTaskId' => '', 'url' => 'string', 'variables' => '', 'tenantId' => ''));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiGetSingleHistoricTaskInstanceResponse.php

示例9: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('name' => 'string', 'url' => 'string', 'count' => 'int'));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiGetSingleTableResponse.php

示例10: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'url' => 'string', 'version' => 'int', 'key' => 'string', 'category' => 'string', 'suspended' => 'boolean', 'name' => 'string', 'description' => 'string', 'deploymentId' => 'string', 'deploymentUrl' => 'string', 'graphicalNotationDefined' => 'boolean', 'resource' => 'string', 'diagramResource' => 'string', 'startFormDefined' => 'boolean'));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiListOfProcessDefinitionsResponseData.php

示例11: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('iD_' => 'string', 'tYPE_' => 'string'));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiGetColumnInfoForSingleTableResponseColumnName.php

示例12: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'url' => 'string', 'businessKey' => 'string', 'suspended' => 'boolean', 'processDefinitionUrl' => 'string', 'activityId' => 'string', 'tenantId' => ''));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiListOfProcessInstancesResponseData.php

示例13: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'processInstanceId' => 'string', 'processInstanceUrl' => 'string', 'executionId' => 'string', 'activityInstanceId' => 'string', 'taskId' => 'string', 'taskUrl' => 'string', 'time' => 'string', 'detailType' => 'string', 'revision' => 'int', 'variable' => '', 'propertyId' => '', 'propertyValue' => ''));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiGetHistoricDetailResponseData.php

示例14: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'name' => 'string', 'deploymentTime' => 'string', 'category' => 'string', 'url' => 'string', 'tenantId' => ''));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiGetDeploymentResponse.php

示例15: getAttributes

 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'url' => 'string', 'email' => 'string'));
 }
开发者ID:DBezemer,项目名称:server,代码行数:4,代码来源:ActivitiGetListOfUsersResponseData.php


注:本文中的ActivitiResponseObject类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。