original_string: public static function ext($input, $extensions = array('gif', 'jpeg', 'png', 'jpg')) {
          if (is_array($input) && isset($input['name'])) {
              $input = $input['name'];
          }
  
          return in_array(Path::ext($input), (array) $extensions, true);
      }
code: public static function ext($input, $extensions = array('gif', 'jpeg', 'png', 'jpg')) {
          if (is_array($input) && isset($input['name'])) {
              $input = $input['name'];
          }
  
          return in_array(Path::ext($input), (array) $extensions, true);
      }
code_tokens: public static function ext ( $ input , $ extensions = array ( 'gif' , 'jpeg' , 'png' , 'jpg' ) ) { if ( is_array ( $ input ) && isset ( $ input [ 'name' ] ) ) { $ input = $ input [ 'name' ] ; } return in_array ( Path :: ext ( $ input ) , ( array ) $ extensions , true ) ; }
docstring: Validate input has an extension and is in the whitelist.
  
  @uses Titon\Utility\Loader
  
  @param string $input
  @param string|array $extensions
  @return bool
docstring_tokens: Validate input has an extension and is in the whitelist .