當前位置: 首頁>>代碼示例>>PHP>>正文


PHP StringHelper::MaskCheck方法代碼示例

本文整理匯總了PHP中StringHelper::MaskCheck方法的典型用法代碼示例。如果您正苦於以下問題:PHP StringHelper::MaskCheck方法的具體用法?PHP StringHelper::MaskCheck怎麽用?PHP StringHelper::MaskCheck使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在StringHelper的用法示例。


在下文中一共展示了StringHelper::MaskCheck方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: GetFiles

 public static function GetFiles($directory, $ignoreFiles = null, $ignoreMasks = null)
 {
     if (!is_dir($directory)) {
         return false;
     }
     $items = new \RecursiveDirectoryIterator($directory);
     $files = array();
     foreach (new \RecursiveIteratorIterator($items) as $filename => $current) {
         if (!is_dir($filename) && !in_array($current->GetFileName(), $ignoreFiles) && !\StringHelper::MaskCheck($filename, $ignoreMasks)) {
             $files[] = $filename;
         }
     }
     return $files;
 }
開發者ID:dotBunny,項目名稱:Blueprint,代碼行數:14,代碼來源:core.php

示例2: ProcessSiteFolder

 private function ProcessSiteFolder($source, $dest, $folderPermissions, $filePermissions, $ignoreFiles = null, $ignoreMasks = null)
 {
     // Check for symlinks
     if (is_link($source)) {
         // No support for symlinks
         return true;
         //            return symlink(readlink($source), $dest);
     }
     // If it truly is a file
     if (is_file($source)) {
         // Check file is a Blueprint, ignore if it is and add it to the views, else copy it.
         $check = strpos(file_get_contents($source), TAG_START . TAG_BLUEPRINT);
         if ($check !== false) {
             $this->views[] = new View($this, $source);
             return true;
         }
         // Is this file a compress-ible file?
         if ($this->getGlobalCompression()) {
             // Copy / Return the already minimized versions of libraries
             if (strpos($source, ".min.") || strpos($source, "-min.")) {
                 Core::Output(INFO, "Not Compressing " . $source);
                 return copy($source, $dest);
             }
             switch (strtolower(pathinfo($dest, PATHINFO_EXTENSION))) {
                 case 'js':
                     $minifier = new Minify\JS($source);
                     Core::Output(INFO, "Compressing " . $source);
                     return file_put_contents($dest, $minifier->minify());
                 case 'css':
                     $minifier = new Minify\CSS($source);
                     Core::Output(INFO, "Compressing " . $source);
                     return file_put_contents($dest, $minifier->minify());
                 default:
                     return copy($source, $dest);
             }
         } else {
             return copy($source, $dest);
         }
     }
     // Make destination directory
     if (!is_dir($dest)) {
         mkdir($dest, $folderPermissions, true);
     }
     // Loop through the folder
     $dir = dir($source);
     while (false !== ($entry = $dir->read())) {
         // Skip pointers
         if ($entry == '.' || $entry == '..' || in_array($entry, $ignoreFiles) || \StringHelper::MaskCheck($entry, $ignoreMasks)) {
             continue;
         }
         // Deep copy directories
         $this->ProcessSiteFolder("{$source}/{$entry}", "{$dest}/{$entry}", $folderPermissions, $filePermissions, $ignoreFiles, $ignoreMasks);
     }
     // Clean up
     $dir->close();
     return true;
 }
開發者ID:dotBunny,項目名稱:Blueprint,代碼行數:57,代碼來源:project.php


注:本文中的StringHelper::MaskCheck方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。