diff --git a/public_html/deployment/classes/rollout.interface.php b/public_html/deployment/classes/rollout.interface.php index cc495b18ddc210f1744c36de6cfb9ee9f752521e..888e14edbf331457600c632425478a456c5756f6 100644 --- a/public_html/deployment/classes/rollout.interface.php +++ b/public_html/deployment/classes/rollout.interface.php @@ -3,72 +3,101 @@ * INTERFACE for rollout plugins * * @author hahn + * + * Axel <axel.hahn@unibe.ch> + * 2024-08-29 Axel php8 only; added variable types */ -interface iRolloutplugin { +interface iRolloutplugin +{ // ---------------------------------------------------------------------- // VERIFY // ---------------------------------------------------------------------- - + /** - * check requirements if the plugin could work + * Get an array with shell commands to check requirements if the plugin + * can work + * * @return array */ public function checkRequirements(): array; - + /** - * check access to a deploy target + * Get an array with shell commands to check access to a deploy target + * + * @return array */ - public function checkConnectionToTarget(); + public function checkConnectionToTarget(): array; // ---------------------------------------------------------------------- // SETTER // ---------------------------------------------------------------------- - + // ---------------------------------------------------------------------- // GETTER // ---------------------------------------------------------------------- /** - * get configuration for the project .. or more specifi for a given phase + * Get configuration array for the project .. or more specific for a given phase + * * @param string $sPhase * @param boolean $bMask Flag for public output; if true then mask your secrets * @return array */ - public function getConfig($sPhase=false, $bMask=false); - + public function getConfig(string $sPhase = '', bool $bMask = false): array; + /** - * get an array with shell commands to execute + * Get an array with shell commands to execute for deployment of built file + * * @param string $sPhase * @param boolean $bMask Flag for public output; if true then mask your secrets * @return array */ - public function getDeployCommands($sPhase, $bMask=false); + public function getDeployCommands(string $sPhase, bool $bMask = false): array; /** - * get name of plugin as string ... language specific + * Get name of plugin as string ... language specific + * @return string */ - public function getName(); - + public function getName(): string; + /** - * get description of plugin as string ... language specific + * Get description of plugin as string ... language specific + * @return string */ - public function getDescription(); - + public function getDescription(): string; + /** - * get array of data in info.js + * Get array of data in info.js + * @return array */ - public function getPluginInfos(); + public function getPluginInfos(): array; + // ---------------------------------------------------------------------- // RENDERER // ---------------------------------------------------------------------- - public function renderFormdata4Project(); - public function renderFormdata4Phase($sPhase); + + /** + * form renderer: show + * - formvars for project OR + * - a single message that no configuration items exists + * + * @return string + */ + public function renderFormdata4Project(): string; + + /** + * form renderer: show configuration for a given phase + + * @param string $sPhase phaese; one of preview|stage|live + * @return string + */ + public function renderFormdata4Phase(string $sPhase): string; // ---------------------------------------------------------------------- // ACTIONS // ---------------------------------------------------------------------- - + }