code: 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;
      }
docs: Transform an url or path for thumbor
  
  @param string $orig the original url or path
  @param string $transformation the name of the transformation to apply to the original image
  @param array $overrides an array of additionnal filters to override the ones from the transformation
  
  @return \Thumbor\Url\Builder
  
  @throws \Jb\Bundle\PhumborBundle\Transformer\Exception\UnknownTransformationException