Version 1
[yaffs-website] / vendor / consolidation / annotated-command / src / AnnotationData.php
1 <?php
2 namespace Consolidation\AnnotatedCommand;
3
4 use Consolidation\AnnotatedCommand\Parser\Internal\CsvUtils;
5
6 class AnnotationData extends \ArrayObject
7 {
8     public function get($key, $default = '')
9     {
10         return $this->has($key) ? CsvUtils::toString($this[$key]) : $default;
11     }
12
13     public function getList($key, $default = [])
14     {
15         return $this->has($key) ? CsvUtils::toList($this[$key]) : $default;
16     }
17
18     public function has($key)
19     {
20         return isset($this[$key]);
21     }
22
23     public function keys()
24     {
25         return array_keys($this->getArrayCopy());
26     }
27 }