'průběžná', 'report' => 'reportovací', 'final' => 'závěrečná'); public static function getStateEnum() { return self::$stateEnum; } /* * Lucene fulltext */ static public function getLuceneIndex() { ProjectConfiguration::registerZend(); if (file_exists($index = self::getLuceneIndexFile())) { return Zend_Search_Lucene::open($index); } else { return Zend_Search_Lucene::create($index); } } static public function getLuceneIndexFile() { return sfConfig::get('sf_data_dir').'/lucene/message.index'; } public function getForLuceneQuery($query) { $index = $this->getLuceneIndex(); $hits = $index->find($query); $pks = array(); foreach ($hits as $hit) { $pks[] = $hit->pk; } if (empty($pks)) { return array(); } $q = $this->createQuery('p') ->whereIn('p.id', $pks) ->limit(20); return $q->execute(); } }