PHP Class libphonenumber\Matcher

Note that this is NOT the same as google's java PhoneNumberMatcher class. This class is a minimal port of java's built-in matcher class, whereas PhoneNumberMatcher is designed to recognize phone numbers embedded in any text.
Datei anzeigen Open project: giggsey/libphonenumber-for-php Class Usage Examples

Protected Properties

Property Type Description
$groups array
$pattern string
$subject string

Public Methods

Method Description
__construct ( string $pattern, string $subject )
end ( integer | null $group = null ) : integer
find ( ) : boolean
group ( integer $group = null ) : string
groupCount ( ) : integer
lookingAt ( ) : boolean
matches ( ) : boolean
replaceAll ( string $replacement ) : string
replaceFirst ( string $replacement ) : string
reset ( string $input = "" ) : Matcher
start ( $group = null )

Protected Methods

Method Description
doMatch ( $type = 'find' )

Method Details

__construct() public method

public __construct ( string $pattern, string $subject )
$pattern string
$subject string

doMatch() protected method

protected doMatch ( $type = 'find' )

end() public method

public end ( integer | null $group = null ) : integer
$group integer | null
return integer

find() public method

public find ( ) : boolean
return boolean

group() public method

public group ( integer $group = null ) : string
$group integer
return string

groupCount() public method

public groupCount ( ) : integer
return integer

lookingAt() public method

public lookingAt ( ) : boolean
return boolean

matches() public method

public matches ( ) : boolean
return boolean

replaceAll() public method

public replaceAll ( string $replacement ) : string
$replacement string
return string

replaceFirst() public method

public replaceFirst ( string $replacement ) : string
$replacement string
return string

reset() public method

public reset ( string $input = "" ) : Matcher
$input string
return Matcher

start() public method

public start ( $group = null )

Property Details

$groups protected_oe property

protected array $groups
return array

$pattern protected_oe property

protected string $pattern
return string

$subject protected_oe property

protected string $subject
return string