GridInterface
last analyzed

Size/Duplication

Total Lines 161
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 161
c 0
b 0
f 0

24 Methods

Rating   Name   Duplication   Size   Complexity  
setConditions() 0 1 ?
getConditions() 0 1 ?
setAdapter() 0 1 ?
getAdapter() 0 1 ?
getColumns() 0 1 ?
setColumns() 0 1 ?
add() 0 1 ?
get() 0 1 ?
setOptions() 0 1 ?
getOptions() 0 1 ?
setName() 0 1 ?
getName() 0 1 ?
getAttributes() 0 1 ?
setAttributes() 0 1 ?
addAttribute() 0 1 ?
getRowSet() 0 1 ?
remove() 0 1 ?
getMutators() 0 1 ?
setMutators() 0 1 ?
addMutator() 0 1 ?
getTopNavigationBar() 0 1 ?
setTopNavigationBar() 0 1 ?
getBottomNavigationBar() 0 1 ?
setBottomNavigationBar() 0 1 ?
1
<?php
2
/**
3
 * @company MTE Telecom, Ltd.
4
 * @author Roman Malashin <[email protected]>
5
 */
6
7
namespace Nnx\DataGrid;
8
9
use Nnx\DataGrid\Adapter\AdapterInterface;
10
use Nnx\DataGrid\Column\ColumnInterface;
11
use Nnx\DataGrid\Mutator\MutatorInterface;
12
use Nnx\DataGrid\NavigationBar\NavigationBarInterface;
13
use Traversable;
14
use ArrayAccess;
15
use Zend\Stdlib\InitializableInterface;
16
17
/**
18
 * Interface GridInterface
19
 * @package Nnx\DataGrid
20
 */
21
interface GridInterface extends InitializableInterface
22
{
23
    /**
24
     * Условия для фильтрации выбираемых данных
25
     * @param array | Traversable $conditions
26
     * @return $this
27
     */
28
    public function setConditions($conditions);
29
30
    /**
31
     * Возвращает набор условий по которым фильтровать выборку
32
     * @return array
33
     */
34
    public function getConditions();
35
36
    /**
37
     * Устанавливает адаптер
38
     * @param AdapterInterface $adapter
39
     * @return $this
40
     */
41
    public function setAdapter($adapter);
42
43
    /**
44
     * Возвращает адаптер с помощью которого будет осуществляться выборка данных
45
     * @return AdapterInterface
46
     */
47
    public function getAdapter();
48
49
    /**
50
     * Возвращает коллекцию колонок
51
     * @return array | Traversable
52
     */
53
    public function getColumns();
54
55
    /**
56
     * Добавление колонок в таблицу
57
     * @param array | Traversable $columns
58
     * @return $this
59
     */
60
    public function setColumns($columns);
61
62
    /**
63
     * Добавление колонки в таблицу
64
     * @param ColumnInterface | array | ArrayAccess $column
65
     * @return $this
66
     */
67
    public function add($column);
68
69
    /**
70
     * Удаляет колонку с именем $name из таблицы
71
     * @param string $name
72
     * @return $this
73
     */
74
    public function remove($name);
75
76
    /**
77
     * Возвращает колонку грида
78
     * @param string $name
79
     * @return ColumnInterface
80
     */
81
    public function get($name);
82
83
    /**
84
     * Опции таблицы
85
     * @param array | Traversable $options
86
     * @return $this
87
     */
88
    public function setOptions($options);
89
90
    /**
91
     * Возвращает массив опции таблицы
92
     * @return array | Traversable
93
     */
94
    public function getOptions();
95
96
    /**
97
     * Устанавливает имя таблицы
98
     * @param string $name
99
     * @return $this
100
     */
101
    public function setName($name);
102
103
    /**
104
     * Возвращает имя таблицы
105
     * @return string
106
     */
107
    public function getName();
108
109
    /**
110
     * Возвращает атрибуты используемые при отображении грида
111
     * @return array
112
     */
113
    public function getAttributes();
114
115
    /**
116
     * Устанавливает используемые для отображения таблицы атрибуты
117
     * @param array $attributes
118
     * @return $this
119
     */
120
    public function setAttributes(array $attributes);
121
122
    /**
123
     * Добавляет атрибут таблицы
124
     * @param string $key
125
     * @param mixed $value
126
     * @return mixed
127
     */
128
    public function addAttribute($key, $value);
129
130
    /**
131
     * Возвращает набор мутаторов для строк таблицы
132
     * @return array|ArrayAccess
133
     */
134
    public function getMutators();
135
136
    /**
137
     * Устанавливает набор мутаторов для строк таблицы
138
     * @param array|ArrayAccess $mutators
139
     * @return $this
140
     */
141
    public function setMutators(array $mutators);
142
143
    /**
144
     * Добавляет мутатор для строк таблицы
145
     * @param MutatorInterface|array|ArrayAccess $mutator
146
     * @return $this
147
     */
148
    public function addMutator($mutator);
149
150
    /**
151
     * Возвращает массив строк
152
     * @return array
153
     */
154
    public function getRowSet();
155
156
    /**
157
     * Возвращвет верхнюю навигационную панель
158
     * @return NavigationBarInterface
159
     */
160
    public function getTopNavigationBar();
161
162
    /**
163
     * Устанавливает верхнюю навигационную панель
164
     * @param NavigationBarInterface $topNavigationBar
165
     * @return $this
166
     */
167
    public function setTopNavigationBar($topNavigationBar);
168
169
    /**
170
     * Возвращвет верхнюю навигационную панель
171
     * @return NavigationBarInterface
172
     */
173
    public function getBottomNavigationBar();
174
175
    /**
176
     * Устанавливает верхнюю навигационную панель
177
     * @param NavigationBarInterface $bottomNavigationBar
178
     * @return $this
179
     */
180
    public function setBottomNavigationBar($bottomNavigationBar);
181
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
182