protected function buildValue(&$value, $key)
    {
        if (in_array($key, $this->toBeExploded)) {
            //Collapses multi-dimensional arrays into a single dimension
            $value = array_clean(is_array($value) ? Hash::flatten($value) : explode(' ', $value));
            sort($value);
            $value = implode(' ', $value);
        }

        return is_string($value) ? trim($value) : $value;
    }
protected function buildValue(&$value, $key)
    {
        if (in_array($key, $this->toBeExploded)) {
            //Collapses multi-dimensional arrays into a single dimension
            $value = array_clean(is_array($value) ? Hash::flatten($value) : explode(' ', $value));
            sort($value);
            $value = implode(' ', $value);
        }

        return is_string($value) ? trim($value) : $value;
    }
protected function buildValue ( & $ value , $ key ) { if ( in_array ( $ key , $ this -> toBeExploded ) ) { //Collapses multi-dimensional arrays into a single dimension $ value = array_clean ( is_array ( $ value ) ? Hash :: flatten ( $ value ) : explode ( ' ' , $ value ) ) ; sort ( $ value ) ; $ value = implode ( ' ' , $ value ) ; } return is_string ( $ value ) ? trim ( $ value ) : $ value ; }
Internal method to build a value
@param mixed $value Option value
@param string $key Option key
@return mixed
@uses $toBeExploded
Internal method to build a value