original_string: public function thumbnails($file, $format = 'JPEG', $size = 'small')
      {
          // Only allow php response format for this call
          if ($this->responseFormat !== 'php') {
              throw new Exception('This method only supports the `php` response format');
          }
          
          $format = strtoupper($format);
          // If $format is not 'PNG', default to 'JPEG'
          if ($format != 'PNG') $format = 'JPEG';
          
          $size = strtolower($size);
          $sizes = array('s', 'm', 'l', 'xl', 'small', 'medium', 'large');
          // If $size is not valid, default to 'small'
          if (!in_array($size, $sizes)) $size = 'small';
          
          $call = 'thumbnails/' . $this->root . '/' . $this->encodePath($file);
          $params = array('format' => $format, 'size' => $size);
          $response = $this->fetch('GET', self::CONTENT_URL, $call, $params);
          
          return array(
              'name' => basename($file),
              'mime' => $this->getMimeType($response['body']),
              'meta' => json_decode($response['headers']['x-dropbox-metadata']),
              'data' => $response['body'],
          );
      }
code: public function thumbnails($file, $format = 'JPEG', $size = 'small')
      {
          // Only allow php response format for this call
          if ($this->responseFormat !== 'php') {
              throw new Exception('This method only supports the `php` response format');
          }
          
          $format = strtoupper($format);
          // If $format is not 'PNG', default to 'JPEG'
          if ($format != 'PNG') $format = 'JPEG';
          
          $size = strtolower($size);
          $sizes = array('s', 'm', 'l', 'xl', 'small', 'medium', 'large');
          // If $size is not valid, default to 'small'
          if (!in_array($size, $sizes)) $size = 'small';
          
          $call = 'thumbnails/' . $this->root . '/' . $this->encodePath($file);
          $params = array('format' => $format, 'size' => $size);
          $response = $this->fetch('GET', self::CONTENT_URL, $call, $params);
          
          return array(
              'name' => basename($file),
              'mime' => $this->getMimeType($response['body']),
              'meta' => json_decode($response['headers']['x-dropbox-metadata']),
              'data' => $response['body'],
          );
      }
code_tokens: public function thumbnails ( $ file , $ format = 'JPEG' , $ size = 'small' ) { // Only allow php response format for this call
   if ( $ this -> responseFormat !== 'php' ) { throw new Exception ( 'This method only supports the `php` response format' ) ; } $ format = strtoupper ( $ format ) ; // If $format is not 'PNG', default to 'JPEG'
   if ( $ format != 'PNG' ) $ format = 'JPEG' ; $ size = strtolower ( $ size ) ; $ sizes = array ( 's' , 'm' , 'l' , 'xl' , 'small' , 'medium' , 'large' ) ; // If $size is not valid, default to 'small'
   if ( ! in_array ( $ size , $ sizes ) ) $ size = 'small' ; $ call = 'thumbnails/' . $ this -> root . '/' . $ this -> encodePath ( $ file ) ; $ params = array ( 'format' => $ format , 'size' => $ size ) ; $ response = $ this -> fetch ( 'GET' , self :: CONTENT_URL , $ call , $ params ) ; return array ( 'name' => basename ( $ file ) , 'mime' => $ this -> getMimeType ( $ response [ 'body' ] ) , 'meta' => json_decode ( $ response [ 'headers' ] [ 'x-dropbox-metadata' ] ) , 'data' => $ response [ 'body' ] , ) ; }
docstring: Gets a thumbnail for an image
  @param string $file The path to the image you wish to thumbnail
  @param string $format The thumbnail format, either JPEG or PNG
  @param string $size The size of the thumbnail
  @return array
docstring_tokens: Gets a thumbnail for an image