SequoiaDB
 All Classes Files Functions Variables Pages
Public Member Functions | List of all members
SequoiaRegex Class Reference

Public Member Functions

 __construct ($regex, $options)
 
 __toString ()
 

Detailed Description

Class for create an object of the regex type

Constructor & Destructor Documentation

SequoiaRegex::__construct (   $regex,
  $options 
)

Constructor.

Parameters
string$regexis regex string
string$optionsis regex options string
$regexObj = new SequoiaRegex( 'a', 'i' ) ;
$arr = array( 'regex' => $regexObj ) ; // json ==> { "regex": { "$regex": "a", "$options": "i" } }

Member Function Documentation

SequoiaRegex::__toString ( )

PHP Magic Methods, the class as string output.

Returns
regex string
$regexObj = new SequoiaRegex( 'a', 'i' ) ;
echo $regexObj ; // output ==> /a/i

The documentation for this class was generated from the following file: