本文整理汇总了PHP中Service::getServices方法的典型用法代码示例。如果您正苦于以下问题:PHP Service::getServices方法的具体用法?PHP Service::getServices怎么用?PHP Service::getServices使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Service
的用法示例。
在下文中一共展示了Service::getServices方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listServicesAction
public function listServicesAction()
{
$rows = array();
$services = Service::getServices();
foreach ($services as $service) {
$tmp = array();
$tmp['id'] = $service['id'];
$tmp['data'][] = $service['name'];
$tmp['data'][] = $service['status'];
$rows[] = $tmp;
}
$memcache = Zend_Registry::get('memcache');
$serviceNominal = $memcache->get(Service::SERVICE_NOMINAL);
$rows[0]['userdata']['serviceNominal'] = $serviceNominal;
$json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
$json->suppressExit = true;
$json->direct(array('rows' => $rows));
}
示例2: echo
/services/DB.php?FLAG=DELSELECT">
<table class="table table-striped table-bordered table-hover" id="sample_1">
<thead>
<tr>
<th class="table-checkbox"><input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes"/></th>
<th>Service Name</th>
<th>Price</th>
<th>Service Time</th>
<th>Description</th>
<th>Date Created</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$results = Service::getServices();
if (count($results) > 0) {
for ($index = 0; $index < count($results); $index++) {
$rows = $results[$index];
?>
<tr class="<?php
echo ($index + 1) % 2 == 0 ? 'even' : 'odd';
?>
gradeX">
<td> <input name="delete[]" type="checkbox" id="delete[]" value="<?php
echo $rows['id'];
?>
" class="checkboxes" /> </td>
<td><?php
echo $general->subStr($rows['servicename'], 60);
?>
示例3: pharmacyDownload
}
public function pharmacyDownload($args)
{
$daily = 0;
// default to full sync
if (isset($args[0])) {
$daily = (int) $args[0];
}
$ret = Pharmacy::activateDownload($daily);
if (strlen($ret['error']) > 0) {
// error
echo $ret['error'];
return false;
}
$filename = Pharmacy::downloadPharmacy($ret['downloadUrl'], $ret['cookieFile']);
$counter = Pharmacy::loadPharmacy($filename);
return true;
}
}
set_error_handler(create_function('$errno,$errstr', 'return true;'));
$script = ScriptService::getInstance();
$methodName = trim($argv[1]);
if (method_exists($script, $methodName)) {
echo 'Processing ' . $methodName . '... ';
$script->{$methodName}(array_slice($argv, 2));
Service::getServices();
// set nominal service
echo 'done.' . PHP_EOL;
} else {
die("Argument {$methodName} is invalid.\n");
}