graph-tools-php

Форк
0
/
VertexConditionInterface.php 
71 строка · 2.0 Кб
1
<?php
2

3
namespace Smoren\GraphTools\Conditions\Interfaces;
4

5
use Smoren\GraphTools\Models\Interfaces\VertexInterface;
6

7
/**
8
 * Interface for vertex condition
9
 * @author Smoren <ofigate@gmail.com>
10
 */
11
interface VertexConditionInterface
12
{
13
    /**
14
     * Returns whitelist of vertex types or null if whitelist is not defined
15
     * @return array<string>|null
16
     */
17
    public function getVertexTypesOnly(): ?array;
18

19
    /**
20
     * Returns blacklist of vertex types
21
     * @return array<string>
22
     */
23
    public function getVertexTypesExcluded(): array;
24

25
    /**
26
     * Returns whitelist of vertex ids or null if whitelist is not defined
27
     * @return array<string>|null
28
     */
29
    public function getVertexIdsOnly(): ?array;
30

31
    /**
32
     * Returns blacklist of vertex ids
33
     * @return array<string>
34
     */
35
    public function getVertexIdsExcluded(): array;
36

37
    /**
38
     * Sets whitelist of vertex types
39
     * @param array<string>|null $types whitelist (null if whitelist is not defined)
40
     * @return VertexConditionInterface
41
     */
42
    public function onlyVertexTypes(?array $types): VertexConditionInterface;
43

44
    /**
45
     * Sets blacklist of vertex types
46
     * @param array<string> $types blacklist
47
     * @return VertexConditionInterface
48
     */
49
    public function excludeVertexTypes(array $types): VertexConditionInterface;
50

51
    /**
52
     * Sets whitelist of vertex ids
53
     * @param array<string>|null $ids whitelist (null if whitelist is not defined)
54
     * @return VertexConditionInterface
55
     */
56
    public function onlyVertexIds(?array $ids): VertexConditionInterface;
57

58
    /**
59
     * Sets blacklist of vertex ids
60
     * @param array<string> $ids blacklist
61
     * @return VertexConditionInterface
62
     */
63
    public function excludeVertexIds(array $ids): VertexConditionInterface;
64

65
    /**
66
     * Returns true if vertex satisfies the condition
67
     * @param VertexInterface $vertex vertex to check
68
     * @return bool
69
     */
70
    public function isSuitableVertex(VertexInterface $vertex): bool;
71
}
72

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.