当前位置: 首页>>代码示例>>PHP>>正文


PHP eZSys::globBrace方法代码示例

本文整理汇总了PHP中eZSys::globBrace方法的典型用法代码示例。如果您正苦于以下问题:PHP eZSys::globBrace方法的具体用法?PHP eZSys::globBrace怎么用?PHP eZSys::globBrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eZSys的用法示例。


在下文中一共展示了eZSys::globBrace方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testGlobBraceSupported

 public function testGlobBraceSupported()
 {
     if (!defined('GLOB_BRACE')) {
         self::markAsSkipped("This test can only be run on systems supporting GLOB_BRACE.");
     }
     $pattern = "kernel/classes/ez{content,url}*.php";
     $eZSysGlob = eZSys::globBrace($pattern);
     $phpGlob = glob($pattern, GLOB_BRACE);
     self::assertEquals($eZSysGlob, $phpGlob, "Comparing glob() with eZSys::glob() using GLOB_BRACE");
     $eZSysGlob = eZSys::globBrace($pattern, GLOB_NOSORT);
     $phpGlob = glob($pattern, GLOB_NOSORT | GLOB_BRACE);
     self::assertEquals($eZSysGlob, $phpGlob, "Comparing glob() with eZSys::glob() using GLOB_MARK | GLOB_BRACE");
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:13,代码来源:ezsys_test.php

示例2: fileDeleteByDirList

 /**
  * Delete files located in a directories from dirList, with common prefix specified by
  * commonPath, and common suffix with added wildcard at the end
  *
  * \public
  * \static
  */
 function fileDeleteByDirList($dirList, $commonPath, $commonSuffix)
 {
     eZDebugSetting::writeDebug('kernel-clustering', "fs::fileDeleteByDirList( '" . implode(",", $dirList) . "', '{$commonPath}', '{$commonSuffix}' )", __METHOD__);
     eZDebug::accumulatorStart('dbfile', false, 'dbfile');
     foreach ($dirList as $dir) {
         $unlinkArray = eZSys::globBrace("{$commonPath}/{$dir}/{$commonSuffix}*");
         if ($unlinkArray !== false) {
             array_map('unlink', $unlinkArray);
         }
     }
     eZDebug::accumulatorStop('dbfile');
 }
开发者ID:schwabokaner,项目名称:ezpublish-legacy,代码行数:19,代码来源:ezfsfilehandler.php

示例3: fileDeleteByDirList

    /**
     * Delete files located in a directories from dirList, with common prefix specified by
     * commonPath, and common suffix with added wildcard at the end
     *
     * \public
     * \static
     * \sa fileDeleteByRegex()
     */
    function fileDeleteByDirList( $dirList, $commonPath, $commonSuffix )
    {
        $dirs = implode( ',', $dirList );
        $wildcard = $commonPath .'/{' . $dirs . '}/' . $commonSuffix . '*';

        eZDebugSetting::writeDebug( 'kernel-clustering', "fs::fileDeleteByDirList( '".implode(', ', $dirList)."', '$commonPath', '$commonSuffix' )", __METHOD__ );

        eZDebug::accumulatorStart( 'dbfile', false, 'dbfile' );
        array_map( array( __CLASS__, '_expire' ), eZSys::globBrace( $wildcard ) );
        eZDebug::accumulatorStop( 'dbfile' );
    }
开发者ID:nottavi,项目名称:ezpublish,代码行数:19,代码来源:ezfs2filehandler.php


注:本文中的eZSys::globBrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。