Get an option from provided options and call method with that value.

@param string $name
@param string $method
549767
protected function pullFromOptions($name, $method)
    {
        if (Arr::get($this->formOptions, $name) !== null) {
            $this->{$method}(Arr::pull($this->formOptions, $name));
        }
    }
1073396
public function addMethod($method, $name = null)
    {
        if (is_array($method)) {
            require_once 'Zend/Server/Method/Definition.php';
            $method = new Zend_Server_Method_Definition($method);
        } elseif (!$method instanceof Zend_Server_Method_Definition) {
            require_once 'Zend/Server/Exception.php';
            throw new Zend_Server_Exception('Invalid method provided');
        }

        if (is_numeric($name)) {
            $name = null;
        }
        if (null !== $name) {
            $method->setName($name);
        } else {
            $name = $method->getName();
        }
        if (null === $name) {
            require_once 'Zend/Server/Exception.php';
            throw new Zend_Server_Exception('No method name provided');
        }

        if (!$this->_overwriteExistingMethods && array_key_exists($name, $this->_methods)) {
            require_once 'Zend/Server/Exception.php';
            throw new Zend_Server_Exception(sprintf('Method by name of "%s" already exists', $name));
        }
        $this->_methods[$name] = $method;
        return $this;
    }
623036
public function getMethod($name)
    {
        return (isset($this->_methods[$name])) ? $this->_methods[$name] : null;
    }
164172
private function _flag($option, $name)
    {
        if (isset($name) && is_numeric($name))
            throw new \Exception('Attempted to reference flag with a numeric index');
        return $this->_option($option, $name);
    }
103931
public function getOptionByName($name)
    {
        foreach ($this->options as $option) {
            if ($option->getName() == $name) {
                return $option;
            }
        }

        return false;
    }
1203564
protected function findOption($name)
    {
        foreach ($this->options as $option) {
            if ($option->hasAlias($name)) {
                return $option;
            }
        }

        return null;
    }
648814
public static function verifyNotNull(string $method, string $name, $argument)
    {
        static::verify(
                $argument !== null,
                self::messageFormat($method, $name, 'cannot be null')
        );
    }
798243
public static function getOptions(string $name): array
    {
        if (isset(self::$options) && is_array(self::$options))
            return self::$options[$name];
        return [];
    }
118334
protected function _process($name, $method)
    {
        if( $process = ($this->settings['process'] ?? NULL) )
        {
            if( Method::$method('FormProcessValue') )
            {
                if( Singleton::class('ZN\Validation\Data')->check() )
                {
                    $dbClass = Singleton::class('ZN\Database\DB');

                    if( $process === 'update' )
                    {
                        $dbClass->where
                        (
                            $whereColumn = $this->settings['whereColumn'], 
                            $whereValue  = $this->settings['whereValue']
                        )
                        ->update(strtolower($method).':'.$name);       

                        $this->getUpdateRow = $this->settings['getrow'] = $dbClass->where($whereColumn, $whereValue)->get($name)->row();
                    }
                    elseif( $process === 'insert' )
                    {
                        if( isset($this->settings['duplicateCheck']) )
                        {
                            $dbClass->duplicateCheck();
                        }

                        $dbClass->insert(strtolower($method).':'.$name); 
                    }
                    else
                    {
                        throw new InvalidArgumentException('[Form::process()] method can take one of the values [update or insert].');
                    }
                }
            }

            return $this->hidden('FormProcessValue', 'FormProcessValue');
        }
    }
1337756
public function resolveStatic(string $name, string $method, ...$args)
    {
        return $this->resolve($name . '::' . $method, ...$args);
    }
971347
private function withOptionReference($name, $callback)
    {
        if (!$this->options) {
            $this->options = new ArrayObject();
        }

        return $this->withVariableReference($this->options, $name, $callback);
    }
729511
public static function getOption($name = null)
    {
        if (null === $name) {
            return self::$_options;
        } else {
            return isset(self::$_options[$name])? self::$_options[$name]: null;
        }
    }
119633
private function getOption(array $options, $name, $default = null, callable $type = null)
    {
        if (array_key_exists($name, $options)) {
            $result = $options[$name];
        } else {
            $result = $default;
        }
        if ($type && !call_user_func($type, $result)) {
            throw new InvalidArgumentException(
                "The provided option for {$name}: " . print_r($result, true) . " is invalid"
            );
        }

        return $result;
    }
1046701
public function _call(string $name, &...$arguments)
    {
        $method = $this->getReflection()->getMethod($name);
        $method->setAccessible(true);

        return $method->invokeArgs($this->getInstance(), $arguments);
    }
839427
private function handleOptionName($name)
    {
        if (is_string($name)) {
            $name = explode('.', $name);
        }

        foreach ($this->optionNameHandlers as $handler) {
            $name = $handler($name);
        }

        return $name;
    }
835945
public function getRequestWithOptions($method, $uri, array $options = [])
    {
        $options = $this->parseOptions($options);

        return $this->getRequest(
            $method,
            $uri,
            $options['headers'],
            $options['body'],
            $options['version']
        );
    }
717555
public function setOption(string $name, string $value): void
    {
        $this->options[$name] = $value;
    }