| Total Complexity | 5 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class EventSpecification extends Specification |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * 参数列表 |
||
| 22 | * 可以是0到N个,每个参数都由属性组成. |
||
| 23 | * |
||
| 24 | * @var |
||
| 25 | */ |
||
| 26 | protected $arguments; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @throws \MiotApi\Exception\SpecificationErrorException |
||
| 30 | */ |
||
| 31 | public function init() |
||
| 32 | { |
||
| 33 | parent::init(); |
||
| 34 | |||
| 35 | if ($this->has('arguments')) { |
||
|
|
|||
| 36 | $arguments = $this->__get('arguments'); |
||
| 37 | if (!empty($arguments)) { |
||
| 38 | foreach ($arguments as $argument) { |
||
| 39 | $this->arguments[] = new PropertySpecification($argument); |
||
| 40 | } |
||
| 41 | } |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return mixed |
||
| 47 | */ |
||
| 48 | public function getArguments() |
||
| 51 | } |
||
| 52 | } |
||
| 53 |