public function transform($orig, $transformation = null, $overrides = array())
    {
        $url = $this->factory->url($orig);
        if (is_null($transformation) && count($overrides) == 0) {
            return $url;
        }

        // Check if a transformation is given without overrides
        if (!isset($this->transformations[$transformation]) && count($overrides) == 0) {
            throw new Exception\UnknownTransformationException(
                "Unknown transformation $transformation. Use on of "
                . "the following ".implode(', ', array_keys($this->transformations))
            );
        }

        // Override transformation configuration with custom values
        $configuration = array();
        if (isset($this->transformations[$transformation])) {
            $configuration = $this->transformations[$transformation];
        }
        $configuration = array_merge($configuration, $overrides);

        // Build url from transformation configuration
        foreach ($configuration as $filter => $arguments) {
            $method = self::$filterMethod[$filter];
            $this->$method($url, $arguments);
        }

        return $url;
    }