Exemplo n.º 1
0
 /**
  * Check If Feature Matches Specified Filter. 
  * 
  * @param   FeatureNode     $feature    feature
  * @param   string          $filter     filter string (optional)
  */
 public function isFeatureMatchFilter(FeatureNode $feature, $filter = null)
 {
     return $this->isClosuresMatchFilter(function ($tag) use($feature) {
         return $feature->hasTag($tag);
     }, function ($tag) use($feature) {
         return !$feature->hasTag($tag);
     }, null !== $filter ? $filter : $this->filterString);
 }
Exemplo n.º 2
0
 /**
  * Check If Feature Matches Specified Filter. 
  * 
  * @param   FeatureNode     $feature    feature
  * @param   string          $filter     filter string (optional)
  */
 public function isFeatureMatchFilter(FeatureNode $feature, $filter = null)
 {
     $filter = null !== $filter ? $filter : $this->filterString;
     if ('/' === $filter[0]) {
         return preg_match($filter, $feature->getTitle());
     }
     return false !== mb_strpos($feature->getTitle(), $filter);
 }