Check if option is set

@param string $option
@return bool
439400
protected function optionSet(string $option) : bool
    {
        return isset($this->allOptions[$option]) && $this->allOptions[$option] === true
            || (isset($this->allOptions['all']) && $this->allOptions['all'] === true && $option !== 'overwrite' && $option !== 'prompt');
    }
110941
public boolean hasShortOption(String opt)
    {
        opt = Util.stripLeadingHyphens(opt);

        return shortOpts.containsKey(opt);
    }
612112
private function getOption($option, array $options)
    {
        return isset($options[$option]) ? $options[$option] : $this->$option;
    }
1048920
public function assertSelectOptionNotFound($field, $option)
    {
        \PHPUnit_Framework_Assert::assertFalse(
            in_array($option, $this->findSelectOptions($field), true),
            sprintf('The select option "%s" from the select "%s" exists.', $option, $field)
        );
    }
549698
protected function is($options) {
        return ($this->getOutputVerbosity() & $options) === $options
            || ($this->getOutputFormat() & $options) === $options;
    }
1101513
public boolean isSet(@NonNull NamedOption option) {
      if (option.isBoolean()) {
         return option.getValue() != null && option.<Boolean>getValue();
      }

      return option.getValue() != null;
   }
1354837
public function checkSelectedValue($value)
  {
    if (is_null($this->selected)) {
      return false;
    }

    if (is_array($this->selected)) {
      return in_array($value, $this->selected);
    }

    return $this->selected == $value;
  }
1093992
public function __isset(string $name): bool
    {
        $setter = [$this, 'set' . strtolower($name)];
        $getter = [$this, 'get' . strtolower($name)];

        return is_callable($setter) || is_callable($getter);
    }
245511
public function __isset($name)
    {
        if (0 === stripos($name, 'conf_')) {
            $name = str_replace('conf_', '', $name);
            if (array_key_exists($name, $this->configs)) {
                return true;
            }
        }

        return (array_key_exists($name, $this->modules) ||
            array_key_exists($name, $this->globals));
    }
898295
function unset_option( $option, $flush = false ) {
            $this->_logger->entrance( 'option = ' . $option );

            if ( is_array( $this->_options ) ) {
                if ( ! isset( $this->_options[ $option ] ) ) {
                    return;
                }

                unset( $this->_options[ $option ] );

            } else if ( is_object( $this->_options ) ) {
                if ( ! isset( $this->_options->{$option} ) ) {
                    return;
                }

                unset( $this->_options->{$option} );
            }

            if ( $flush ) {
                $this->store();
            }
        }
770215
public function lockTable($option = null)
	{
		if(empty($option))
		{
			return false;
		}
		else
		{
			$sql = 'lock table ';
			foreach($option as $tableName => $type)
			{
				$sql .= $tableName . ' ' . $type . ',';
			}
			return $this->execute(substr($sql, 0, -1));
		}
	}
1214972
public function set_option($options = array()) {
        global $DB;

        if (!empty($options['name'])) {
            $r = new stdClass();
            $r->id   = $this->id;
            $r->name = $options['name'];
            $DB->update_record('repository_instances', $r);
            unset($options['name']);
        }
        foreach ($options as $name=>$value) {
            if ($id = $DB->get_field('repository_instance_config', 'id', array('name'=>$name, 'instanceid'=>$this->id))) {
                $DB->set_field('repository_instance_config', 'value', $value, array('id'=>$id));
            } else {
                $config = new stdClass();
                $config->instanceid = $this->id;
                $config->name   = $name;
                $config->value  = $value;
                $DB->insert_record('repository_instance_config', $config);
            }
        }
        cache::make('core', 'repositories')->purge();
        return true;
    }
979164
public function hasMeta($option)
    {
        return (isset($this->metaData[$option])) ? $this->metaData[$option] : false;
    }
1204346
public function unsetOption($option)
    {
        if (!isset(static::$availableOptions[$option])) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid option specified: "%s". Expected one of (%s)',
                $option,
                implode(', ', array_keys(static::$availableOptions))
            ));
        }
        $pos = array_search(static::$availableOptions[$option], $this->options, true);
        if (false !== $pos) {
            unset($this->options[$pos]);
        }
    }
870409
public function __isset($property)
    {
        if (null !== $this->findProperty($property)) {
            return true;
        } else {
            return isset($this->$property);
        }
    }
482154
function optionExists($value) {
        foreach ($this->_options as $option) {
            if (isset($option['attr']['value']) && ($option['attr']['value'] == $value)) {
                return true;
            }
        }
        return false;
    }
856312
public function hasOption($name)
    {
        foreach (preg_split('#[|,:]+#', $name) as $p) {
            if (isset($this->_options[$p])) {
                return true;
            } elseif (strpos($p, '_') !== false) {
                $p = strtr($p, '_', '-');
                if (isset($this->_options[$p])) {
                    return true;
                }
            }
        }

        return false;
    }