collection = new MinifierList; foreach (func_get_args() as $minifier) { $this->collection->add($minifier); } } /** * {@inheritdoc} */ public function minify($src) { foreach ($this->collection as $minifier) { try { return $minifier->minify($src); } catch (Exception $e) { // Do nothing } } throw new RuntimeException('No minifier available'); } }