original_string: public static function fromFile($filename, $width, $height = 0)
      {
          
          $urlizer = new Urlizer($filename);
  
          static::configureUrlizer($urlizer);
  
          // If the filename is not initialized by '/', this is a fullpath
          
          if (strpos($filename, '/') !== 0) {
  
              $filename = $urlizer->getPublicFilename();
          }
  
          try {
  
              $thumb = new static($filename, $width, $height);
  
          } catch (\InvalidArgumentException $e) {
  
              if (static::$config['fallback'] === null) {
  
                  throw $e;
              }
  
              return static::$config['fallback'];
          }
  
          $basename = $thumb->generateBasename();
  
          $filename = $urlizer->buildThumbFilename($basename);
  
          $thumb->getCache($filename);
  
          return $urlizer->buildThumbUrl($basename);
      }
code: public static function fromFile($filename, $width, $height = 0)
      {
          
          $urlizer = new Urlizer($filename);
  
          static::configureUrlizer($urlizer);
  
          // If the filename is not initialized by '/', this is a fullpath
          
          if (strpos($filename, '/') !== 0) {
  
              $filename = $urlizer->getPublicFilename();
          }
  
          try {
  
              $thumb = new static($filename, $width, $height);
  
          } catch (\InvalidArgumentException $e) {
  
              if (static::$config['fallback'] === null) {
  
                  throw $e;
              }
  
              return static::$config['fallback'];
          }
  
          $basename = $thumb->generateBasename();
  
          $filename = $urlizer->buildThumbFilename($basename);
  
          $thumb->getCache($filename);
  
          return $urlizer->buildThumbUrl($basename);
      }
code_tokens: public static function fromFile ( $ filename , $ width , $ height = 0 ) { $ urlizer = new Urlizer ( $ filename ) ; static :: configureUrlizer ( $ urlizer ) ; // If the filename is not initialized by '/', this is a fullpath if ( strpos ( $ filename , '/' ) !== 0 ) { $ filename = $ urlizer -> getPublicFilename ( ) ; } try { $ thumb = new static ( $ filename , $ width , $ height ) ; } catch ( \ InvalidArgumentException $ e ) { if ( static :: $ config [ 'fallback' ] === null ) { throw $ e ; } return static :: $ config [ 'fallback' ] ; } $ basename = $ thumb -> generateBasename ( ) ; $ filename = $ urlizer -> buildThumbFilename ( $ basename ) ; $ thumb -> getCache ( $ filename ) ; return $ urlizer -> buildThumbUrl ( $ basename ) ; }
docstring: Returns the url from thumb based on filename
  @param string $filename
  @param float $width
  @param float $height
  @return string
docstring_tokens: Returns the url from thumb based on filename