private function checkImage($path)
    {
        if (!file_exists($this->getWebDirectory() . '/' . $path) && !file_exists($path)) {
            throw new NotFoundException(sprintf("Unable to find the image \"%s\" to cache", $path));
        }

        if (!is_file($this->getWebDirectory() . '/' . $path) && !is_file($path)) {
            throw new HttpException(400, sprintf('[ImBundle] "%s" is no file', $path));
        }
    }
private function checkImage($path)
    {
        if (!file_exists($this->getWebDirectory() . '/' . $path) && !file_exists($path)) {
            throw new NotFoundException(sprintf("Unable to find the image \"%s\" to cache", $path));
        }

        if (!is_file($this->getWebDirectory() . '/' . $path) && !is_file($path)) {
            throw new HttpException(400, sprintf('[ImBundle] "%s" is no file', $path));
        }
    }
private function checkImage ( $ path ) { if ( ! file_exists ( $ this -> getWebDirectory ( ) . '/' . $ path ) && ! file_exists ( $ path ) ) { throw new NotFoundException ( sprintf ( "Unable to find the image \"%s\" to cache" , $ path ) ) ; } if ( ! is_file ( $ this -> getWebDirectory ( ) . '/' . $ path ) && ! is_file ( $ path ) ) { throw new HttpException ( 400 , sprintf ( '[ImBundle] "%s" is no file' , $ path ) ) ; } }
Validates that an image exists

@param string $path

@throws NotFoundException
@throws HttpException
Validates that an image exists