コード例 #1
0
ファイル: StringMatcher.php プロジェクト: jakzal/php-matcher
 /**
  * {@inheritDoc}
  */
 public function canMatch($pattern)
 {
     if (!is_string($pattern)) {
         return false;
     }
     return $this->parser->hasValidSyntax($pattern) && $this->parser->parse($pattern)->is('string');
 }
コード例 #2
0
ファイル: ArrayMatcher.php プロジェクト: coduo/php-matcher
 private function isArrayPattern($pattern)
 {
     if (!is_string($pattern)) {
         return false;
     }
     return $this->parser->hasValidSyntax($pattern) && $this->parser->parse($pattern)->is('array');
 }