Completed
Pull Request — master (#15)
by
unknown
07:26
created

VersionMapperInterface::saveAll()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 1
ccs 0
cts 0
cp 0
1
<?php
2
/*
3
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
 *
15
 * This software consists of voluntary contributions made by many individuals
16
 * and is licensed under the MIT license. For more information, see
17
 * <http://www.doctrine-project.org>.
18
 */
19
20
namespace Baleen\Migrations\Delta\Repository\Mapper;
21
22
use Baleen\Migrations\Exception\Version\Repository\Mapper\MapperException;
23
use Baleen\Migrations\Delta\DeltaId;
24
25
/**
26
 * Interface VersionMapperInterface
27
 *
28
 * @author Gabriel Somoza <[email protected]>
29
 */
30
interface VersionMapperInterface
31
{
32
    /**
33
     * Fetches all available version ids
34
     *
35
     * @return DeltaId[]
36
     */
37
    public function fetchAll();
38
39
    /**
40
     * Return whether the specified DeltaId exists in storage
41
     *
42
     * @param DeltaId $id
43
     *
44
     * @return DeltaId
45
     */
46
    public function fetch(DeltaId $id);
47
48
    /**
49
     * Saves an array of DeltaId objects
50
     *
51
     * @param DeltaId[] $ids
52
     *
53
     * @return bool True on success.
54
     *
55
     * @throws MapperException On failure.
56
     */
57
    public function saveAll(array $ids);
58
59
    /**
60
     * Saves an id to storage
61
     *
62
     * @param DeltaId $id
63
     *
64
     * @return bool True on success.
65
     *
66
     * @throws MapperException On failure.
67
     */
68
    public function save(DeltaId $id);
69
70
    /**
71
     * Deletes an array of DeltaId objects
72
     *
73
     * @param DeltaId[] $id
74
     *
75
     * @return bool True on success.
76
     */
77
    public function deleteAll(array $id);
78
79
    /**
80
     * Deletes an id from storage
81
     *
82
     * @param DeltaId $id
83
     *
84
     * @return bool True on success.
85
     *
86
     * @throws MapperException On failure.
87
     */
88
    public function delete(DeltaId $id);
89
}
90