Lines Matching refs:type

105      * Makes sure the given data fits with the given type
108 * @param string|array $type
111 public function cleanData($value, $type)
117 if (is_array($type)) {
118 if (isset($type['enum']) && !preg_match('/(^|,\s*)' . preg_quote_cb($value) . '($|\s*,)/', $type['enum'])) {
121 $type = $type['type'];
123 switch ($type) {
162 * $type may be an column array with pre and postfixes
164 * @param string|array $type
170 public function addPrePostFixes($type, $val, $pre = '', $post = '')
172 if (is_array($type)) {
173 if (isset($type['prefix'])) {
174 $pre = $type['prefix'];
176 if (isset($type['postfix'])) {
177 $post = $type['postfix'];
198 $value = $this->addPrePostFixes($column['type'], $value);
201 $type = $column['type'];
202 if (is_array($type)) {
203 $type = $type['type'];
205 if ($type == 'title' || ($type == 'page' && useHeading('content'))) {
207 if ($type == 'title') {
225 * Return XHTML formated data, depending on column type
245 $type = $column['type'];
246 if (is_array($type)) {
247 $type = $type['type'];
249 switch ($type) {
251 $val = $this->addPrePostFixes($column['type'], $val);
257 $id = $this->addPrePostFixes($column['type'], $id);
274 $id = $this->addPrePostFixes($column['type'], $id);
286 $id = $this->addPrePostFixes($column['type'], $id);
299 $val = $this->addPrePostFixes($column['type'], $val);
304 if (!is_array($column['type'])) {
307 $target = $this->addPrePostFixes($column['type'], '');
330 $data = $this->addPrePostFixes($column['type'], $data);
344 $val = $this->addPrePostFixes($column['type'], $val);
345 //type '_img' or '_img<width>'
346 if (substr($type, 0, 3) == 'img') {
347 $width = (int)substr($type, 3);
399 * @return array with key, type, ismulti, title, opt
410 'type' => PhpString::strtolower($matches[2]),
423 if ($column['type'] === '' && isset($s[1])) {
424 $column['type'] = $s[1];
428 // check if the type is some alias
430 if (isset($aliases[$column['type']])) {
431 $column['origtype'] = $column['type'];
432 $column['type'] = $aliases[$column['type']];
444 * Load defined type aliases
461 if (!isset($this->aliases[$name]['type'])) {
462 $this->aliases[$name]['type'] = '';
508 $val = $this->cleanData($val, $column['type']);
527 'type' => $column['type']