PHP Класс Yosymfony\Spress\Core\DataSource\Filesystem\FilesystemDataSource

The directory separator is '/' in any case. Source-root structure: |- includes |- layouts |- plugins |- content | |- posts | |- index.html | |- ... The item's attributes (metas) will be loaded from a block located at the top of the each file (frontmatter) or from a separated metadata file. e.g: - index.html - index.html.meta <- metadata file with the attributes. Each item will automatically receive some extra attributes: - mtime: : modified time. - filename : the name of the file. - extension : the extension of item's filename. If the filename is a date filename, a filename that matched a patter yyyy-mm-dd-title.extension, receive some extra attributes: - title - title_path - date If the filename is located in a subfolder of "posts/" receive an extra attribute "categories". Params: - source_root (string): the root directory. - include (array): force to include files or directories. e.g:"/tmp/files". - exclude (array): force to exclude files or directories. e.g: "post". - text_extensions (array): extension of the files considered as text files. e.g: "html". - attribute_syntax (string): syntax for describing attributes: "yaml" or "json". "yaml" by default. - avoid_renderizer_path (array): the files belong to declared path will have set up avoid_renderizer to true. - avoid_renderizer_extension (array): the filenames with an extension belong to declared will have set up avoid_renderizer to true.
Автор: Victor Puertas ([email protected])
Наследование: extends Yosymfony\Spress\Core\DataSource\AbstractDataSource
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
configure ( )
getIncludes ( )
getItems ( )
getLayouts ( )
process ( )

Приватные методы

Метод Описание
avoidRenderizer ( $extension, $relativePath )
composeSubPath ( $path )
getAttributesFilename ( splfileinfo $file )
getModifiedTime ( Symfony\Component\Finder\SplFileInfo $file )
getResolver ( )
isBinary ( Symfony\Component\Finder\SplFileInfo $file )
isDateFilename ( $filename )
normalizeDirSeparator ( $path )
processAttributes ( Item $item, Symfony\Component\Finder\SplFileInfo $file )
processContentFiles ( )
processIncludeFiles ( )
processItems ( Finder $finder, $type )
processLayoutFiles ( )

Описание методов

configure() публичный Метод

public configure ( )

getIncludes() публичный Метод

public getIncludes ( )

getItems() публичный Метод

public getItems ( )

getLayouts() публичный Метод

public getLayouts ( )

process() публичный Метод

public process ( )