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


PHP Files::composeDataSets方法代码示例

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


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

示例1: modulesFilesDataProvider

 /**
  * Return refactored files
  *
  * @return array
  */
 public function modulesFilesDataProvider()
 {
     $filesList = [];
     foreach ($this->getFilesData('whitelist/refactored_modules*') as $refactoredFolder) {
         $files = \Magento\Framework\App\Utility\Files::init()->getFiles([$this->appPath . $refactoredFolder], '*.php');
         $filesList = array_merge($filesList, $files);
     }
     $result = array_map('realpath', $filesList);
     $result = array_diff($result, $this->filesBlackList);
     return \Magento\Framework\App\Utility\Files::composeDataSets($result);
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:16,代码来源:ObsoleteResponseTest.php

示例2: getPhpFiles

 /**
  * Returns array of PHP-files, that use or declare Magento application classes and Magento libs
  *
  * @param string $changedFilesList
  * @return array
  */
 public static function getPhpFiles($changedFilesList)
 {
     $fileHelper = \Magento\Framework\App\Utility\Files::init();
     if (isset($_ENV['INCREMENTAL_BUILD'])) {
         $phpFiles = Files::readLists($changedFilesList);
         if (!empty($phpFiles)) {
             $phpFiles = \Magento\Framework\App\Utility\Files::composeDataSets($phpFiles);
             $phpFiles = array_intersect_key($phpFiles, $fileHelper->getPhpFiles());
         }
     } else {
         $phpFiles = $fileHelper->getPhpFiles();
     }
     return $phpFiles;
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:20,代码来源:ChangedFiles.php

示例3: modulesFilesDataProvider

 /**
  * Return refactored files
  *
  * @return array
  */
 public function modulesFilesDataProvider()
 {
     $filesList = [];
     $componentRegistrar = new ComponentRegistrar();
     foreach ($this->getFilesData('whitelist/refactored_modules*') as $refactoredModule) {
         if ($componentRegistrar->getPath(ComponentRegistrar::MODULE, $refactoredModule)) {
             $files = \Magento\Framework\App\Utility\Files::init()->getFiles([$componentRegistrar->getPath(ComponentRegistrar::MODULE, $refactoredModule)], '*.php');
             $filesList = array_merge($filesList, $files);
         }
     }
     $result = array_map('realpath', $filesList);
     $result = array_diff($result, $this->filesBlackList);
     return \Magento\Framework\App\Utility\Files::composeDataSets($result);
 }
开发者ID:koliaGI,项目名称:magento2,代码行数:19,代码来源:ObsoleteConnectionTest.php

示例4: getPhpFiles

 /**
  * Returns array of PHP-files, that use or declare Magento application classes and Magento libs
  *
  * @param string $changedFilesList
  * @return array
  */
 public static function getPhpFiles($changedFilesList)
 {
     $fileHelper = \Magento\Framework\App\Utility\Files::init();
     if (isset($_ENV['INCREMENTAL_BUILD'])) {
         $phpFiles = [];
         foreach (glob($changedFilesList) as $listFile) {
             $phpFiles = array_merge($phpFiles, file($listFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES));
         }
         array_walk($phpFiles, function (&$file) {
             $file = BP . '/' . $file;
         });
         if (!empty($phpFiles)) {
             $phpFiles = \Magento\Framework\App\Utility\Files::composeDataSets($phpFiles);
             $phpFiles = array_intersect_key($phpFiles, $fileHelper->getPhpFiles(Files::INCLUDE_APP_CODE | Files::INCLUDE_PUB_CODE | Files::INCLUDE_LIBS | Files::INCLUDE_TEMPLATES | Files::INCLUDE_TESTS | Files::AS_DATA_SET | Files::INCLUDE_NON_CLASSES));
         }
     } else {
         $phpFiles = $fileHelper->getPhpFiles(Files::INCLUDE_APP_CODE | Files::INCLUDE_PUB_CODE | Files::INCLUDE_LIBS | Files::INCLUDE_TEMPLATES | Files::INCLUDE_TESTS | Files::AS_DATA_SET | Files::INCLUDE_NON_CLASSES);
     }
     return $phpFiles;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:26,代码来源:ChangedFiles.php

示例5: testMageMethodsObsolete

 public function testMageMethodsObsolete()
 {
     $ignored = $this->getBlacklistFiles();
     $files = Files::init()->getPhpFiles(Files::INCLUDE_APP_CODE | Files::INCLUDE_TESTS | Files::INCLUDE_DEV_TOOLS | Files::INCLUDE_LIBS);
     $files = array_map('realpath', $files);
     $files = array_diff($files, $ignored);
     $files = Files::composeDataSets($files);
     $invoker = new AggregateInvoker($this);
     $invoker(function ($file) {
         $this->_assertNotRegExp('/[^a-z\\d_]Mage\\s*::/i', file_get_contents($file), '"Mage" class methods are obsolete');
     }, $files);
 }
开发者ID:whoople,项目名称:magento2-testing,代码行数:12,代码来源:ObsoleteCodeTest.php

示例6: mageObsoleteDataProvider

 /**
  * @return array
  */
 public function mageObsoleteDataProvider()
 {
     $blackList = (include __DIR__ . '/_files/blacklist/obsolete_mage.php');
     $ignored = [];
     $appPath = \Magento\Framework\App\Utility\Files::init()->getPathToSource();
     foreach ($blackList as $file) {
         $ignored[] = realpath($appPath . '/' . $file);
     }
     $files = \Magento\Framework\App\Utility\Files::init()->getClassFiles(true, true, true, true, false);
     $files = array_map('realpath', $files);
     $files = array_diff($files, $ignored);
     return \Magento\Framework\App\Utility\Files::composeDataSets($files);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:16,代码来源:ObsoleteCodeTest.php


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