本文整理匯總了PHP中validation::instance方法的典型用法代碼示例。如果您正苦於以下問題:PHP validation::instance方法的具體用法?PHP validation::instance怎麽用?PHP validation::instance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類validation
的用法示例。
在下文中一共展示了validation::instance方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: validation
/**
* Short description of method instance
*
* @access public
* @author Jean-Francois Levesque, <jf.levesque@step.polymtl.ca>
* @return void
*/
public static function &instance()
{
if (!validation::$instance) {
validation::$instance = new validation();
}
return validation::$instance;
}
示例2: error_reporting
<?php
error_reporting(E_ALL);
require_once "class.authentification.php";
require_once 'class.config.php';
require_once "class.demandeListe.php";
require_once "class.demande.php";
require_once "class.log.php";
require_once "class.validation.php";
require_once "class.userData.php";
require_once "class.car.php";
define('CANCEL_DEMAND_POST', 'cancelDemand');
define('REACTIVATE_DEMAND_POST', 'reactivateDemand');
$objAuth = authentification::instance();
$objLog = log::instance();
$objvalid = validation::instance();
$objDemandeListe = new demandeListe();
$objDemande = null;
$fileFieldIndex = 0;
if ($objAuth->estIdentifie()) {
$matricule = $_SESSION['usager'];
$submissionTarget = util::getParam($_POST, 'submissionTarget');
$submissionType = util::getParam($_POST, 'submissionType');
$demande = new demande($matricule);
if ($submissionTarget == 'demande') {
if ($submissionType == CANCEL_DEMAND_POST) {
$demande->cancelDemand();
header("Location: demande.php");
} else {
if ($submissionType == REACTIVATE_DEMAND_POST) {
$demande->reactivateDemand();