Ouzo\Restrictions::regexp PHP Method

regexp() public static method

public static regexp ( $value )
    public static function regexp($value)
    {
        return new RegexpRestriction($value);
    }

Usage Example

Example #1
0
 /**
  * @test
  */
 public function shouldCreateProperSqlForSqlite()
 {
     //given
     Config::overrideProperty('sql_dialect')->with('\\Ouzo\\Db\\Dialect\\Sqlite3Dialect');
     $restriction = Restrictions::regexp('value');
     //when
     $sql = $restriction->toSql('key');
     //then
     $this->assertEquals('key REGEXP ?', $sql);
     $this->assertEquals(array('value'), $restriction->getValues());
 }
All Usage Examples Of Ouzo\Restrictions::regexp