
| Current Path : /var/www/html_old/abi/vendor/consolidation/annotated-command/src/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html_old/abi/vendor/consolidation/annotated-command/src/AnnotationData.php |
<?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());
}
public function set($key, $value = '')
{
$this->offsetSet($key, $value);
return $this;
}
public function append($key, $value = '')
{
$data = $this->offsetGet($key);
if (is_array($data)) {
$this->offsetSet($key, array_merge($data, $value));
} elseif (is_scalar($data)) {
$this->offsetSet($key, $data . $value);
}
return $this;
}
}