\FilesystemPublisher
Synopsis
class FilesystemPublisher
extends StaticPublisher
{
- // members
- protected string $destFolder = 'cache';
- protected string $fileExtension = 'html';
- private static $static_base_url = NULL;
- private static Boolean $domain_based_caching = false;
- // methods
- public static void set_static_base_url()
- public void __construct()
- public array urlsToPaths()
- public void unpublishPages()
- public array publishPages()
- protected string generatePHPCacheFile()
- protected string generatePHPCacheRedirection()
- public string getDestDir()
- public array getExistingStaticCacheFiles()
- // Inherited methods from StaticPublisher
- public abstract void publishPages()
- public abstract void unpublishPages()
- public static void set_static_publisher_theme()
- public static string static_publisher_theme()
- public static boolean echo_progress()
- public static void set_echo_progress()
- public void onAfterPublish()
- public void onRenameLinkedAsset()
- public void republish()
- public void onAfterUnpublish()
- public array getMetadata()
Hierarchy
Extends
Tasks
Line | Task |
---|---|
146 | - Make a more memory efficient publisher |
187 | - Make a more memory efficient publisher |
Members
private
- $domain_based_caching — Boolean
- $static_base_url — string
protected
- $destFolder — string
- $fileExtension — string
Methods
protected
- generatePHPCacheFile() — Generate the templated content for a PHP script that can serve up the given piece of content with the given age and expiry.
- generatePHPCacheRedirection() — Generate the templated content for a PHP script that can serve up a 301 redirect to the given destination.
public
- __construct()
- getDestDir()
- getExistingStaticCacheFiles() — Return an array of all the existing static cache files, as a map of URL => file. Only returns cache files that will actually map to a URL, based on urlsToPaths.
- publishPages() — Uses {@link Director::test()} to perform in-memory HTTP requests on the passed-in URLs.
- set_static_base_url() — Set a different base URL for the static copy of the site.
- unpublishPages()
- urlsToPaths() — Transforms relative or absolute URLs to their static path equivalent.
Inherited from StaticPublisher
public
- echo_progress()
- getMetadata()
- onAfterPublish() — Called after a page is published.
- onAfterUnpublish() — Get changes and hook into underlying functionality.
- onRenameLinkedAsset() — Called after link assets have been renamed, and the live site has been updated, without an actual publish event.
- publishPages()
- republish()
- set_echo_progress()
- set_static_publisher_theme()
- static_publisher_theme()
- unpublishPages()