Version 1
[yaffs-website] / vendor / consolidation / annotated-command / src / AnnotationData.php
diff --git a/vendor/consolidation/annotated-command/src/AnnotationData.php b/vendor/consolidation/annotated-command/src/AnnotationData.php
new file mode 100644 (file)
index 0000000..0bcc8b2
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+namespace Consolidation\AnnotatedCommand;
+
+use Consolidation\AnnotatedCommand\Parser\Internal\CsvUtils;
+
+class AnnotationData extends \ArrayObject
+{
+    public function get($key, $default = '')
+    {
+        return $this->has($key) ? CsvUtils::toString($this[$key]) : $default;
+    }
+
+    public function getList($key, $default = [])
+    {
+        return $this->has($key) ? CsvUtils::toList($this[$key]) : $default;
+    }
+
+    public function has($key)
+    {
+        return isset($this[$key]);
+    }
+
+    public function keys()
+    {
+        return array_keys($this->getArrayCopy());
+    }
+}