Register options and arguments on the given $options object

@param Options $options
@return void
763672
protected function setup(Options $options)
    {
        $options->setHelp('This is a simple example, not using any subcommands');
        $options->registerOption('longflag', 'A flag that can also be set with a short option', 'l');
        $options->registerOption('file', 'This option expects an argument.', 'f', 'filename');
        $options->registerArgument('argument', 'Arguments can be required or optional. This one is optional', false);
    }
1221497
private function setUserOptions($options)
    {
        if (is_array($options)) {
            foreach ($options as $property => $value) {
                $this->$property = $value;
            }
        }
    }
219860
private static function initialize($files, $options)
    {
        if ($options != null && $options instanceof Options) {
            self::$options = $options;
        } else {
            self::$options = new Options();
        }
        self::$fileLoader = new ConfigurationFileLoader($files, self::$options);
        self::$data = self::$fileLoader->getData();
    }
383324
public function setOptions($options)
    {
        // Adding hosts.
        if (!empty($options['hosts'])) {
            foreach ($options['hosts'] as $host => $port) {
                $this->addserver($host, $port, false);
            }
        } else {
            $this->addserver('127.0.0.1', '11211', false);
        }
    }
1315417
public function setOptions($options = []) {

		if(false === is_array($options)) {
            return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($options)), E_USER_ERROR);
        }

		$this -> options = array_merge($this -> options, $options);
	}
1238013
protected function configureInstance($options)
    {
        if (is_string($options)) {
            $this->setToken($options)->setTokenExpiresIn(null);
        } elseif (is_array($options)) {
            $this->configureInstanceAssoc($options);
        }
    }
938917
public static function init(PDO $pdo, $options = [])
    {
        DB::init($pdo);
        self::$initOptions = $options;
    }
1131240
public function setOptions(array $options = []): void
    {
        $this->options = $this->shortcuts = [];
        $this->addOptions($options);
    }
50551
public function setParameters($options)
    {
        foreach ($options as $name => $value) {
            $this->xsltProcessor->setParameter('', $name, $value);
        }
    }
250087
private function applyOptions(array $options)
    {
        foreach ($options as $option => $value) {
            if (isset($this->$option) && isset($value)) {
                $this->$option = $value;
            }
        }
    }
300358
public function SetOptions( $options ){
		foreach($options as $option => $value){
			$this->SetOption($option,$value);
		}
	}
470043
public function setOptions($options)
    {
        if (!$options instanceof ModuleOptions) {
            $options = new ModuleOptions($options);
        }

        $this->options = $options;
        return $this;
    }
490784
public function setOptions(array $options)
    {
        $this->validateOptions($options, $this->type);

        $this->options = $options;

        return $this;
    }
82004
public function addOptions($options)
    {
        foreach ($options as $key => $value) {
            $this->addOption($key, $value);
        }

        return $this;
    }
710716
public function setOptions(array $options)
    {
        foreach ($options as $name => $value) {
            $this->setOption($name, $value);
        }
    }
204118
public static function register($id, $options)
    {
        $id = (string)$id;
        if (self::exists($id)) {
            user_error(Text::insert('A collection with id ":id" is already registered.', ['id' => $id]));
            return;
        }
        $defaults = [
            'model' => 'Plugin.Model',
            'displayName' => 'Translated Name'
        ];
        $options = array_merge($defaults, $options);
        self::_instance()->_items[$id] = $options;
    }
587930
public function register($arguments, $options)
    {
        $method = array_shift($arguments);

        $this->setArguments($arguments);
        $this->setOptions($options);

        if (method_exists($this, $method)) {
            try {
                return $this->app->call([$this, $method]);
            } catch (Exception $e) {
                $this->error($e->getMessage());
            }
        }

        $this->error("You have to provide command argument [$this->signature <argument>].");
    }