本文整理匯總了PHP中Universe::displayOrdinaryBaskets方法的典型用法代碼示例。如果您正苦於以下問題:PHP Universe::displayOrdinaryBaskets方法的具體用法?PHP Universe::displayOrdinaryBaskets怎麽用?PHP Universe::displayOrdinaryBaskets使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Universe
的用法示例。
在下文中一共展示了Universe::displayOrdinaryBaskets方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: unset
$root_dir = $_SERVER['DOCUMENT_ROOT'] . '/Balls';
require_once $root_dir . '/Classes/ball.class.php';
require_once $root_dir . '/Classes/basket.class.php';
require_once $root_dir . '/Classes/ordinaryBasket.class.php';
require_once $root_dir . '/Classes/output.class.php';
require_once $root_dir . '/Classes/resultOutput.class.php';
require_once $root_dir . '/Classes/standardOutput.class.php';
require_once $root_dir . '/Classes/universe.class.php';
require_once $root_dir . '/Classes/userBasket.class.php';
if (isset($_POST['back'])) {
unset($_POST);
$output = new standardOutput();
$output->renderStandardView();
} elseif ($_SERVER['REQUEST_METHOD'] == 'POST') {
$universe = new Universe();
$basketsContent = $universe->displayOrdinaryBaskets();
if (preg_match('/^[0-9]{1,3}$/', $_POST['usersBasketAmount'])) {
if ($_POST['usersBasketAmount'] >= 1 and $_POST['usersBasketAmount'] <= 100) {
$userBasketContent = $universe->generateUserBasket($_POST['usersBasketAmount']);
} else {
$error = true;
}
} else {
if ($_POST['usersBasketAmount'] != '') {
$error = true;
} else {
$userBasketContent = $universe->generateUserBasket();
}
}
if (!isset($error)) {
$taskB = $universe->checkTaskB();