/** * Check if we meet all variable requirements * * @param array $requirements * @return bool */ protected function meetsVariableRequirements(array $requirements) { foreach ($requirements as $key => $value) { if ($this->memory_pool->get($key) != $value) { return false; } } return true; }
/** * Input factory for the charlie task * * @param string $input * @param WorkflowHistory $history * @param MemoryPoolInterface $memory_pool * @return string */ public static function buildInput($input, WorkflowHistory $history, MemoryPoolInterface $memory_pool) { $out = ['bravo-memory' => $memory_pool->get('bravo'), 'bravo-result' => $input]; return json_encode($out); }
/** * Parse the input and return the value of a variable from the memory pool * * @param string $in * @return string */ protected function parseVariable($in) { return $this->memory_pool->get($in); }
/** * Check if the flag has been raised * * @return bool */ public function isRaised() { return $this->memory_pool->get($this->key, '0') === '1'; }