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


PHP AppletInstance::getValue方法代码示例

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


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

示例1: __construct

 public function __construct($settings = array())
 {
     $this->response = new TwimlResponse();
     $this->cookie_name = 'state-' . AppletInstance::getInstanceId();
     $this->version = AppletInstance::getValue('version', null);
     $this->callerId = AppletInstance::getValue('callerId', null);
     if (empty($this->callerId) && !empty($_REQUEST['From'])) {
         $this->callerId = $_REQUEST['From'];
     }
     /* Get current instance	 */
     $this->dial_whom_selector = AppletInstance::getValue('dial-whom-selector');
     $this->dial_whom_user_or_group = AppletInstance::getUserGroupPickerValue('dial-whom-user-or-group');
     $this->dial_whom_number = AppletInstance::getValue('dial-whom-number');
     $this->no_answer_action = AppletInstance::getValue('no-answer-action', 'hangup');
     $this->no_answer_group_voicemail = AppletInstance::getAudioSpeechPickerValue('no-answer-group-voicemail');
     $this->no_answer_redirect = AppletInstance::getDropZoneUrl('no-answer-redirect');
     $this->no_answer_redirect_number = AppletInstance::getDropZoneUrl('no-answer-redirect-number');
     $this->dial_whom_instance = get_class($this->dial_whom_user_or_group);
     if (count($settings)) {
         foreach ($settings as $setting => $value) {
             if (isset($this->{$setting})) {
                 $this->{$setting} = $value;
             }
         }
     }
 }
开发者ID:ryanlarrabure,项目名称:OpenVBX,代码行数:26,代码来源:TwimlDial.php

示例2: verify_day

function verify_day($key, $today)
{
    $sunday = AppletInstance::getValue('sunday[]');
    $monday = AppletInstance::getValue('monday[]');
    $tuesday = AppletInstance::getValue('tuesday[]');
    $wednesday = AppletInstance::getValue('wednesday[]');
    $thursday = AppletInstance::getValue('thursday[]');
    $friday = AppletInstance::getValue('friday[]');
    $saturday = AppletInstance::getValue('saturday[]');
    $days = array(0 => is_array($sunday) && array_key_exists($key, $sunday) ? $sunday[$key] : $sunday, 1 => is_array($monday) && array_key_exists($key, $monday) ? $monday[$key] : $monday, 2 => is_array($tuesday) && array_key_exists($key, $tuesday) ? $tuesday[$key] : $tuesday, 3 => is_array($wednesday) && array_key_exists($key, $wednesday) ? $wednesday[$key] : $wednesday, 4 => is_array($thursday) && array_key_exists($key, $thursday) ? $thursday[$key] : $thursday, 5 => is_array($friday) && array_key_exists($key, $friday) ? $friday[$key] : $friday, 6 => is_array($saturday) && array_key_exists($key, $saturday) ? $saturday[$key] : $saturday);
    return $days[$today];
}
开发者ID:e6,项目名称:OpenVBX-Plugin-Scheduling,代码行数:12,代码来源:twiml.php

示例3: day_check

function day_check($day, $key)
{
    $value = AppletInstance::getValue($day);
    if (count($value) > 1) {
        if ($value[$key] == "true") {
            return "selected";
        }
    } elseif (count($value) == "true") {
        if ($value == 1) {
            return "selected";
        }
    } else {
        return "failed";
    }
}
开发者ID:digvijay88,项目名称:OpenVBX-Plugin-Scheduling,代码行数:15,代码来源:ui.php

示例4: __construct

 public function __construct()
 {
     $this->response = new Response();
     $this->cookie_name = 'state-' . AppletInstance::getInstanceId();
     $this->version = AppletInstance::getValue('version', null);
     $this->callerId = AppletInstance::getValue('callerId', null);
     if (empty($this->callerId)) {
         $this->callerId = $_REQUEST['From'];
     }
     /* Get current instance	 */
     $this->dial_whom_selector = AppletInstance::getValue('dial-whom-selector');
     $this->dial_whom_user_or_group = AppletInstance::getUserGroupPickerValue('dial-whom-user-or-group');
     $this->dial_whom_number = AppletInstance::getValue('dial-whom-number');
     $this->no_answer_action = AppletInstance::getValue('no-answer-action', 'hangup');
     $this->no_answer_group_voicemail = AppletInstance::getAudioSpeechPickerValue('no-answer-group-voicemail');
     $this->no_answer_redirect = AppletInstance::getDropZoneUrl('no-answer-redirect');
     $this->no_answer_redirect_number = AppletInstance::getDropZoneUrl('no-answer-redirect-number');
 }
开发者ID:JeffaCubed,项目名称:OpenVBX,代码行数:18,代码来源:TwimlDial.php

示例5: get_instance

<?php

$user = OpenVBX::getCurrentUser();
$tenant_id = $user->values['tenant_id'];
$ci =& get_instance();
$queries = explode(';', file_get_contents(dirname(dirname(dirname(__FILE__))) . '/db.sql'));
foreach ($queries as $query) {
    if (trim($query)) {
        $ci->db->query($query);
    }
}
$polls = $ci->db->query(sprintf('SELECT id, name FROM polls WHERE tenant=%d', $tenant_id))->result();
$poll = AppletInstance::getValue('poll');
$poll = $poll ? $poll : count($polls) ? $polls[0]->id : null;
$options = json_decode($ci->db->query(sprintf('SELECT data FROM polls WHERE tenant=%d AND id=%d', $tenant_id, $poll))->row()->data);
$option = AppletInstance::getValue('option');
?>
<div class="vbx-applet vbx-polls">
<?php 
if (count($polls)) {
    ?>
	<div class="vbx-full-pane">
		<h3>Poll</h3>
		<fieldset class="vbx-input-container">
				<select class="medium" name="poll">
<?php 
    foreach ($polls as $p) {
        ?>
					<option value="<?php 
        echo $p->id;
        ?>
开发者ID:jsoncorwin,项目名称:OpenVBX-Plugin-Polls,代码行数:31,代码来源:ui.php

示例6: get_instance

<?php

$ci =& get_instance();
$moderator = AppletInstance::getUserGroupPickerValue('moderator');
$confId = AppletInstance::getValue('conf-id');
$confName = AppletInstance::getInstanceId() . $confId;
$caller = normalize_phone_to_E164(isset($_REQUEST['From']) ? $ci->input->get_post('From') : '');
$isModerator = false;
$defaultWaitUrl = 'http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient';
$waitUrl = AppletInstance::getValue('wait-url', $defaultWaitUrl);
$record = AppletInstance::getValue('record', 'do-not-record');
$hasModerator = false;
if (!is_null($moderator)) {
    $hasModerator = true;
    switch (get_class($moderator)) {
        case 'VBX_User':
            foreach ($moderator->devices as $device) {
                if ($device->value == $caller) {
                    $isModerator = true;
                }
            }
            break;
        case 'VBX_Group':
            foreach ($moderator->users as $user) {
                $user = VBX_User::get($user->user_id);
                foreach ($user->devices as $device) {
                    if ($device->value == $caller) {
                        $isModerator = true;
                    }
                }
            }
开发者ID:wiserweb,项目名称:OpenVBX,代码行数:31,代码来源:twiml.php

示例7: array

if (!empty($orderid)) {
    $settings = PluginData::get('orders', array('keys' => array(), 'status' => array()));
    $statusArray = array('shipped' => 'Shipped', 'fullfillment' => 'Sent to Fullfillment', 'processing' => 'Processing');
    $s = '';
    $keys = $settings->keys;
    $status = $settings->status;
    foreach ($keys as $i => $key) {
        if ($key == $orderid) {
            $s = $statusArray[$status[$i]];
            break;
        }
    }
    if ($s != '') {
        $response->say("Your order is marked as {$s}.", $prefs);
        if (AppletInstance::getFlowType() == 'voice') {
            $next = AppletInstance::getDropZoneUrl('next');
            if (!empty($next)) {
                $response->redirect($next);
            }
        }
    } else {
        $response->say("We could not find your order.", $prefs);
    }
} elseif ($flow_type == 'voice') {
    $gather = $response->gather(array('numDigits' => 5));
    $gather->say(AppletInstance::getValue('prompt-text'), $prefs);
    $response->redirect();
} elseif ($flow_type != 'voice') {
    $response->say(AppletInstance::getValue('prompt-text'));
}
$response->respond();
开发者ID:HighTechTorres,项目名称:TwilioCookbook,代码行数:31,代码来源:twiml.php

示例8:

		</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>
	</div>
	<h2>Next</h2>
	<p>After sending the message, continue to the next applet</p>
	<div class="vbx-full-pane">
		<?php 
    echo AppletUI::DropZone('next');
    ?>
	</div>
<?php 
} else {
    ?>
	<div class="vbx-full-pane">
开发者ID:afreeth,项目名称:OpenVBX-Plugin-Outbound,代码行数:31,代码来源:ui.php

示例9: foreach

    ?>
</em></p>

	<div class="vbx-full-pane">
<?php 
    foreach ($days as $index => $day) {
        ?>
		<div class="timing-timerange-wrap">
			<label><?php 
        print $day;
        ?>
</label>
<?php 
        $state = AppletInstance::getValue("range_{$index}_from", '') ? 'remove' : 'add';
        $default = $index < 5 ? '09:00AM' : '';
        echo AppletUI::timeRange("range_{$index}", AppletInstance::getValue("range_{$index}_from", $default), AppletInstance::getValue("range_{$index}_to", '05:00PM'), $day);
        ?>
			<a href="#" class="timing-<?php 
        echo $state;
        ?>
"><?php 
        echo $state;
        ?>
</a>
			<br class="clear"/>
		</div>
<?php 
    }
    ?>
	</div>
开发者ID:hharrysidhu,项目名称:OpenVBX,代码行数:30,代码来源:ui.php

示例10: array

<?php

$defaultNumberOfChoices = 4;
$venues = AppletInstance::getValue('venues[]', array('1', '2', '3', '4'));
if (count($venues) == 0) {
    $venues = array('1', '2', '3', '4');
}
$venue_options = AppletInstance::getValue('venue-options[]');
?>

<div class="vbx-applet 4sq-venue-applet">

		<h2>FourSquare Options</h2>
		<p>To get the Venue ID for your favorite checkins, log in to foursquare.com, click on History
			and then click on the venue.  You should see the URL your browser is pointed at looks like 
			http://foursquare.com/venue/100281 and that 100281 is the Venue ID to use</p>

		<p>Click <a href="http://foursquare.com/history" target="_new">Here </a>to see your History</p>
		<h3>User Selection</h3>
		<p>Choose which VBX user to use for controlling this Applet with their 4sq checkins</p>
		<?php 
echo AppletUI::UserGroupPicker('4sq-venue-controller');
?>
		

		<table class="vbx-menu-grid options-table">
			<thead>
				<tr>
					<td>Venue ID</td>
					<td>&nbsp;</td>
					<td>Applet</td>
开发者ID:andrewwatson,项目名称:FourSquare-VBX-Plugin,代码行数:31,代码来源:ui.php

示例11:



<div class="vbx-applet openvbx-zendesk-applet">
    <h2>This applet creates a ticket in ZenDesk for calls</h2>
    <p>Enter in the URL subdomain you use for Desk</p>
    <textarea class="small" name="subdomain"><?php 
echo AppletInstance::getValue('subdomain');
?>
</textarea>
    <p>Enter in the ZenDesk API Token</p>
    <textarea class="small" name="apitoken"><?php 
echo AppletInstance::getValue('apitoken');
?>
</textarea>
   <p>Enter in the email address</p>
    <textarea class="small" name="email"><?php 
echo AppletInstance::getValue('email');
?>
</textarea>

 <br />
    <h2> Select An Action for The Caller</h2>
    <?php 
echo AppletUI::DropZone('primary');
?>
</div>

开发者ID:madamkirsty,项目名称:openvbx-zendesk-applet,代码行数:24,代码来源:ui.php

示例12: get_instance

<?php

$ci =& get_instance();
$moderator = AppletInstance::getUserGroupPickerValue('moderator');
$confId = AppletInstance::getValue('conf-id');
$confName = AppletInstance::getInstanceId() . $confId;
$caller = normalize_phone_to_E164(isset($_REQUEST['From']) ? $ci->input->get_post('From') : '');
$isModerator = false;
$defaultWaitUrl = 'http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient';
$waitUrl = AppletInstance::getValue('wait-url', $defaultWaitUrl);
$hasModerator = false;
if (!is_null($moderator)) {
    $hasModerator = true;
    switch (get_class($moderator)) {
        case 'VBX_User':
            foreach ($moderator->devices as $device) {
                if ($device->value == $caller) {
                    $isModerator = true;
                }
            }
            break;
        case 'VBX_Group':
            foreach ($moderator->users as $user) {
                $user = VBX_User::get($user->user_id);
                foreach ($user->devices as $device) {
                    if ($device->value == $caller) {
                        $isModerator = true;
                    }
                }
            }
            break;
开发者ID:hharrysidhu,项目名称:OpenVBX,代码行数:31,代码来源:twiml.php

示例13: array

<?php

$defaultNumberOfChoices = 2;
$keys = (array) AppletInstance::getValue('keys[]', array('1' => '', '2' => ''));
$responses = (array) AppletInstance::getValue('responses[]');
?>

<div class="vbx-applet regex-applet">

		<h2>RegEx Options</h2>
		<table class="vbx-menu-grid options-table">
			<thead>
				<tr>
					<td>RegEx</td>
					<td>&nbsp;</td>
					<td>Applet</td>
					<td>Add &amp; Remove</td>
				</tr>
			</thead>
			<tfoot>
				<tr class="hide">
					<td>
						<fieldset class="vbx-input-container">
							<input class="keypress small" type="text" name="new-keys[]" value="" autocomplete="off" />
						</fieldset>
					</td>
					<td>then</td>
					<td>
						<?php 
echo AppletUI::dropZone('new-responses[]', 'Drop applet here');
?>
开发者ID:mymizan,项目名称:OpenVBX-Plugin-Match,代码行数:31,代码来源:ui.php

示例14:

					<td>
						<a href="" class="add action"><span class="replace">Add</span></a> <a href="" class="remove action"><span class="replace">Remove</span></a>
					</td>
				</tr>
				<?php 
}
?>
			</tbody>
		</table><!-- .vbx-menu-grid -->

		<h3>Do you want to repeat the menu back?</h3>
		<div class="vbx-full-pane">
			<p>Repeat the menu back to the caller.  Enter zero if you do not want the menu to repeat.</p>
			<fieldset class="vbx-input-complex vbx-input-container">
				<input type="text" name="repeat-count" class="left tiny" value="<?php 
echo AppletInstance::getValue('repeat-count', 3);
?>
" />
				<label class="field-label-left">time(s)</label>
			</fieldset>
		</div>

		<h3>When the caller didn't enter anything after the menu...</h3>
		<div class="vbx-full-pane">
			<fieldset class="vbx-input-complex vbx-input-container">
				<p>Redirect the caller to another applet.</p>
				<?php 
echo AppletUI::DropZone('next');
?>
			</fieldset>
		</div><!-- .vbx-split-pane -->
开发者ID:howethomas,项目名称:OpenVBX,代码行数:31,代码来源:ui.php

示例15: get_instance

<?php

$user = OpenVBX::getCurrentUser();
$tenant_id = $user->values['tenant_id'];
$ci =& get_instance();
$selected = AppletInstance::getValue('list');
$action = AppletInstance::getValue('action');
$queries = explode(';', file_get_contents(dirname(dirname(dirname(__FILE__))) . '/db.sql'));
foreach ($queries as $query) {
    if (trim($query)) {
        $ci->db->query($query);
    }
}
$lists = $ci->db->query(sprintf('SELECT id, name FROM subscribers_lists WHERE tenant = %d', $tenant_id))->result();
?>
<div class="vbx-applet">
<?php 
if (count($lists)) {
    ?>
	<div class="vbx-full-pane">
		<h3>Subscription</h3>
		<fieldset class="vbx-input-container">
				<select class="medium" name="list">
<?php 
    foreach ($lists as $list) {
        ?>
					<option value="<?php 
        echo $list->id;
        ?>
"<?php 
        echo $list->id == $selected ? ' selected="selected" ' : '';
开发者ID:KillerDesigner,项目名称:OpenVBX-Plugin-Subscriptions,代码行数:31,代码来源:ui.php


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