예제 #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
파일: nbFileFinder.php 프로젝트: nubee/bee
 protected function toRegex($str)
 {
     if (preg_match('/^(!)?([^a-zA-Z0-9\\\\]).+?\\2[ims]?$/', $str)) {
         return $str;
     }
     return nbGlob::globToRegex($str);
 }