-
Notifications
You must be signed in to change notification settings - Fork 243
Expand file tree
/
Copy pathDefinitionsRepository.php
More file actions
96 lines (80 loc) · 2.16 KB
/
Copy pathDefinitionsRepository.php
File metadata and controls
96 lines (80 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
namespace ProcessMaker\Repositories;
use ProcessMaker\Bpmn\Process;
use ProcessMaker\Models\CallActivity;
use ProcessMaker\Models\DataStore;
use ProcessMaker\Models\FormalExpression;
use ProcessMaker\Models\Message;
use ProcessMaker\Models\MessageEventDefinition;
use ProcessMaker\Models\SignalEventDefinition;
use ProcessMaker\Models\TimerExpression;
use ProcessMaker\Nayra\Contracts\RepositoryInterface;
use ProcessMaker\Nayra\RepositoryTrait;
/**
* Definitions Repository
*/
class DefinitionsRepository implements RepositoryInterface
{
use RepositoryTrait;
private $tokenRepository = null;
public function createCallActivity()
{
return new CallActivity();
}
public function createExecutionInstanceRepository()
{
return new ExecutionInstanceRepository();
}
public function createFormalExpression()
{
return new FormalExpression();
}
public function createTimerExpression()
{
return new TimerExpression();
}
/**
* Creates a TokenRepository
*
* @return \ProcessMaker\Nayra\Contracts\Repositories\TokenRepositoryInterface
*/
public function getTokenRepository()
{
if ($this->tokenRepository === null) {
$this->tokenRepository = new TokenRepository($this->createExecutionInstanceRepository());
}
return $this->tokenRepository;
}
public function createDataStore()
{
return new DataStore();
}
public function createMessageEventDefinition()
{
return new MessageEventDefinition();
}
public function createMessage()
{
return new Message();
}
/**
* Create instance of Process.
*
* @return \ProcessMaker\Nayra\Contracts\Bpmn\ProcessInterface
*/
public function createProcess()
{
$process = new Process();
$process->setRepository($this);
return $process;
}
/**
* Create instance of SignalEventDefinition.
*
* @return \ProcessMaker\Nayra\Contracts\Bpmn\SignalEventDefinitionInterface
*/
public function createSignalEventDefinition()
{
return new SignalEventDefinition();
}
}