TYPO3 CMS  TYPO3_6-2
AbstractSpecifics.php
Go to the documentation of this file.
1 <?php
3 
21 abstract class AbstractSpecifics {
25  const TABLE_MAXLENGTH = 'table_maxlength';
26  const FIELD_MAXLENGTH = 'field_maxlength';
27  const LIST_MAXEXPRESSIONS = 'list_maxexpressions';
28  const CAST_FIND_IN_SET = 'cast_find_in_set';
29 
36  protected $specificProperties = array();
37 
44  public function specificExists($specific) {
45  return isset($this->specificProperties[$specific]);
46  }
47 
54  public function getSpecific($specific) {
55  return $this->specificProperties[$specific];
56  }
57 
65  public function splitMaxExpressions($expressionList, $preserveArrayKeys = FALSE) {
66  if (!$this->specificExists(self::LIST_MAXEXPRESSIONS)) {
67  return array($expressionList);
68  }
69 
70  return array_chunk($expressionList, $this->getSpecific(self::LIST_MAXEXPRESSIONS), $preserveArrayKeys);
71  }
72 }
splitMaxExpressions($expressionList, $preserveArrayKeys=FALSE)