PHP Class 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.
Author: Victor Puertas ([email protected])
Inheritance: extends Yosymfony\Spress\Core\DataSource\AbstractDataSource
Show file Open project: spress/spress Class Usage Examples

Public Methods

Method Description
configure ( )
getIncludes ( )
getItems ( )
getLayouts ( )
process ( )

Private Methods

Method Description
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 ( )

Method Details

configure() public method

public configure ( )

getIncludes() public method

public getIncludes ( )

getItems() public method

public getItems ( )

getLayouts() public method

public getLayouts ( )

process() public method

public process ( )