本文整理汇总了PHP中Package::getPackages方法的典型用法代码示例。如果您正苦于以下问题:PHP Package::getPackages方法的具体用法?PHP Package::getPackages怎么用?PHP Package::getPackages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Package
的用法示例。
在下文中一共展示了Package::getPackages方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testClassesIn
/**
* Returns a list of all classes inside a given package
*
* @param lang.reflect.Package
* @param bool recursive whether to include subpackages
* @return lang.XPClass[]
*/
protected static function testClassesIn(Package $package, $recursive)
{
$r = array();
foreach ($package->getClasses() as $class) {
if (!$class->isSubclassOf('unittest.TestCase') || Modifiers::isAbstract($class->getModifiers())) {
continue;
}
$r[] = $class;
}
if ($recursive) {
foreach ($package->getPackages() as $package) {
$r = array_merge($r, self::testClassesIn($package, $recursive));
}
}
return $r;
}
示例2: array
<th>Package</th>
<th>Date</th>
<th>Time</th>
<th>Venue</th>
<th>Occasion</th>
<th>Theme</th>
<th>No. of Participants</th>
<th>Status</th>
</tr>
<tr>
<td>
<?php
$selPackage = $package->getPackages(array("package_code" => "ASC"), array("package_code" => array($serviceRequestDetails->getPackage_code(), Equal)));
echo $selPackage[0]->getDesc();
?>
</td>
<td>
<?php
echo $serviceRequestDetails->getDate();
?>
</td>
<td>
<?php
echo $serviceRequestDetails->getTime();
?>
</td>
<td>
<?php
示例3: getPackageDetails
public function getPackageDetails()
{
$package = new Package();
return $package->getPackages(array("package_code" => "ASC"), array("package_code" => array($this->package_code, Equal)));
}
示例4: array
if ($serviceRequest->save()) {
$_SESSION["formInput"] = array();
$_POST = array();
$successMessage = "Service Request successfully filed.";
// uncomment if you desire to redirect to same page
//header('Location: '.$_SERVER['PHP_SELF'].'?message='.$successMessage);
//this will redirect to service request list page
header('Location:ServiceRequestList.php ');
die;
} else {
$errorMessage = "Please check fields.";
}
}
}
$package = new Package();
$packages = $package->getPackages();
$packageOptions = "";
$servicePackageInput = isset($_SESSION["formInput"]["package_code"]) ? $_SESSION["formInput"]["package_code"] : "";
foreach ($packages as $package) {
$selected = $servicePackageInput == $package->getCode() ? "selected='selected'" : "";
$default = $selected == "" ? "selected='selected'" : "";
$packageOptions .= "<option value='" . $package->getCode() . "' {$selected}>" . $package->getDesc() . "-P" . $package->getPrice() . "</option>";
}
$packageOptions = '<option value="" ' . $default . '>Select Package</option>' . $packageOptions;
$hourOptions = "";
$serviceHourInput = isset($_SESSION["formInput"]["service_hour"]) ? $_SESSION["formInput"]["service_hour"] : "";
for ($hr = 0; $hr < 24; $hr++) {
$hour = $hr <= 9 ? "0" . $hr : $hr;
$selected = $serviceHourInput == $hour ? "selected='selected'" : "";
$hourOptions .= "<option value=" . $hour . " {$selected} >" . $hour . "</option>";
}
示例5: array
}
if ($isPast && !$isAdmin) {
$filter["service_date"] = array($currentDate, LessThanOrEqual);
} elseif (!$isAdmin) {
$filter["service_date"] = array($currentDate, GreaterThanOrEqual);
}
$serviceRequest = new ServiceRequest();
if ($isAdmin && !$clientID) {
$allServiceRequest = $serviceRequest->getServiceRequest(array("service_date" => "ASC"), $filter);
} elseif ($clientID) {
$allServiceRequest = $serviceRequest->getServiceRequest(array("service_date" => "ASC"), array("client_id" => array($clientID, Equal)));
} else {
$allServiceRequest = $serviceRequest->getServiceRequest(array("service_date" => "ASC"), $filter);
}
$package = new Package();
$allPackages = $package->getPackages();
$packageOption = "";
foreach ($allPackages as $package) {
$packageOption .= "<option value=" . $package->getCode() . ">" . $package->getDesc() . "</option>";
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>Kusina Sa Plaza</title>
<link href="Styles/tables.css" rel="stylesheet" />
<link href="Styles/tables-min.css" rel="stylesheet" />
<link href="Styles/buttons-core-min.css" rel="stylesheet" />
示例6: echo
<thead>
<tr>
<th class="table-checkbox"><input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes"/></th>
<th>Name</th>
<th>Cost</th>
<th>Credits</th>
<!-- <th>Services</th> -->
<th>Service Discount</th>
<th>Product Discount</th>
<th>Date Created</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$results = Package::getPackages();
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['name'], 60);
?>