DbPatch_Core_Console::getOptionValue PHP Метод

getOptionValue() публичный Метод

public getOptionValue ( string $option, string $default = '' ) : string
$option string
$default string
Результат string
    public function getOptionValue($option, $default = '')
    {
        if (array_key_exists($option, $this->options)) {
            return $this->options[$option];
        }
        return $default;
    }

Usage Example

Пример #1
0
 public function testBoolOptions()
 {
     $argv = array('./dbpatch.php', 'update', '--force=true', '--skip=false');
     $console = new DbPatch_Core_Console($argv);
     $this->assertTrue($console->getOptionValue('force'));
     $this->assertFalse($console->getOptionValue('skip'));
 }
All Usage Examples Of DbPatch_Core_Console::getOptionValue