src/Application.php
private function verifyExtensionFile()
    {
        $supported_image = array(
            'gif',
            'jpg',
            'jpeg',
            'png'
        );

        $fileName = $_SERVER['HTTP_X_FILE_NAME'];

        $ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
        if (in_array($ext, $supported_image)) {
            return true;
        }
        return false;
    }
private function verifyExtensionFile()
    {
        $supported_image = array(
            'gif',
            'jpg',
            'jpeg',
            'png'
        );

        $fileName = $_SERVER['HTTP_X_FILE_NAME'];

        $ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
        if (in_array($ext, $supported_image)) {
            return true;
        }
        return false;
    }
private function verifyExtensionFile ( ) { $ supported_image = array ( 'gif' , 'jpg' , 'jpeg' , 'png' ) ; $ fileName = $ _SERVER [ 'HTTP_X_FILE_NAME' ] ; $ ext = strtolower ( pathinfo ( $ fileName , PATHINFO_EXTENSION ) ) ; if ( in_array ( $ ext , $ supported_image ) ) { return true ; } return false ; }
method for verify extension file
@return boolean true - file is image, false - file not image
method for verify extension file