本文整理匯總了PHP中OpenVBX::getFlows方法的典型用法代碼示例。如果您正苦於以下問題:PHP OpenVBX::getFlows方法的具體用法?PHP OpenVBX::getFlows怎麽用?PHP OpenVBX::getFlows使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OpenVBX
的用法示例。
在下文中一共展示了OpenVBX::getFlows方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getFlows
public function getFlows()
{
$flows = array();
foreach (OpenVBX::getFlows() as $flow) {
$flows[$flow->values['id']] = $flow->values['name'];
}
return $flows;
}
示例2: md5
$user = OpenVBX::getCurrentUser();
$tenant_id = $user->values['tenant_id'];
if (isset($_POST['id'])) {
$flows = OpenVBX::getFlows(array('id' => $_POST['id'], 'tenant_id' => $tenant_id));
$data = $flows[0]->values['data'];
$sms_data = $flows[0]->values['sms_data'];
$export = md5($data . $sms_data) . ':' . base64_encode($data) . ':' . base64_encode($sms_data);
if (isset($_POST['file'])) {
header('Content-type: text/plain');
header('Content-Disposition: attachment; filename=' . preg_replace('/\\W/', '', $flows[0]->values['name']) . '.ovbx');
echo $export;
die;
}
}
$flows = OpenVBX::getFlows(array('tenant_id' => $tenant_id));
?>
<style>
.vbx-export-flow form {
margin-top: 20px;
}
.vbx-export-flow p {
margin: 10px 0;
padding: 0 20px;
}
.vbx-export-flow h3 {
font-size: 14px;
padding: 0 20px;
margin-top: 20px;
}
</style>
示例3: get_instance
<?php
$ci =& get_instance();
$number = AppletInstance::getValue('number');
$id = AppletInstance::getValue('flow');
if (!empty($_REQUEST['From'])) {
$recipient = normalize_phone_to_E164(str_replace('%sender%', $_REQUEST['From'], AppletInstance::getValue('recipient')));
require_once APPPATH . 'libraries/Services/Twilio.php';
$service = new Services_Twilio($ci->twilio_sid, $ci->twilio_token);
if (($flow = OpenVBX::getFlows(array('id' => $id, 'tenant_id' => $ci->tenant->id))) && $flow[0]->values['data']) {
$service->account->calls->create($number, $recipient, site_url('twiml/start/voice/' . $id));
}
}
$response = new TwimlResponse();
$next = AppletInstance::getDropZoneUrl('next');
if (!empty($next)) {
$response->redirect($next);
}
$response->respond();