VolumeImages
class VolumeImages implementsRule
Properties
protectedstring | $message | The validation message to display. | |
protectedstring | $url | The volume URL to check the image files. | |
protectedint | $sampleCount | Number of sample images to check for existence. |
Methods
__construct(string$url,int$sampleCount =5)
Create a new instance.
bool
passes(string$attribute,array$value)
Check if an array of image filenames is valid.
string
message()
Get the validation error message.
bool
sampleImagesExist(array$images)
Check a random sample of the image files for existence.
Details
at line40
__construct(string$url,int$sampleCount =5)
Create a new instance.
at line57
bool
passes(string$attribute,array$value)
Check if an array of image filenames is valid.
A valid array is not empty, contains no duplicates and has only images with JPG, PNG or GIF file endings.
at line93
string
message()
Get the validation error message.
at line105
protectedbool
sampleImagesExist(array$images)
Check a random sample of the image files for existence.