October\Rain\Halcyon\Datasource\AutoDatasource

Extends:

Implements:

  • October\Rain\Halcyon\Datasource\DatasourceInterface

AutoDatasource loads templates from multiple data sources

Protected properties

There are no protected properties in the class.

Show inherited protected properties

Inherited protected properties

Public methods

public void __construct($datasources)

__construct create a new datasource instance

Parameters
  • $datasources

public void delete($dirName, $fileName, $extension)

delete against the datasource

Parameters
  • $dirName
  • $fileName
  • $extension

public void forceDelete($dirName, $fileName, $extension)

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

Parameters
  • $dirName
  • $fileName
  • $extension

public void forceDeleteModelAtIndex($index, $model)

deleteModelAtIndex against a specific datasource index

Parameters
  • $index
  • $model

public void hasIndex($index)

hasIndex returns true if the specified index exists in datasources

Parameters
  • $index

public void hasModelAtIndex($index, $model)

hasModelAtIndex

Parameters
  • $index
  • $model

public void hasTemplate($dirName, $fileName, $extension)

hasTemplate checks if a template is found in the datasource

Parameters
  • $dirName
  • $fileName
  • $extension

public void insert($dirName, $fileName, $extension, $content)

insert creates a new template

Parameters
  • $dirName
  • $fileName
  • $extension
  • $content

public void lastModified($dirName, $fileName, $extension)

lastModified returns the last modified date of an object

Parameters
  • $dirName
  • $fileName
  • $extension

public void makeCacheKey($name='')

makeCacheKey unique to this datasource

Parameters
  • $name

public void select($dirName, $options=array())

select returns all templates

Parameters
  • $dirName
  • $options

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

selectOne returns a single template

Parameters
  • $dirName
  • $fileName
  • $extension

public void update($dirName, $fileName, $extension, $content, $oldFileName=NULL, $oldExtension=NULL)

update an existing template

Parameters
  • $dirName
  • $fileName
  • $extension
  • $content
  • $oldFileName
  • $oldExtension

public void updateModelAtIndex($index, $model)

updateModelAtIndex updates at a specific datasource index

Parameters
  • $index
  • $model

Show inherited public methods

Inherited public methods

Protected methods

Show inherited protected methods

Inherited protected methods