Closed mjordan closed 6 years ago
Plugins can be invoked by specifying their names in a comma-separated list in the -g
option, for example -g Foo,Bar
. The ingester will look for a class file in the includes
directory named Foo.plugin.php
and if found, instantiate the class. Each plugin class has one required method, -execute()
and inherits the object directory, Monolog logger, and Commando command. See includes/Example.plugin.php
for more info.
All plugins are invoked at the beginning of each ingester's packageObject
method.
Closed with a83b3feec5fae130be547f00f67a3c925571f081.
It would be useful to generate derivative files such as TECHMD or even simple MODS for each object. In the former case, the plugin could call out to a local copy of FITS; in the latter, if MODS is missing, it could call a Twig template to generate a minimal MODS.xml containing a title and identifier.
Each plugin could be a PHP class file that extends a base class, and could be invoked as a comma-separated list on the commnd line, e.g.
--plugins GenerateFits,GenerateMods
and fired in that order.