tapestry-cloud / tapestry

PHP static site generator using the plates template system
https://www.tapestry.cloud/
MIT License
32 stars 1 forks source link

[2.0] Abstract sources #302

Closed carbontwelve closed 6 years ago

carbontwelve commented 6 years ago

The File entity that is used throughout Tapesty has been slimmed down and refactored to a ProjectFile class as per #284.

To enable alternative sources such as database, web api or programmatic the ProjectFile entity should be abstracted into a project entity interface. That interface can then be implemented by a base AbstractEntity which could then be extended by final classes such as: FilesystemSourceProjectFile, DatabaseSourceProjectFile, etc.

Source collectors could then be registered via configuration to fill the project entity table, with the default collector being FilesystemCollector.

Doing this would allow Tapestry to collect from a variety of sources and while the most useful use case is filesystem, it would make writing a management dashboard easier if it could read directly from a database.

carbontwelve commented 6 years ago

Abstract sources have been implemented as part of issue #297