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


PHP Package::retrievePackage方法代码示例

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


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

示例1: getAllPackages

 public static function getAllPackages()
 {
     $database = new DB();
     $sql = "SELECT * FROM packages";
     $results = $database->select($sql);
     $packages = array();
     foreach ($results as $result) {
         $pkg = new Package();
         $pkg->retrievePackage($result['pkg_id']);
         $packages[] = $pkg;
     }
     return $packages;
 }
开发者ID:JakeDawkins,项目名称:Checkout,代码行数:13,代码来源:Package.php

示例2: Package

if (!securePage(htmlspecialchars($_SERVER['PHP_SELF']))) {
    die;
}
require_once 'models/Gear.php';
require_once 'models/funcs.php';
require_once 'models/Package.php';
if ($_SERVER["REQUEST_METHOD"] == "GET") {
    $pkg_id = test_input($_GET['pkg_id']);
    $pkg = new Package();
    $pkg->retrievePackage($pkg_id);
}
//form submitted
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $pkg_id = test_input($_POST['pkg_id']);
    $pkg = new Package();
    $pkg->retrievePackage($pkg_id);
    //placeholder text in field
    if (empty($_POST['title'])) {
        //$errors[] = "No title provided";
    } else {
        $title = test_input($_POST['title']);
    }
    if (empty($_POST['description'])) {
        $errors[] = "No description provided";
    } else {
        $description = test_input($_POST['description']);
    }
    if (empty($_POST['gear'])) {
        $errors[] = "No gear in package";
    } else {
        $gearList = $_POST['gear'];
开发者ID:JakeDawkins,项目名称:Checkout,代码行数:31,代码来源:edit-package.php

示例3: array

 //collect vars from step 1
 $title = test_input($_POST['title']);
 $description = test_input($_POST['description']);
 $co_start = test_input($_POST['co_start']);
 $co_end = test_input($_POST['co_end']);
 $location = test_input($_POST['location']);
 $dr_number = test_input($_POST['dr_number']);
 //look and see what pkgs are added already
 $preCheck = array();
 //items to precheck if possible based on pkgs
 if (isset($_POST['addedPkgs'])) {
     $addedPkgs = array();
     foreach ($_POST['addedPkgs'] as $pkg) {
         $addedPkgs[] = test_input($pkg);
         $newPkg = new Package();
         $newPkg->retrievePackage($pkg);
         $preCheck = array_merge($preCheck, $newPkg->getGearList());
         unset($newPkg);
     }
     if ($_POST['submit'] != "Next") {
         $step = 1;
     }
     //don't move onto step 3 yet.
 }
 //construct a clean gear list
 $gearList = array();
 $gearToGetQtyFor = array();
 if (isset($_POST['gear'])) {
     foreach ($_POST['gear'] as $gearItem) {
         $gearList[] = test_input($gearItem);
         //if the available qty is > 1, we need to find out
开发者ID:JakeDawkins,项目名称:Checkout,代码行数:31,代码来源:new-checkout.php


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