| 1 |
<?php |
| 2 |
|
| 3 |
namespace ImportWP\Common\AddonAPI\Exporter; |
| 4 |
|
| 5 |
class ExporterSchema |
| 6 |
{ |
| 7 |
/** |
| 8 |
* @var GroupSchema[] |
| 9 |
*/ |
| 10 |
private $_groups = []; |
| 11 |
|
| 12 |
private $_type; |
| 13 |
|
| 14 |
private $_args = []; |
| 15 |
|
| 16 |
public function __construct($type, $args = []) |
| 17 |
{ |
| 18 |
$this->_type = $type; |
| 19 |
$this->_args = $args; |
| 20 |
} |
| 21 |
|
| 22 |
public function get_type() |
| 23 |
{ |
| 24 |
return $this->_type; |
| 25 |
} |
| 26 |
|
| 27 |
public function get_args() |
| 28 |
{ |
| 29 |
return $this->_args; |
| 30 |
} |
| 31 |
|
| 32 |
public function register_group($name, $id) |
| 33 |
{ |
| 34 |
$group = new GroupSchema($name, $id); |
| 35 |
$this->_groups[] = $group; |
| 36 |
return $group; |
| 37 |
} |
| 38 |
|
| 39 |
public function get_groups() |
| 40 |
{ |
| 41 |
return $this->_groups; |
| 42 |
} |
| 43 |
} |
| 44 |
|