Esempio n. 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$#"');
Esempio n. 2
0
File: nbGlob.php Progetto: nubee/bee
 public static function setStrictWildcardSlash($boolean)
 {
     self::$strictWildcardSlash = $boolean;
 }
Esempio n. 3
0
 protected function toRegex($str)
 {
     if (preg_match('/^(!)?([^a-zA-Z0-9\\\\]).+?\\2[ims]?$/', $str)) {
         return $str;
     }
     return nbGlob::globToRegex($str);
 }