本文整理汇总了PHP中AppletInstance::getFlowType方法的典型用法代码示例。如果您正苦于以下问题:PHP AppletInstance::getFlowType方法的具体用法?PHP AppletInstance::getFlowType怎么用?PHP AppletInstance::getFlowType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppletInstance
的用法示例。
在下文中一共展示了AppletInstance::getFlowType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
</option>
<?php
}
?>
</select>
</fieldset>
<h3>Recipient</h3>
<fieldset class="vbx-input-container">
<input type="text" name="recipient" class="medium" value="<?php
echo AppletInstance::getValue('recipient');
?>
" />
</fieldset>
<h3>Message</h3>
<?php
if (AppletInstance::getFlowType() == 'voice') {
?>
<p>Use %caller% to substitute the caller's number or %number% for the number called.</p>
<?php
} else {
?>
<p>Use %sender% to substitute the sender's number, %number% for the number texted or %body% for the message body.</p>
<?php
}
?>
<fieldset class="vbx-input-container">
<textarea name="sms" class="medium"><?php
echo AppletInstance::getValue('sms');
?>
</textarea>
</fieldset>
示例2:
<?php
$flow_type = AppletInstance::getFlowType();
$vp = AppletInstance::getValue('prompt-text');
?>
<div class="vbx-applet monkey-applet">
<h2>Order Tracking</h2>
<p>Enter a custom message that your callers will be greeted by.</p>
<textarea class="medium" name="prompt-text"><?php
echo !empty($vp) ? AppletInstance::getValue('prompt-text') : 'Please enter your order id';
?>
</textarea>
<?php
if ($flow_type == 'voice') {
?>
<br/>
<h2>Next</h2>
<p>After retrieving the order id, continue to the next applet</p>
<div class="vbx-full-pane">
<?php
echo AppletUI::DropZone('next');
?>
</div>
<?php
}
?>
</div>
示例3: get_instance
<?php
$ci =& get_instance();
$poll = AppletInstance::getValue('poll');
$option = AppletInstance::getValue('option');
$number = 'voice' == AppletInstance::getFlowType() ? normalize_phone_to_E164($_REQUEST['Caller']) : normalize_phone_to_E164($_REQUEST['From']);
$ci->db->delete('polls_responses', array('poll' => $poll, 'value' => $number));
$ci->db->insert('polls_responses', array('poll' => $poll, 'value' => $number, 'response' => $option, 'time' => time()));
$response = new Response();
$next = AppletInstance::getDropZoneUrl('next');
if (!empty($next)) {
$response->addRedirect($next);
}
$response->Respond();