Skip to content

Instantly share code, notes, and snippets.

@omissis
Created January 21, 2015 13:02
Show Gist options
  • Save omissis/a8291d0e14c610e9e328 to your computer and use it in GitHub Desktop.
Save omissis/a8291d0e14c610e9e328 to your computer and use it in GitHub Desktop.
PlainDataMatcher
<?php
/**
* @file
* Contains \Drupal\rules\DataMatcher\DataMatcherInterface.
*/
namespace Drupal\rules\DataMatcher;
/**
* Base abstract class for Data Matchers.
*/
abstract class PlainDataMatcher implements DataMatcherInterface {
/**
* {@inheritdoc}
*/
public function match($subject, $object) {
return $this->doMatch($subject, $object);
}
/**
* Perform the actual matching.
*
* @param mixed $subject
* @param mixed $object
*
* @return boolean
*/
abstract protected function doMatch($subject, $object);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment