Returns an array of all terms in this index.

@return array
342055
public function terms()
    {
        $result = array();

        /**
 * Zend_Search_Lucene_Index_TermsPriorityQueue 
*/
        include_once 'Zend/Search/Lucene/Index/TermsPriorityQueue.php';

        $segmentInfoQueue = new Zend_Search_Lucene_Index_TermsPriorityQueue();

        foreach ($this->_segmentInfos as $segmentInfo) {
            $segmentInfo->resetTermsStream();

            // Skip "empty" segments
            if ($segmentInfo->currentTerm() !== null) {
                $segmentInfoQueue->put($segmentInfo);
            }
        }

        while (($segmentInfo = $segmentInfoQueue->pop()) !== null) {
            if ($segmentInfoQueue->top() === null 
                || $segmentInfoQueue->top()->currentTerm()->key() !=                $segmentInfo->currentTerm()->key()
            ) {
                // We got new term
                $result[] = $segmentInfo->currentTerm();
            }

            if ($segmentInfo->nextTerm() !== null) {
                // Put segment back into the priority queue
                $segmentInfoQueue->put($segmentInfo);
            }
        }

        return $result;
    }
1139403
public function getFilteredIndexes()
    {
        if (!$this->hasPrimaryKey()) {
            return $this->getIndexes();
        }

        $indexes = array();

        foreach ($this->getIndexes() as $name => $index) {
            if (!$index->hasSameColumnNames($this->getPrimaryKey()->getColumnNames())) {
                $indexes[$name] = $index;
            }
        }

        return $indexes;
    }
514263
public function findAll() : array
    {
        $queryBuilder = $this->getQueryBuilder();
        $allRecords = $queryBuilder
            ->select('*')
            ->from($this->table)
            ->execute()->fetchAll();
        return $this->getIndexQueueItemObjectsFromRecords($allRecords);
    }
655688
public function all()
    {
        if ($this->isEmpty()) {
            return [];
        }

        $arResult = [];
        foreach ($this->arElementIDList as $iElementID) {
            $obElementItem = $this->makeItem($iElementID, null);
            if ($obElementItem->isEmpty()) {
                continue;
            }

            $arResult[$iElementID] = $obElementItem;
        }

        return $arResult;
    }
593701
public function toArray()
    {
        return [
            'ref'             => $this->sRef,
            'state'           => $this->sState,
            'dated'           => $this->sDated,
            'terms'           => (int) $this->iTerms ?: null,
            'customer_id'     => (int) $this->iCustomerId ?: null,
            'email'           => $this->sEmail,
            'currency'        => $this->sCurrency,
            'additional_text' => $this->sAdditionalText,
            'callback_data'   => $this->mCallbackData,
            'items'           => (array) $this->aItems,
        ];
    }
1080199
public function getAll() 
    {
        return [
            self::ENTRY_ID         => $this->getId(),
            self::ENTRY_NAME       => $this->getName(),
            self::ENTRY_TYPE       => $this->getType(),
        ];
    }
1270444
public function indexFields()
    {
        $fields = [];
        foreach ($this->indexes as $index) {
            $fields = array_merge($fields, $index->fields());
        }

        $result = [];
        foreach (array_unique($fields) as $field) {
            $result[] = $this->field($field);
        }

        return $result;
    }
1321243
public function toArray()
    {
        return [
            'id' => $this->getId(),
            'key' => $this->getKey(),
            'name' => $this->getName(),
            'meta' => $this->getMeta(),
            'keywords' => $this->getKeywords(),
            'defaultLocale' => $this->getDefaultLocale(),
            'creator' => $this->getCreator(),
            'changer' => $this->getChanger(),
            'created' => $this->getCreated(),
            'changed' => $this->getChanged(),
        ];
    }
1196341
public function toArray()
    {
        return [
            'id' => $this->id,
            'terms' => $this->terms,
            'descriptor' => $this->descriptor,
            'subdescriptor' => $this->subdescriptor,
            'score' => $this->score,
        ];
    }
1007924
public function all()
    {
        $all = [];

        foreach ($this->style as $style) {
            $all = array_merge($all, $this->convertToCodes($style->all()));
        }

        return $all;
    }
1360621
public function index(): array {
        list($indexed, $commited) = $this->__index();

        $this->indexedRes  = array();
        $this->commitedRes = array();
        return $indexed;
    }
580534
public function getTermsOfDelivery()
    {
        if ($terms = $this->entity->getTermsOfDelivery()) {
            return array(
                'id' => $terms->getId(),
                'terms' => $terms->getTerms()
            );
        }

        return null;
    }
720874
public function getTermRelationships($terms) {
		static $table = 'term_relationships';
		if (!$terms) {
			return array();
		}
		$termIds = array_keys($terms);
		$termRelationships = $this->_query('SELECT * FROM '.$this->getTable($table).' WHERE term_taxonomy_id IN ('.implode(',', $termIds).')');
		$result = array();
		foreach ($termRelationships as $item) {
			$key = $item['object_id'];
			$value = $item['term_taxonomy_id'];
			if (!isset($result[$key])) {
				$result[$key] = array();
			}
			$result[$key][] = $value;
		}
		return $result;
	}
842124
public static function all()
    {
        return array(
            self::ENABLED,
            self::DISABLED,
            self::TYPE_NOT_FOUND,
            self::TYPE_NOT_ENABLED,
            self::INVALID,
        );
    }
1138428
private function all(): array
    {
        $fields = static::$_fields;

        $data = [];
        foreach ($fields as $f) {
            if (isset($this->$f) and !is_null($this->$f)) {
                $data[$f] = $this->$f;
            }
        }

        return $data;
    }
1252843
protected function getIndexes()
    {
        $indexes = [];
        $rawIndexes = $this->getRawIndexes();

        foreach ($rawIndexes as $rawIndex) {
            $index = new Index($rawIndex->name);
            $index->addColumns(explode('|||', $rawIndex->columns));

            $indexes[] = $index;
        }

        return $indexes;
    }
917549
public function getTermsArray($entityName)
    {
        $terms = $this->getDoctrine()->getRepository($entityName)->findAll();
        $termsArray = [];

        foreach ($terms as $term) {
            $termsArray[] = array(
                'id' => $term->getId(),
                'name' => $term->getTerms()
            );
        }
        return $termsArray;
    }