1: <?php
2:
3: class FieldRowDefinition {
4:
5: public function __construct($fields) {
6: if (!is_array($fields)) {
7: throw new InvalidArgumentException('Argument "$fields" is not a array');
8: }
9: foreach($fields as $i => $field) {
10: if (!($field instanceof FieldDefinition)) {
11: throw new InvalidArgumentException("Argument \"\$fields[$i]\" is not a FieldDefinition instance");
12: }
13: }
14: $this->fields = $fields;
15: }
16:
17: /**
18: *
19: * @return FieldDefinition[]
20: */
21: public function getFields() {
22: return $this->fields;
23: }
24:
25: }
26: