ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilScriptActivity.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
5 require_once './Services/WorkflowEngine/interfaces/ilActivity.php';
7 require_once './Services/WorkflowEngine/interfaces/ilNode.php';
8 
18 {
20  private $context;
21 
23  private $method = '';
24 
26  protected $name;
27 
33  public function __construct(ilNode $context)
34  {
35  $this->context = $context;
36  }
37 
41  public function setMethod($value)
42  {
43  $this->method = $value;
44  }
45 
53  public function getScript()
54  {
55  return $this->method;
56  }
57 
63  public function execute()
64  {
66  $return_value = $this->context->getContext()->$method($this);
67  foreach ((array) $return_value as $key => $value) {
68  $this->context->setRuntimeVar($key, $value);
69  }
70  }
71 
77  public function getContext()
78  {
79  return $this->context;
80  }
81 
85  public function setName($name)
86  {
87  $this->name = $name;
88  }
89 
93  public function getName()
94  {
95  return $this->name;
96  }
97 }
ilWorkflowEngineElement Interface is part of the petri net based workflow engine. ...
execute()
Executes this action according to its settings.
PhpIncludeInspection
getScript()
Returns the value of the setting to be set.
PhpIncludeInspection
Definition: ilNode.php:25
getContext()
Returns a reference to the parent node.
ilActivity Interface is part of the petri net based workflow engine.
Definition: ilActivity.php:15
$key
Definition: croninfo.php:18
__construct(ilNode $context)
Default constructor.