Advertisement
Guest User

Untitled

a guest
Aug 24th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Classes;
  4.  
  5. class OrderForm {
  6.  
  7. private $action = '';
  8. private $method = 'post';
  9. private $fields = null;
  10. private $errors = [];
  11.  
  12. public function __construct() {
  13. $this->fields = (new OrderFields())->get();
  14. lex_print($this->fields);
  15.  
  16. }
  17.  
  18. public function getField($key) {
  19. return $this->fields[$key];
  20. }
  21. public function getAction() {
  22. return $this->action;
  23. }
  24. public function getMethod() {
  25. return $this->method;
  26. }
  27. public function getFields() {
  28. return $this->fields;
  29. }
  30. public function getErrors() {
  31. return $this->errors;
  32. }
  33. public function hasErrors() {
  34. return !empty($this->errors);
  35. }
  36.  
  37. public function onSuccess() {
  38.  
  39. }
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement