'9', 'AN' => 'AN', '53' => '53', '13' => '13', '12' => '12'); protected static $refund_typeEnum = array('složenka' => 'Složenkou na účet', 'převodem' => 'Příkazem k úhradě', 'vkladem' => 'Hotově'); public static function getLogicStateEnum() { return self::$logic_stateEnum; } public static function getRefundTypeEnum() { return self::$refund_typeEnum; } /* * 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/attachment.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(); } }