protected function decodeAsseticFilters(FilterManager $filterManager, $filters)
    {
        if (! empty($filters)) {
            $filter_list = \is_array($filters) ? $filters : explode(',', $filters);

            foreach ($filter_list as $filter_name) {
                $filter_name = trim($filter_name);

                foreach ($this->assetFilters as $filterIdentifier => $filterInstance) {
                    if ($filterIdentifier == $filter_name) {
                        $filterManager->set($filterIdentifier, $filterInstance);

                        // No, goto is not evil.
                        goto filterFound;
                    }
                }

                throw new \InvalidArgumentException("Unsupported Assetic filter: '$filter_name'");
                break;

                filterFound:
            }
        } else {
            $filter_list = array();
        }

        return $filter_list;
    }