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


PHP WriteInterface::isDirectory方法代码示例

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


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

示例1: cleanGeneratedFiles

 /**
  * Clean var/generation, var/di and var/cache
  *
  * @return void
  */
 public function cleanGeneratedFiles()
 {
     if ($this->write->isExist(self::REGENERATE_FLAG)) {
         $enabledCacheTypes = [];
         //TODO: to be removed in scope of MAGETWO-53476
         $deploymentConfig = $this->directoryList->getPath(DirectoryList::CONFIG);
         $configPool = new ConfigFilePool();
         $envPath = $deploymentConfig . '/' . $configPool->getPath(ConfigFilePool::APP_ENV);
         if ($this->write->isExist($this->write->getRelativePath($envPath))) {
             $enabledCacheTypes = $this->getEnabledCacheTypes();
             $this->disableAllCacheTypes();
         }
         //TODO: Till here
         $cachePath = $this->write->getRelativePath($this->directoryList->getPath(DirectoryList::CACHE));
         $generationPath = $this->write->getRelativePath($this->directoryList->getPath(DirectoryList::GENERATION));
         $diPath = $this->write->getRelativePath($this->directoryList->getPath(DirectoryList::DI));
         // Clean var/generation dir
         if ($this->write->isDirectory($generationPath)) {
             $this->write->delete($generationPath);
         }
         // Clean var/di
         if ($this->write->isDirectory($diPath)) {
             $this->write->delete($diPath);
         }
         // Clean var/cache
         if ($this->write->isDirectory($cachePath)) {
             $this->write->delete($cachePath);
         }
         $this->write->delete(self::REGENERATE_FLAG);
         $this->enableCacheTypes($enabledCacheTypes);
     }
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:37,代码来源:GeneratedFiles.php

示例2: _createCertFile

 /**
  * Create physical certificate file based on DB data
  *
  * @param string $file
  * @return void
  */
 protected function _createCertFile($file)
 {
     if ($this->varDirectory->isDirectory(self::BASEPATH_PAYPAL_CERT)) {
         $this->_removeOutdatedCertFile();
     }
     $this->varDirectory->writeFile($file, $this->encryptor->decrypt($this->getContent()));
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:13,代码来源:Cert.php

示例3: isReadableDirectory

 /**
  * Checks if directory exists and is readable
  *
  * @param \Magento\Framework\Filesystem\Directory\WriteInterface $directory
  * @return bool
  */
 protected function isReadableDirectory($directory)
 {
     if (!$directory->isExist() || !$directory->isDirectory() || !$directory->isReadable()) {
         return false;
     }
     return true;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:13,代码来源:FilePermissions.php


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