public static function TagsParse($tags) { if (!is_array($tags)) { return array(); } if (empty(Tag::$_fullParser)) { Tag::$_fullParser = Abricos::TextParser(true); } $ret = array(); $count = min(count($tags), 16); for ($i = 0; $i < $count; $i++) { $tags[$i] = Tag::$_fullParser->Parser(trim($tags[$i])); $tag = mb_strtolower($tags[$i], 'UTF-8'); if (strlen($tag) === 0) { continue; } $ret[$i] = $tag; } return $ret; }
public function TeacherSave($d) { $d->id = intval($d->id); if (!isset($d->remove)) { $d->departid = intval($d->departid); $utmf = Abricos::TextParser(true); $d->fio = $utmf->Parser($d->fio); if ($d->id > 0) { RecordBookQuery::TeacherUpdate($this->db, $d); } else { RecordBookQuery::TeacherAppend($this->db, $d); } } else { $d->remove = intval($d->remove); RecordBookQuery::TeacherRemove($this->db, $d); } }