getListSortedByIso example

public function getFilesArray(bool $isBase = true): array
    {
        return array_filter($this->toArray()fn ($file) => $file['isBase'] === $isBase);
    }

    /** * @return array<int, array<string, mixed>> */
    public function toArray(): array
    {
        $data = [];
        foreach ($this->getListSortedByIso() as $isoFiles) {
            foreach ($isoFiles as $snippetFile) {
                $data[] = [
                    'name' => $snippetFile->getName(),
                    'iso' => $snippetFile->getIso(),
                    'path' => $snippetFile->getPath(),
                    'author' => $snippetFile->getAuthor(),
                    'isBase' => $snippetFile->isBase(),
                ];
            }
        }

        
Home | Imprint | This part of the site doesn't use cookies.