JamesMoss\Flywheel\Config::getOption PHP Метод

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

Gets a specific option from the config
public getOption ( string $name ) : mixed
$name string The name of the option to return.
Результат mixed The value of the option if it exists or null if it doesnt.
    public function getOption($name)
    {
        return isset($this->options[$name]) ? $this->options[$name] : null;
    }

Usage Example

Пример #1
0
 public function testSettingAutomaticQueryClass()
 {
     $path = __DIR__ . '/fixtures/datastore/writable';
     $config = new Config($path . '/');
     // This isnt great testing but will do for now.
     $className = '\\JamesMoss\\Flywheel\\';
     $className .= function_exists('apcu_fetch') || function_exists('apc_fetch') ? 'CachedQuery' : 'Query';
     $this->assertSame($className, $config->getOption('query_class'));
 }