Pourriez vous m'aider, j'aimerais ajouter un attribut contentInvocie à ma classe:
Code : Tout sélectionner
<?php
namespace Model;
class Invoice{
private $_number;
private $_date;
private $_buyer;
private $_contentInvoice;
private $_total;
public function __construct(){
}
public function getNumber(){
return $this->_number;
}
public function setNumber($number){
if(is_int($number)){
$this->_number = $number;
}
}
public function getDate(){
return $this->_date;
}
public function setDate($newDate){
$this->_date = $newDate;
}
public function getBuyer(){
return $this->_buyer;
}
public function setBuyer(Buyer $buyer){
if($buyer instanceof 'Buyer'){
$this->_buyer = $buyer;
}
}
public function getTotal(){
return $this->_total;
}
public function setTotal($total){
$this->_total = $total;
}
public function getContentInvoice(){
return $this->_contentInvoice;
}
public function setContentInvoice(ContentInvoice $contentInvoice){
if($contentInvoice instanceof 'ContentInvoice'){
$this->_contentInvoice = $contentInvoice;
}
}
}
Merci de votre aide.