src/Phinx/Db/Table/Column.php
public function setOptions($options)
    {
        $validOptions = $this->getValidOptions();
        $aliasOptions = $this->getAliasedOptions();

        foreach ($options as $option => $value) {
            if (isset($aliasOptions[$option])) {
                // proxy alias -> option
                $option = $aliasOptions[$option];
            }

            if (!in_array($option, $validOptions, true)) {
                throw new \RuntimeException(sprintf('"%s" is not a valid column option.', $option));
            }

            $method = 'set' . ucfirst($option);
            $this->$method($value);
        }

        return $this;
    }
public function setOptions($options)
    {
        $validOptions = $this->getValidOptions();
        $aliasOptions = $this->getAliasedOptions();

        foreach ($options as $option => $value) {
            if (isset($aliasOptions[$option])) {
                // proxy alias -> option
                $option = $aliasOptions[$option];
            }

            if (!in_array($option, $validOptions, true)) {
                throw new \RuntimeException(sprintf('"%s" is not a valid column option.', $option));
            }

            $method = 'set' . ucfirst($option);
            $this->$method($value);
        }

        return $this;
    }
public function setOptions ( $ options ) { $ validOptions = $ this -> getValidOptions ( ) ; $ aliasOptions = $ this -> getAliasedOptions ( ) ; foreach ( $ options as $ option => $ value ) { if ( isset ( $ aliasOptions [ $ option ] ) ) { // proxy alias -> option $ option = $ aliasOptions [ $ option ] ; } if ( ! in_array ( $ option , $ validOptions , true ) ) { throw new \ RuntimeException ( sprintf ( '"%s" is not a valid column option.' , $ option ) ) ; } $ method = 'set' . ucfirst ( $ option ) ; $ this -> $ method ( $ value ) ; } return $ this ; }
Utility method that maps an array of column options to this objects methods.

@param array $options Options
@return \Phinx\Db\Table\Column
Utility method that maps an array of column options to this objects methods .