Beispiel #1
0
<?php

require_once dirname(__FILE__) . '/../../../bootstrap/unit.php';
$t = new lime_test(1);
$t->comment('nbGlob - Test log');
$t->is(nbGlob::globToRegex('*.php'), '#^(?=[^\\.])[^/]*\\.php$#', '->globToRegex("*.php") returns regexp "#^(?=[^\\.])[^/]*\\.php$#"');
Beispiel #2
0
 public static function setStrictWildcardSlash($boolean)
 {
     self::$strictWildcardSlash = $boolean;
 }
Beispiel #3
0
 protected function toRegex($str)
 {
     if (preg_match('/^(!)?([^a-zA-Z0-9\\\\]).+?\\2[ims]?$/', $str)) {
         return $str;
     }
     return nbGlob::globToRegex($str);
 }