PHP Class MongoRegex

显示文件 Open project: alcaeus/mongo-php-adapter Class Usage Examples

Public Properties

Property Type Description
$flags string
$regex string

Public Methods

Method Description
__construct ( string | MongoDB\BSON\Regex $regex ) Creates a new regular expression.
__toString ( ) : string Returns a string representation of this regular expression.
toBSONType ( ) : MongoDB\BSON\Regex Converts this MongoRegex to the new BSON Regex type

Method Details

__construct() public method

Creates a new regular expression.
public __construct ( string | MongoDB\BSON\Regex $regex )
$regex string | MongoDB\BSON\Regex Regular expression string of the form /expr/flags

__toString() public method

Returns a string representation of this regular expression.
public __toString ( ) : string
return string This regular expression in the form "/expr/flags".

toBSONType() public method

Converts this MongoRegex to the new BSON Regex type
public toBSONType ( ) : MongoDB\BSON\Regex
return MongoDB\BSON\Regex

Property Details

$flags public_oe property

public string $flags
return string

$regex public_oe property

public string $regex
return string