本文整理匯總了PHP中Facture::setIdutil方法的典型用法代碼示例。如果您正苦於以下問題:PHP Facture::setIdutil方法的具體用法?PHP Facture::setIdutil怎麽用?PHP Facture::setIdutil使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Facture
的用法示例。
在下文中一共展示了Facture::setIdutil方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: recup_facture
public function recup_facture()
{
$requete = $this->_db->prepare('select * from facture where idutil=:idutil and valider=:valider');
$requete->execute(array(':idutil' => $_SESSION['id'], ':valider' => 0));
$results = $requete->fetchAll();
$tabobject = array();
if (empty($results)) {
return false;
} else {
foreach ($results as $result) {
$mafacture = new Facture();
$mafacture->setIdutil($result['idutil'])->setDate($result['date'])->setValider($result['valider'])->setId($result['id']);
array_push($tabobject, $mafacture);
// Push l'objet $article dans le tableau $tabobject
}
return $tabobject;
}
}
示例2: date
/**
* Created by PhpStorm.
* User: Florent
* Date: 14/03/2015
* Time: 10:38
*/
require_once '../bdd/pdo.php';
require_once '../class/Facture.php';
require_once '../class/FactureLignes.php';
require_once '../class/Panier.php';
require_once '../manager/FactureManager.php';
require_once '../manager/PanierManager.php';
session_start();
$date = date("Y/m/d");
$mafacture = new Facture();
$mafacture->setIdutil($_SESSION['id'])->setDate($date)->setValider('N');
$mafacturemanager = new FactureManager($bdd);
$mafacturemanager->insertion_facture($mafacture);
$factures = $mafacturemanager->recup_facture();
foreach ($factures as $facture) {
$idfact = $facture->getId();
$idutil = $facture->getIdutil();
$datefact = $facture->getDate();
$valider = $facture->getValider();
}
$monpanier = new Panier();
$monpaniermanager = new PanierManager($bdd);
$monpaniers = $monpaniermanager->retour_panier();
foreach ($monpaniers as $panier) {
$mafacturelignes = new FactureLignes();
$mafacturelignes->setIdfact($idfact);