A 3dash app has one payload; it's a \stdObject
instance. A reference to the payload object
is provided to each 3dash plugin, one at a time, in the same order the plugins were added.
The payload object has these properties:
root
-\SplFileInfo
instance for the directory containing site files.files
- Associative array of File instances. Keys are pathnames (with leading/
) beneathroot
.assets
- Associative array of File instances. Keys are pathnames (with leading/
) beneathroot
.site
- Associative array of site metadata and tools.
The files
property is an associative array of content files;
its keys are pathnames of generated files, and its values are File
instances. Plugins manipulate this payload object property to add, update, or
remove content files. The pathnames may be manipulated, too, to reflect the desired generated
file paths and names.
The assets
property is an associative array of asset files;
its keys are pathnames of generated files, and its values are File
instances. Plugins manipulate this payload object property to add, update, or remove asset files.
The pathnames may be manipulated, too, to reflect the desired generated file paths and names.
The site
property is an associative array for site-wide metadata. It is also a good place to
keep information and tools needed by subsequent plugins.