Class ValidationService

Helper elements for validating uploaded and existing files in Concrete.

Namespace: Concrete\Core\File
Package: Helpers\Validation
Copyright: Copyright (c) 2003-2008 Concrete5. (http://www.concrete5.org)
License: MIT License
Author: Andrew Embler andrew@concrete5.org
Located at src/File/ValidationService.php

Methods summary

public boolean
# image( $pathToImage )

Tests whether the passed item a valid image.

public boolean
# file( $pathToFile )

Tests whether a file exists

public boolean
# extension( string $filename, array $extensions = NULL )

Parses the file extension for a given file name, checks it to see if it's in the the extension array if provided if not, it checks to see if it's in the concrete.upload.extensions configuration option

public
# filetype( $filename, $extensions = null )