src/Widop/Twitter/Options/OptionFactory.php
public function create($option, $type = OptionInterface::TYPE_GET)
    {
        if (!isset($this->mapping[$option])) {
            throw new \InvalidArgumentException(sprintf('The option "%s" does not exist.', $option));
        }

        return new $this->mapping[$option]($type);
    }
public function create($option, $type = OptionInterface::TYPE_GET)
    {
        if (!isset($this->mapping[$option])) {
            throw new \InvalidArgumentException(sprintf('The option "%s" does not exist.', $option));
        }

        return new $this->mapping[$option]($type);
    }
Creates an option.

@param string $option The option name.
@param string $type   The option type.

@throws \InvalidArgumentException If the option does not exist.

@return \Widop\Twitter\Options\OptionInterface The option.