-
Notifications
You must be signed in to change notification settings - Fork 146
/
Copy pathProcessDefinitionRepositoryInterface.php
56 lines (50 loc) · 1.32 KB
/
ProcessDefinitionRepositoryInterface.php
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
<?php
/*
* Copyright (c) Atsuhiro Kubo <[email protected]> and contributors,
* All rights reserved.
*
* This file is part of Workflower.
*
* This program and the accompanying materials are made available under
* the terms of the BSD 2-Clause License which accompanies this
* distribution, and is available at http://opensource.org/licenses/BSD-2-Clause
*/
namespace PHPMentors\Workflower\Workflow;
/**
* @since Class available since Release 2.0.0
*/
interface ProcessDefinitionRepositoryInterface
{
/**
* @param ProcessDefinitionInterface $definition
*
* @return ProcessDefinitionInterface}
*/
public function add(ProcessDefinitionInterface $definition);
/**
* @param string $id
*
* @return ProcessDefinitionInterface
*/
public function getLatestById(string $id);
/**
* @param string $name
*
* @return ProcessDefinitionInterface
*/
public function getLatestByName(string $name);
/**
* @param string $id
* @param int $version
*
* @return ProcessDefinitionInterface
*/
public function getVersionById(string $id, int $version);
/**
* @param string $name
* @param int $version
*
* @return ProcessDefinitionInterface
*/
public function getVersionByName(string $name, int $version);
}