/** * * @param OnlineTaxe $taxe * Constructor */ public function __construct(OnlineOrderTaxe $taxe = null) { if (null != $taxe) { $this->label = $taxe->getLabel(); $this->type = $taxe->getType(); $this->priority = $taxe->getPriority(); $this->value = $taxe->getValue(); } else { $this->value = 0; $this->type = self::TYPE_NUMERIC; $this->priority = 1; } $this->dtCrea = new \DateTime('now'); }