1 | <?php |
||
50 | abstract class AbstractDefinition |
||
51 | { |
||
52 | /** |
||
53 | * Shared result/instance ? |
||
54 | * |
||
55 | * @var bool |
||
56 | */ |
||
57 | protected $shared = false; |
||
58 | |||
59 | /** |
||
60 | * Definition's meta-data |
||
61 | * |
||
62 | * @var array |
||
63 | */ |
||
64 | protected $data = array(); |
||
65 | |||
66 | /** |
||
67 | * @param bool $bool |
||
68 | * |
||
69 | * @return DefinitionInterface |
||
70 | */ |
||
71 | public function setShared($bool) |
||
77 | |||
78 | /** |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function isShared() |
||
85 | |||
86 | /** |
||
87 | * Sets (erase) definition meta-data |
||
88 | * |
||
89 | * @param array $data The Definition's data |
||
90 | * |
||
91 | * @return DefinitionInterface |
||
92 | */ |
||
93 | public function setData(array $data) |
||
99 | |||
100 | /** |
||
101 | * Returns all definition meta-data |
||
102 | * |
||
103 | * @return array |
||
104 | */ |
||
105 | public function getData() |
||
109 | |||
110 | /** |
||
111 | * Returns a meta-data parameter ($param) or $default if not defined |
||
112 | * |
||
113 | * @param string $param Parameter key |
||
114 | * @param null|mixed $default Default return value if not defined |
||
115 | * |
||
116 | * @return mixed |
||
117 | */ |
||
118 | public function get($param, $default = null) |
||
122 | |||
123 | /** |
||
124 | * Defines a meta-data parameter |
||
125 | * |
||
126 | * @param string $param Parameter key |
||
127 | * @param mixed $value Parameter value |
||
128 | * |
||
129 | * @return DefinitionInterface |
||
130 | */ |
||
131 | public function set($param, $value) |
||
137 | |||
138 | /** |
||
139 | * Tells if definition's meta-data matches $dataQuery |
||
140 | * |
||
141 | * @param array $query |
||
142 | * |
||
143 | * @return boolean |
||
144 | */ |
||
145 | public function match(array $query, Container $container) |
||
168 | |||
169 | /** |
||
170 | * Transforms a wildcard to a regex |
||
171 | * |
||
172 | * @param string $value |
||
173 | * |
||
174 | * @return string |
||
175 | * @throws Exceptions\SearchException |
||
176 | */ |
||
177 | protected function searchQueryToRegex($value, Container $container) |
||
191 | } |
||
192 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.