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