WildcardPathInvalidation.php in Purge 8.3
File
src/Plugin/Purge/Invalidation/WildcardPathInvalidation.php
View source
<?php
namespace Drupal\purge\Plugin\Purge\Invalidation;
use Drupal\purge\Plugin\Purge\Invalidation\Exception\InvalidExpressionException;
class WildcardPathInvalidation extends PathInvalidation implements InvalidationInterface {
public function validateExpression($wildcard_check = TRUE) {
parent::validateExpression(FALSE);
if (strpos($this->expression, '*') === FALSE) {
throw new InvalidExpressionException('Wildcard invalidations should contain an asterisk.');
}
}
}