public function options($option_params) {
        $options = array();

        // These will look like: "-quadrant(T)-resize"
        $option_params = explode('-', $option_params);

        // Loop through the params and make the options key value pairs
        foreach($option_params as $option) {
            if (!preg_match('#(\w+)(?:\(([\w,.]+)\))?#i', $option, $matches)) continue;
            if (isset($matches[2])) $options[$matches[1]] = explode(',', $matches[2]);
            else $options[$matches[1]] = null;
        }

        // Map filter names to filter class instances or remove the config.
        $options['filters'] = $this->buildfilters($options);
        if (empty($options['filters'])) unset($options['filters']);

        // Return new options array
        return $options;
    }
public function options($option_params) {
        $options = array();

        // These will look like: "-quadrant(T)-resize"
        $option_params = explode('-', $option_params);

        // Loop through the params and make the options key value pairs
        foreach($option_params as $option) {
            if (!preg_match('#(\w+)(?:\(([\w,.]+)\))?#i', $option, $matches)) continue;
            if (isset($matches[2])) $options[$matches[1]] = explode(',', $matches[2]);
            else $options[$matches[1]] = null;
        }

        // Map filter names to filter class instances or remove the config.
        $options['filters'] = $this->buildfilters($options);
        if (empty($options['filters'])) unset($options['filters']);

        // Return new options array
        return $options;
    }
public function options ( $ option_params ) { $ options = array ( ) ; // These will look like: "-quadrant(T)-resize" $ option_params = explode ( '-' , $ option_params ) ; // Loop through the params and make the options key value pairs foreach ( $ option_params as $ option ) { if ( ! preg_match ( '#(\w+)(?:\(([\w,.]+)\))?#i' , $ option , $ matches ) ) continue ; if ( isset ( $ matches [ 2 ] ) ) $ options [ $ matches [ 1 ] ] = explode ( ',' , $ matches [ 2 ] ) ; else $ options [ $ matches [ 1 ] ] = null ; } // Map filter names to filter class instances or remove the config. $ options [ 'filters' ] = $ this -> buildfilters ( $ options ) ; if ( empty ( $ options [ 'filters' ] ) ) unset ( $ options [ 'filters' ] ) ; // Return new options array return $ options ; }
Create options array where each key is an option name
and the value if an array of the passed arguments

@param  string $option_params Options string in the Croppa URL style
@return array
Create options array where each key is an option name and the value if an array of the passed arguments