コード例 #1
0
 protected function getActionChain()
 {
     $actionChains = array();
     // 设置actionChain
     $actionChain1 = new ActionChain();
     $actionChain1->set_actionId(1);
     $actionChain1->set_type(ActionChainType::refer);
     $actionChain1->set_next(10000);
     //通知
     $actionChain2 = new ActionChain();
     $actionChain2->set_actionId(10000);
     $actionChain2->set_type(ActionChainType::notification);
     $actionChain2->set_title($this->title);
     $actionChain2->set_text($this->text);
     $actionChain2->set_logo($this->logo);
     $actionChain2->set_logoURL($this->logoURL);
     $actionChain2->set_ring($this->isRing ? true : false);
     $actionChain2->set_clearable($this->isClearable ? true : false);
     $actionChain2->set_buzz($this->isVibrate ? true : false);
     $actionChain2->set_next(10010);
     //goto
     $actionChain3 = new ActionChain();
     $actionChain3->set_actionId(10010);
     $actionChain3->set_type(ActionChainType::refer);
     $actionChain3->set_next(10030);
     //appStartUp
     $appStartUp = new AppStartUp();
     $appStartUp->set_android("");
     $appStartUp->set_symbia("");
     $appStartUp->set_ios("");
     //启动app
     $actionChain4 = new ActionChain();
     $actionChain4->set_actionId(10030);
     $actionChain4->set_type(ActionChainType::startapp);
     $actionChain4->set_appid("");
     $actionChain4->set_autostart($this->transmissionType == '1' ? true : false);
     $actionChain4->set_appstartupid($appStartUp);
     $actionChain4->set_failedAction(100);
     $actionChain4->set_next(100);
     //结束
     $actionChain5 = new ActionChain();
     $actionChain5->set_actionId(100);
     $actionChain5->set_type(ActionChainType::eoa);
     array_push($actionChains, $actionChain1, $actionChain2, $actionChain3, $actionChain4, $actionChain5);
     return $actionChains;
 }
コード例 #2
0
ファイル: LinkTemplate.php プロジェクト: imikay/igetui
 protected function getActionChain()
 {
     $actionChains = array();
     // 设置actionChain
     $actionChain1 = new ActionChain();
     $actionChain1->set_actionId(1);
     $actionChain1->set_type(ActionChainType::refer);
     $actionChain1->set_next(10000);
     //通知
     $actionChain2 = new ActionChain();
     $actionChain2->set_actionId(10000);
     $actionChain2->set_type(ActionChainType::notification);
     $actionChain2->set_title($this->title);
     $actionChain2->set_text($this->text);
     $actionChain2->set_logo($this->logo);
     $actionChain2->set_logoURL($this->logoURL);
     $actionChain2->set_ring($this->isRing ? true : false);
     $actionChain2->set_clearable($this->isClearable ? true : false);
     $actionChain2->set_buzz($this->isVibrate ? true : false);
     $actionChain2->set_next(10010);
     //goto
     $actionChain3 = new ActionChain();
     $actionChain3->set_actionId(10010);
     $actionChain3->set_type(ActionChainType::refer);
     $actionChain3->set_next(10030);
     //启动web
     $actionChain4 = new ActionChain();
     $actionChain4->set_actionId(10030);
     $actionChain4->set_type(ActionChainType::startweb);
     $actionChain4->set_url($this->url);
     $actionChain4->set_next(100);
     //结束
     $actionChain5 = new ActionChain();
     $actionChain5->set_actionId(100);
     $actionChain5->set_type(ActionChainType::eoa);
     array_push($actionChains, $actionChain1, $actionChain2, $actionChain3, $actionChain4, $actionChain5);
     return $actionChains;
 }