matches() 공개 메소드

Returns whether a given hostmask matches a given pattern.
public matches ( string $pattern, string $hostmask = null ) : boolean
$pattern string Pattern using conventions of a ban mask where represents a wildcard
$hostmask string Optional hostmask to match against, if not the current hostmask instance
리턴 boolean TRUE if the hostmask matches the pattern, FALSE otherwise
예제 #1
0
 /**
  * Tests matches() function for returning false when pattern does not match
  * a specified hostmask.
  * 
  * @return void
  */
 public function testMatchesFalseWithHostmaskSpecified()
 {
     $myPattern = '1nick!1username@1host';
     $myHostmask = '2nick!2username@2host';
     $this->assertFalse($this->hostmask->matches($myPattern, $myHostmask));
 }