public function setMinifier($minifier)
	{
		if (is_string($minifier))
		{
			$className = __NAMESPACE__ . '\\JavaScript\\Minifiers\\' . $minifier;

			// Pass the extra argument to the constructor, if applicable
			$args = array_slice(func_get_args(), 1);
			if (!empty($args))
			{
				$reflection = new ReflectionClass($className);
				$minifier   = $reflection->newInstanceArgs($args);
			}
			else
			{
				$minifier = new $className;
			}
		}

		$this->minifier = $minifier;

		return $minifier;
	}
public function setMinifier($minifier)
	{
		if (is_string($minifier))
		{
			$className = __NAMESPACE__ . '\\JavaScript\\Minifiers\\' . $minifier;

			// Pass the extra argument to the constructor, if applicable
			$args = array_slice(func_get_args(), 1);
			if (!empty($args))
			{
				$reflection = new ReflectionClass($className);
				$minifier   = $reflection->newInstanceArgs($args);
			}
			else
			{
				$minifier = new $className;
			}
		}

		$this->minifier = $minifier;

		return $minifier;
	}
public function setMinifier ( $ minifier ) { if ( is_string ( $ minifier ) ) { $ className = __NAMESPACE__ . '\\JavaScript\\Minifiers\\' . $ minifier ; // Pass the extra argument to the constructor, if applicable $ args = array_slice ( func_get_args ( ) , 1 ) ; if ( ! empty ( $ args ) ) { $ reflection = new ReflectionClass ( $ className ) ; $ minifier = $ reflection -> newInstanceArgs ( $ args ) ; } else { $ minifier = new $ className ; } } $ this -> minifier = $ minifier ; return $ minifier ; }
Set the cached instance of Minifier

Extra arguments will be passed to the minifier's constructor

@param  string|Minifier $minifier Name of a supported minifier, or an instance of Minifier
@return Minifier                  The new minifier
Set the cached instance of Minifier