createSnippetFile example

if (!is_dir($snippetDir)) {
            return [];
        }

        $finder = $this->getSnippetFinder($snippetDir);

        $snippetFiles = [];

        foreach ($finder->getIterator() as $fileInfo) {
            $nameParts = explode('.', $fileInfo->getFilenameWithoutExtension());

            $snippetFile = $this->createSnippetFile($nameParts$fileInfo$author);

            if ($snippetFile) {
                $snippetFiles[] = $snippetFile;
            }
        }

        return $snippetFiles;
    }

    private function getSnippetFinder(string $snippetDir): Finder
    {
        
Home | Imprint | This part of the site doesn't use cookies.