/** * @param boolean $value */ public function conformityConditions($compareValue) { switch ($this->mode) { case self::$contain: return strpos($compareValue, $this->value) !== false; case self::$extName: return strtolower(File::getFileExtName($compareValue)) == $this->value; case self::$regex: return preg_match($this->value, $compareValue); } }