October\Rain\Halcyon\Datasource\AutoDatasource

Overview

AutoDatasource loads templates from multiple data sources

Extends
Implements
  • October\Rain\Halcyon\Datasource\DatasourceInterface

Protected Properties

There are no protected properties in the class.

Show inherited protected properties

Inherited Protected Properties


Public Methods

public __construct()

public __construct($datasources): void

__construct create a new datasource instance

public delete()

public delete($dirName, $fileName, $extension): bool 

delete against the datasource

public forceDelete()

public forceDelete($dirName, $fileName, $extension): bool 

forceDelete against the datasource, forcing the complete removal of the template

public forceDeleteModelAtIndex()

public forceDeleteModelAtIndex($index, $model): bool 

deleteModelAtIndex against a specific datasource index

public hasIndex()

public hasIndex($index): void

hasIndex returns true if the specified index exists in datasources

public hasModelAtIndex()

public hasModelAtIndex($index, $model): bool 

public hasTemplate()

public hasTemplate($dirName, $fileName, $extension): bool 

hasTemplate checks if a template is found in the datasource

public insert()

public insert($dirName, $fileName, $extension, $content): bool 

insert creates a new template

public lastModified()

public lastModified($dirName, $fileName, $extension): int|null 

lastModified returns the last modified date of an object

public makeCacheKey()

public makeCacheKey($name = ''): string 

makeCacheKey unique to this datasource

public select()

public select($dirName, $options = []): array 

select returns all templates

public selectOne()

public selectOne($dirName, $fileName, $extension): void

selectOne returns a single template

public update()

public update(
    $dirName,
    $fileName,
    $extension,
    $content,
    $oldFileName = null,
    $oldExtension = null
): int 

update an existing template

public updateModelAtIndex()

public updateModelAtIndex($index, $model): int 

updateModelAtIndex updates at a specific datasource index

Show inherited public methods

Inherited Public Methods

Protected Methods

Show inherited protected methods

Inherited Protected Methods