本文整理汇总了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();