concrete/src/File/ValidationService.php
public function image($pathToImage)
    {

        /* compatibility if exif functions not available (--enable-exif) */
        if (!function_exists('exif_imagetype')) {
            function exif_imagetype($filename)
            {
                if ((list($width, $height, $type, $attr) = getimagesize($filename)) !== false) {
                    return $type;
                }

                return false;
            }
        }

        $val = @exif_imagetype($pathToImage);

        return in_array($val, array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG));
    }
public function image($pathToImage)
    {

        /* compatibility if exif functions not available (--enable-exif) */
        if (!function_exists('exif_imagetype')) {
            function exif_imagetype($filename)
            {
                if ((list($width, $height, $type, $attr) = getimagesize($filename)) !== false) {
                    return $type;
                }

                return false;
            }
        }

        $val = @exif_imagetype($pathToImage);

        return in_array($val, array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG));
    }
public function image ( $ pathToImage ) { /* compatibility if exif functions not available (--enable-exif) */ if ( ! function_exists ( 'exif_imagetype' ) ) { function exif_imagetype ( $ filename ) { if ( ( list ( $ width , $ height , $ type , $ attr ) = getimagesize ( $ filename ) ) !== false ) { return $ type ; } return false ; } } $ val = @ exif_imagetype ( $ pathToImage ) ; return in_array ( $ val , array ( IMAGETYPE_GIF , IMAGETYPE_JPEG , IMAGETYPE_PNG ) ) ; }
Tests whether the passed item a valid image.

@param $pathToImage

@return bool
Tests whether the passed item a valid image .