src/Titon/Utility/Validate.php
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);
    }
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);
    }
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 ) ; }
Validate input has an extension and is in the whitelist.

@uses Titon\Utility\Loader

@param string $input
@param string|array $extensions
@return bool
Validate input has an extension and is in the whitelist .