WP_MatchesMapRegex::__construct() WordPress Method

The WP_MatchesMapRegex::__construct() method is used to construct a new WP_MatchesMapRegex object. The method takes two arguments: $pattern and $flags. $pattern is a regular expression pattern. $flags is a bitmask of flags, which can be any combination of the following: PATTERN_FLAG_DELIMITER - If this flag is set, $pattern will be treated as a delimited regular expression, where the delimiter is the first character in $pattern. PATTERN_FLAG_NOTBOL - If this flag is set, the regular expression will not match the beginning of the string. PATTERN_FLAG_NOTEOL - If this flag is set, the regular expression will not match the end of the string.

WP_MatchesMapRegex::__construct( string $subject, array $matches ) #

constructor


Parameters

$subject

(string)(Required)subject if regex

$matches

(array)(Required)data to use in map


Top ↑

Source

File: wp-includes/class-wp-matchesmapregex.php

	public function __construct( $subject, $matches ) {
		$this->_subject = $subject;
		$this->_matches = $matches;
		$this->output   = $this->_map();
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.