Skip to content
Snippets Groups Projects
Commit adb605ca authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

rolout interface: php8 only; added variable types

parent fd6d6eea
No related branches found
No related tags found
1 merge request!66php8 only; added variable types; short array syntax; remove glyphicons
...@@ -3,23 +3,31 @@ ...@@ -3,23 +3,31 @@
* INTERFACE for rollout plugins * INTERFACE for rollout plugins
* *
* @author hahn * @author hahn
*
* Axel <axel.hahn@unibe.ch>
* 2024-08-29 Axel php8 only; added variable types
*/ */
interface iRolloutplugin { interface iRolloutplugin
{
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// VERIFY // VERIFY
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
/** /**
* check requirements if the plugin could work * Get an array with shell commands to check requirements if the plugin
* can work
*
* @return array * @return array
*/ */
public function checkRequirements(): 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 // SETTER
...@@ -30,40 +38,61 @@ interface iRolloutplugin { ...@@ -30,40 +38,61 @@ interface iRolloutplugin {
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
/** /**
* 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 string $sPhase
* @param boolean $bMask Flag for public output; if true then mask your secrets * @param boolean $bMask Flag for public output; if true then mask your secrets
* @return array * @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 string $sPhase
* @param boolean $bMask Flag for public output; if true then mask your secrets * @param boolean $bMask Flag for public output; if true then mask your secrets
* @return array * @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 // 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 // ACTIONS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment