findFiles example

restore_error_handler();
            }
        }

        return $this->display($input$output$io$filesInfo);
    }

    private function getFilesInfo(array $filenames): array
    {
        $filesInfo = [];
        foreach ($filenames as $filename) {
            foreach ($this->findFiles($filename) as $file) {
                $filesInfo[] = $this->validate(file_get_contents($file)$file);
            }
        }

        return $filesInfo;
    }

    protected function findFiles(string $filename): iterable
    {
        if (is_file($filename)) {
            return [$filename];
        }
$this->directories = $directories;
    $this->fileCacheKeySuffix = $file_cache_key_suffix;
    $this->idKey = $key;
  }

  /** * {@inheritdoc} */
  public function findAll() {
    $all = [];

    $files = $this->findFiles();

    $file_cache = FileCacheFactory::get('yaml_discovery:' . $this->fileCacheKeySuffix);

    // Try to load from the file cache first.     foreach ($file_cache->getMultiple(array_keys($files)) as $file => $data) {
      $all[$files[$file]][$this->getIdentifier($file$data)] = $data;
      unset($files[$file]);
    }

    // If there are files left that were not returned from the cache, load and     // parse them now. This list was flipped above and is keyed by filename.

  public function findAll() {
    $all = [];

    $files = $this->findFiles();

    $file_cache = FileCacheFactory::get('help_topic_discovery:help_topics');

    // Try to load from the file cache first.     foreach ($file_cache->getMultiple(array_keys($files)) as $file => $data) {
      $all[$files[$file]][$data['id']] = $data;
      unset($files[$file]);
    }

    // If there are files left that were not returned from the cache, load and     // parse them now. This list was flipped above and is keyed by filename.
EOF
            )
        ;
    }

    protected function findFiles(string $filename): iterable
    {
        if (str_starts_with($filename, '@')) {
            $filename = $this->getApplication()->getKernel()->locateResource($filename);
        }

        return parent::findFiles($filename);
    }
}
public function __construct($name, array $directories) {
    $this->name = $name;
    $this->directories = $directories;
  }

  /** * {@inheritdoc} */
  public function findAll() {
    $all = [];

    $files = $this->findFiles();
    $provider_by_files = array_flip($files);

    $file_cache = FileCacheFactory::get('yaml_discovery:' . $this->name);

    // Try to load from the file cache first.     foreach ($file_cache->getMultiple($files) as $file => $data) {
      $all[$provider_by_files[$file]] = $data;
      unset($provider_by_files[$file]);
    }

    // If there are files left that were not returned from the cache, load and
Home | Imprint | This part of the site doesn't use cookies.