for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of CaptainHook
*
* (c) Sebastian Feldmann <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CaptainHook\App\Config;
* Class Options
* @package CaptainHook
* @author Sebastian Feldmann <[email protected]>
* @link https://github.com/captainhookphp/captainhook
* @since Class available since Release 1.0.0
class Options
{
* Map of options
* @var array<string, string>
private $options;
* Options constructor
* @param array<string, string> $options
public function __construct(array $options)
$this->options = $options;
}
* Return a option value
* @param string $name
* @param mixed $default
* @return mixed
public function get(string $name, $default = null)
return isset($this->options[$name]) ? $this->options[$name] : $default;
* Return all options
* @return array
public function getAll(): array
return $this->options;