Goddammit GitHub for Mac
This commit is contained in:
Toby Zerner 2015-07-04 12:25:21 +09:30
parent 41c5ed0acb
commit f4ab018e2e

View File

@ -1,24 +0,0 @@
<?php namespace Flarum\Core\Search;
abstract class RegexGambit implements Gambit
{
protected $pattern;
public function apply($bit, SearcherInterface $searcher)
{
if ($matches = $this->match($bit)) {
list($negate) = array_splice($matches, 1, 1);
$this->conditions($searcher, $matches, !! $negate);
return true;
}
}
protected function match($bit)
{
if (preg_match('/^(-?)'.$this->pattern.'$/i', $bit, $matches)) {
return $matches;
}
}
abstract protected function conditions(SearcherInterface $searcher, array $matches, $negate);
}