| | |
| | | const ERROR_INCOMPLETE = 3; |
| | | const ERROR_SAVING = 4; |
| | | const ERROR_SEARCH = 5; |
| | | |
| | | |
| | | /** public properties (mandatory) */ |
| | | public $primary_key; |
| | | public $groups = false; |
| | |
| | | public $list_page = 1; |
| | | public $page_size = 10; |
| | | public $coltypes = array('name' => array('limit'=>1), 'firstname' => array('limit'=>1), 'surname' => array('limit'=>1), 'email' => array('limit'=>1)); |
| | | |
| | | |
| | | protected $error; |
| | | |
| | | /** |
| | | * Returns addressbook name (e.g. for addressbooks listing) |
| | | */ |
| | | abstract function get_name(); |
| | | |
| | | /** |
| | | * Save a search string for future listings |
| | |
| | | { |
| | | return $this->error; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Setter for errors for internal use |
| | | * |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | return $out; |
| | | } |
| | | |
| | |
| | | array('/[\s;\+\-\/]+/i', '/(\d)[-.\s]+(\d)/', '/\s\w{1,3}\s/'), |
| | | array(' ', '\\1\\2', ' '), |
| | | $str)); |
| | | |
| | | |
| | | foreach ($arr as $i => $part) { |
| | | if (utf8_encode(utf8_decode($part)) == $part) { // is latin-1 ? |
| | | $arr[$i] = utf8_encode(strtr(strtolower(strtr(utf8_decode($part), |
| | |
| | | else |
| | | $arr[$i] = mb_strtolower($part); |
| | | } |
| | | |
| | | |
| | | return join(" ", $arr); |
| | | } |
| | | |