HosipLan

Untitled

Sep 6th, 2011
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. class Objednavka extends Nette\Object
  2. {
  3.     public function setDelivery($delivery)
  4.     {
  5.         $this->values['delivery'] = $delivery;
  6.     }
  7.  
  8.     public function setInvoiceAddress($address)
  9.     {
  10.         $this->values = $address + $this->values;
  11.     }
  12.  
  13.     // ...
  14. }
  15.  
  16.  
  17. public function ObjednavkaSubmitted($form)
  18. {
  19.     $obj = new Objednavka; // nebo nacist z db;
  20.     $obj->setDelivery($form['delivery']->value);
  21.     $obj->setInvoiceAddress($form['invoice_address']->values);
  22.     // ...
  23. }
Advertisement
Add Comment
Please, Sign In to add comment