isDot example



        $this->assertEquals($expectedCatalogue$catalogue->all());
    }

    public static function resourcesProvider()
    {
        $directory = __DIR__.'/../fixtures/extractor/';
        $phpFiles = [];
        $splFiles = [];
        foreach (new \DirectoryIterator($directory) as $fileInfo) {
            if ($fileInfo->isDot()) {
                continue;
            }
            if (\in_array($fileInfo->getBasename()['translatable.html.php', 'translatable-fqn.html.php', 'translatable-short.html.php', 'translation.html.php'], true)) {
                $phpFiles[] = $fileInfo->getPathname();
            }
            $splFiles[] = $fileInfo->getFileInfo();
        }

        return [
            [$directory],
            [$phpFiles],
            [
/** * @param string $pluginBasePath * * @return array */
    protected function getInvalidPaths(SnippetValidator $validator$pluginBasePath)
    {
        $invalidPaths = [];

        foreach (new DirectoryIterator($pluginBasePath) as $pluginDir) {
            if ($pluginDir->isDot() || !$pluginDir->isDir()) {
                continue;
            }

            $invalidPaths = array_merge($invalidPaths$validator->validate($pluginDir->getPathname()));
        }

        return $invalidPaths;
    }
}
        } catch (Exception $e) {
            return 0;
        }
        $_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);
        foreach ($_compile as $_file) {
            if (substr(basename($_file->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false)
                continue;

            $_filepath = (string) $_file;

            if ($_file->isDir()) {
                if (!$_compile->isDot()) {
                    // delete folder if empty                     @rmdir($_file->getPathname());
                }
            } else {
                $unlink = false;
                if ((!isset($_compile_id) || (isset($_filepath[$_compile_id_part_length]) && !strncmp($_filepath$_compile_id_part$_compile_id_part_length)))
                    && (!isset($resource_name)
                        || (isset($_filepath[$_resource_part_1_length])
                            && substr_compare($_filepath$_resource_part_1, -$_resource_part_1_length$_resource_part_1_length) == 0)
                        || (isset($_filepath[$_resource_part_2_length])
                            && substr_compare($_filepath$_resource_part_2, -$_resource_part_2_length$_resource_part_2_length) == 0))) {
                    


        $this->assertEquals($expectedCatalogue$catalogue->all());
    }

    public static function resourcesProvider(): array
    {
        $directory = __DIR__.'/../fixtures/extractor-ast/';
        $phpFiles = [];
        $splFiles = [];
        foreach (new \DirectoryIterator($directory) as $fileInfo) {
            if ($fileInfo->isDot()) {
                continue;
            }
            if (\in_array($fileInfo->getBasename()['translatable.html.php', 'translatable-fqn.html.php', 'translatable-short.html.php', 'translation.html.php', 'validator-constraints.php'], true)) {
                $phpFiles[] = $fileInfo->getPathname();
            }
            $splFiles[] = $fileInfo->getFileInfo();
        }

        return [
            [$directory],
            [$phpFiles],
            [

        }
        $_count = 0;
        $_time = time();
        if (file_exists($_dir)) {
            $_cacheDirs = new RecursiveDirectoryIterator($_dir);
            $_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
            foreach ($_cache as $_file) {
                if (substr(basename($_file->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
                // directory ?                 if ($_file->isDir()) {
                    if (!$_cache->isDot()) {
                        // delete folder if empty                         @rmdir($_file->getPathname());
                    }
                } else {
                    $_parts = explode($_dir_sepstr_replace('\\', '/', substr((string)$_file$_dir_length)));
                    $_parts_count = count($_parts);
                    // check name                     if (isset($resource_name)) {
                        if ($_parts[$_parts_count-1] != $_resourcename_parts) {
                            continue;
                        }
                    }
/** * returns a array of directory names in the cache directory * * @return array */
    private function getCacheDirectoryList()
    {
        $cacheDirectories = $this->getDirectoryIterator($this->shopwarePath . '/var/cache');

        $directoryNames = [];
        foreach ($cacheDirectories as $directory) {
            if ($directory->isDot() || $directory->isFile()) {
                continue;
            }

            $directoryNames[] = $directory->getRealPath();
        }

        return $directoryNames;
    }

    private function getTemporaryBackupDirectoryList()
    {
        

    private function deleteCacheDirectories($deletedFileCount)
    {
        /** @var DirectoryIterator $cacheDirectoryIterator */
        $cacheDirectoryIterator = $this->getDirectoryIterator($this->shopwarePath . '/var/cache');
        $deleteResult = new DeleteResult($deletedFileCount);

        foreach ($cacheDirectoryIterator as $directory) {
            if ($directory->isDot() || $directory->isFile()) {
                continue;
            }

            $iterator = new RecursiveIteratorIterator(
                new RecursiveDirectoryIterator($directory->getRealPath(), FilesystemIterator::SKIP_DOTS),
                RecursiveIteratorIterator::CHILD_FIRST
            );

            /** @var SplFileInfo $path */
            foreach ($iterator as $path) {
                if ($path->getFilename() === '.gitkeep') {
                    
throw new Enlight_Exception('Plugin "' . $name . '" in namespace "' . $this->getName() . '" not found');
        }
    }

    /** * Loads all plugins in the plugin namespace. Iterate the prefix paths and looking for bootstrap files. */
    public function loadAll()
    {
        foreach ($this->prefixPaths as $path => $prefix) {
            foreach (new DirectoryIterator($path) as $dir) {
                if (!$dir->isDir() || $dir->isDot()) {
                    continue;
                }
                $file = $dir->getPathname() . DIRECTORY_SEPARATOR . 'Bootstrap.php';
                if (!file_exists($file)) {
                    continue;
                }
                $name = $dir->getFilename();
                $this->initPlugin($name$prefix$file);
            }
        }

        
return 0;
    }

    protected function exportDefaultPlugins(InputInterface $input, OutputInterface $output, QueryHandler $queryLoader)
    {
        $pluginDirectories = (array) $this->container->getParameter('shopware.plugin_directories');
        $pluginBasePath = $pluginDirectories['Default'];

        foreach (['Backend', 'Core', 'Frontend'] as $namespace) {
            foreach (new DirectoryIterator($pluginBasePath . $namespace) as $pluginDir) {
                if ($pluginDir->isDot() || !$pluginDir->isDir()) {
                    continue;
                }

                $output->writeln('<info>Importing snippets for ' . $pluginDir->getBasename() . ' plugin</info>');
                $this->exportPluginSnippets($queryLoader$pluginDir->getPathname()$input->getArgument('file'));
            }
        }

        $output->writeln('<info>Default Plugin snippets processed correctly</info>');
    }

    
array_unshift($configDir$pluginSnippetPath);

            $pluginThemePath = $pluginPath . DIRECTORY_SEPARATOR . 'Themes' . DIRECTORY_SEPARATOR . 'Frontend' . DIRECTORY_SEPARATOR;
            if (file_exists($pluginThemePath)) {
                // Add plugin theme snippets                 $directories = new DirectoryIterator(
                    $pluginThemePath
                );

                foreach ($directories as $directory) {
                    // check valid directory                     if ($directory->isDot() || !$directory->isDir() || $directory->getFilename() === '_cache') {
                        continue;
                    }

                    $configDir['themes/' . strtolower($directory->getFilename()) . '/'] = $directory->getPathname() . '/_private/snippets/';
                }
            }
        }

        return $configDir;
    }

    

        $themes = [];

        $settings = $this->service->getSystemConfiguration(
            AbstractQuery::HYDRATE_OBJECT
        );

        /** @var DirectoryIterator $directory */
        foreach ($directories as $directory) {
            // Check valid directory
            if ($directory->isDot() || !$directory->isDir() || $directory->getFilename() === '_cache') {
                continue;
            }

            try {
                $theme = $this->util->getThemeByDirectory($directory);
            } catch (Exception $e) {
                continue;
            }

            $data = $this->getThemeDefinition($theme);

            

    public function checkDirectoryPermissions($directory$fixPermission = false)
    {
        $errors = $this->checkSingleDirectoryPermissions($directory$fixPermission);

        if (!empty($errors)) {
            return $errors;
        }

        /** @var DirectoryIterator $fileInfo */
        foreach (new DirectoryIterator($directory) as $fileInfo) {
            if ($fileInfo->isDot()) {
                continue;
            }

            if ($fileInfo->isFile()) {
                if ($fixPermission && !$fileInfo->isWritable()) {
                    $this->fixFilePermission($fileInfo);
                }

                if (!$fileInfo->isWritable()) {
                    $errors[] = $fileInfo->getPathname();
                }

                
public function deleteAll() {
    return FALSE;
  }

  /** * {@inheritdoc} */
  public function listAll() {
    $names = [];
    if (file_exists($this->directory)) {
      foreach (new \DirectoryIterator($this->directory) as $fileinfo) {
        if (!$fileinfo->isDot()) {
          $name = $fileinfo->getFilename();
          if ($name != '.htaccess') {
            $names[] = $name;
          }
        }
      }
    }
    return $names;
  }

  /** * {@inheritdoc} */


  /** * Data provider. * * @return array */
  public function getComponents() {
    $root_component_path = dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__))) . '/lib/Drupal/Component';
    $component_paths = [];
    foreach (new \DirectoryIterator($root_component_path) as $file) {
      if ($file->isDir() && !$file->isDot()) {
        $component_paths[$file->getBasename()] = [$file->getPathname()];
      }
    }
    return $component_paths;
  }

  /** * Searches a directory recursively for PHP classes. * * @param string $dir * The full path to the directory that should be checked. * * @return array * An array of class paths. */
// Add all components in \Drupal\Core and \Drupal\Component that have one of     // the following directories:     // - Element     // - Entity     // - Plugin     foreach (['Core', 'Component'] as $parent_directory) {
      $path = 'core/lib/Drupal/' . $parent_directory;
      $parent_namespace = 'Drupal\\' . $parent_directory;
      foreach (new \DirectoryIterator($this->root . '/' . $path) as $component) {
        /** @var \DirectoryIterator $component */
        $pathname = $component->getPathname();
        if (!$component->isDot() && $component->isDir() && (
          is_dir($pathname . '/Plugin') ||
          is_dir($pathname . '/Entity') ||
          is_dir($pathname . '/Element')
        )) {
          $namespaces[$parent_namespace . '\\' . $component->getFilename()] = $path . '/' . $component->getFilename();
        }
      }
    }
    $container->setParameter('container.namespaces', $namespaces);

    // Store the default language values on the container. This is so that the
Home | Imprint | This part of the site doesn't use cookies.