Exemple #1
0
 /**
  * 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;
 }
Exemple #2
0
 /**
  * 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);
 }
Exemple #3
0
 /**
  * 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);
 }
Exemple #4
0
 /**
  * Check if the flag has been raised
  *
  * @return bool
  */
 public function isRaised()
 {
     return $this->memory_pool->get($this->key, '0') === '1';
 }