ValidationService
class ValidationService (View source)
Helper elements for validating uploaded and existing files in Concrete.
\@package Helpers
Methods
Tests whether the passed item a valid image.
Tests whether a file exists.
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.
No description
Details
bool
image($pathToImage)
Tests whether the passed item a valid image.
bool
file($pathToFile)
Tests whether a file exists.
bool
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.
filetype($filename, $extensions = null)
No description