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


PHP AppletInstance::getFlowType方法代码示例

本文整理汇总了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>
开发者ID:afreeth,项目名称:OpenVBX-Plugin-Outbound,代码行数:31,代码来源:ui.php

示例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>
开发者ID:HighTechTorres,项目名称:TwilioCookbook,代码行数:27,代码来源:ui.php

示例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();
开发者ID:jsoncorwin,项目名称:OpenVBX-Plugin-Polls,代码行数:14,代码来源:twiml.php


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