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


PHP Activity::setType方法代码示例

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


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

示例1: createFromXML

 /**
  * Convert the raw XML into an object
  *
  * @param \SimpleXMLElement $xml
  * @return Activity
  */
 public static function createFromXML(\SimpleXMLElement $xml)
 {
     $activity = new Activity();
     if (isset($xml->attributes()['count'])) {
         $activity->setCount((int) $xml->attributes()['count']);
     }
     if (isset($xml->attributes()['type'])) {
         $activity->setType((string) $xml->attributes()['type']);
     }
     return $activity;
 }
开发者ID:tijsverkoyen,项目名称:uitdatabank,代码行数:17,代码来源:Activity.php

示例2: getActivity

 function getActivity($activity_id)
 {
     $query = "select * from `" . GALAXIA_TABLE_PREFIX . "activities` where `activity_id`=?";
     $result = $this->mDb->query($query, array($activity_id));
     if (!$result->numRows()) {
         return false;
     }
     $res = $result->fetchRow();
     switch ($res['act_type']) {
         case 'start':
             $act = new Start();
             break;
         case 'end':
             $act = new End();
             break;
         case 'join':
             $act = new Join();
             break;
         case 'split':
             $act = new Split();
             break;
         case 'standalone':
             $act = new Standalone();
             break;
         case 'switch':
             $act = new SwitchActivity();
             break;
         case 'activity':
             $act = new Activity();
             break;
         default:
             trigger_error('Unknown activity type:' . $res['act_type'], E_USER_WARNING);
     }
     $act->setName($res['name']);
     $act->setProcessId($res['p_id']);
     $act->setNormalizedName($res['normalized_name']);
     $act->setDescription($res['description']);
     $act->setIsInteractive($res['is_interactive']);
     $act->setIsAutoRouted($res['is_auto_routed']);
     $act->setActivityId($res['activity_id']);
     $act->setType($res['act_type']);
     //Now get forward transitions
     //Now get backward transitions
     //Now get roles
     $query = "select `role_id` from `" . GALAXIA_TABLE_PREFIX . "activity_roles` where `activity_id`=?";
     $result = $this->mDb->query($query, array($res['activity_id']));
     while ($res = $result->fetchRow()) {
         $this->roles[] = $res['role_id'];
     }
     $act->setRoles($this->roles);
     return $act;
 }
开发者ID:bitweaver,项目名称:galaxia,代码行数:52,代码来源:BaseActivity.php

示例3: fire

 /**
  * This function never fails.
  */
 protected static function fire($type)
 {
     try {
         $activity = new Activity();
         try {
             $activity->setProfileId(UserHelper::getProfileId());
         } catch (fException $e) {
             $activity->setProfileId(NULL);
         }
         $activity->setRealname(UserHelper::getDisplayName());
         $activity->setType($type);
         $activity->store();
     } catch (Exception $e) {
         // do nothing
     }
 }
开发者ID:daerduoCarey,项目名称:xiaoyou,代码行数:19,代码来源:Activity.php

示例4: listActivities

		/**
		* Public function that Gets a list of first 50 Activities in the account
		* 
		* @return array $allActivities - array of two arrays, array 1 is activity objects, array 2 is link for next 50 activities
		*/
		public function listActivities()
		{
			$utility = new Utility();
			$return = $utility->httpGet($utility->getApiPath() . '/ws/customers/'. $utility->getLogin() .'/activities');
			$allActivities = array();
			
			$activityList = array();
			$pages = array();

			$parsedReturn = simplexml_load_string($return['xml']);
			
			foreach ($parsedReturn->entry as $item)
			{
				$activity = new Activity();
				$activity->setLink($item->link['href']);
				$activity->setId($item->id);
				$activity->setActivityTitle($item->content->title);
				$activity->setType($item->content->Activity->Type);
				$activity->setStatus($item->content->Activity->Status);
				$activity->setTransactionCount($item->content->Activity->TransactionCount);
				$activity->setErrorCount($item->content->Activity->Errors);
				$activity->setRunStartTime($item->content->Activity->RunStartTime);
				$activity->setRunFinishTime($item->content->Activity->RunFinishTime);
				$activity->setInsertTime($item->content->Activity->InsertTime);
				
				$activityList[] = $activity;
			}

			if ($parsedReturn->link[2])
			{
				$pages[] = $parsedReturn->link[2]->Attributes()->href;
			}
			
			$allActivities = array($activityList, $pages);
			
			return $allActivities;
		}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:42,代码来源:ctctWrapper.php


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