isValid() public static method

Returns whether a given string appears to be a valid hostmask.
public static isValid ( string $string ) : boolean
$string string Alleged hostmask string
return boolean TRUE if the string appears to be a valid hostmask, FALSE otherwise
Esempio n. 1
0
 /**
  * Tests that ::isValid() returns falso on a hostmask
  * provided that has no hostname component
  * 
  * @return void
  */
 public function testIsValidFailsOnInvalidHostmaskNoHost()
 {
     $this->assertFalse(Phergie_Hostmask::isValid('*!*@'));
 }