extensions = array_map('strtolower', $extensions); } public function check(EntityManager $em, File $file) { $boolean = in_array(strtolower($file->getFile()->getExtension()), $this->extensions); return new Response($boolean, $this); } public static function getMessage() { return _('The file does not match available extensions'); } }