GroupSchema.php in Import WP – CSV & XML Import Export for WordPress trunk, at class/Common/AddonAPI/Exporter/GroupSchema.php
| 1 | <?php |
| 2 | |
| 3 | namespace ImportWP\Common\AddonAPI\Exporter; |
| 4 | |
| 5 | class GroupSchema |
| 6 | { |
| 7 | private $_id; |
| 8 | |
| 9 | private $_name; |
| 10 | |
| 11 | private $_fields = []; |
| 12 | |
| 13 | public function __construct($name, $id) |
| 14 | { |
| 15 | $this->_name = $name; |
| 16 | $this->_id = $id; |
| 17 | } |
| 18 | |
| 19 | public function add_field($field) |
| 20 | { |
| 21 | $this->_fields[] = $field; |
| 22 | } |
| 23 | |
| 24 | public function get_fields() |
| 25 | { |
| 26 | return $this->_fields; |
| 27 | } |
| 28 | |
| 29 | public function get_id() |
| 30 | { |
| 31 | return $this->_id; |
| 32 | } |
| 33 | |
| 34 | public function get_name() |
| 35 | { |
| 36 | return $this->_name; |
| 37 | } |
| 38 | } |
| 39 |