Return the index definition, formatted for AWS SDK.

@return array
169612
public function getDefinition()
    {
        $definition['KeySchema'] = $this->getDefinitionKeySchema();

        if ($this->isPrimary()) {
            $definition['AttributeDefinitions'] = $this->getDefinitionAttributes();
        } else {
            $definition['IndexName']  = $this->getName();
            $definition['Projection'] = $this->getDefinitionProjection();
        }

        if (!$this->isSecondaryLocal()) {
            $definition['ProvisionedThroughput'] = $this->getDefinitionProvisionedThroughput();
        }

        return $this->isPrimary() ? $definition :
            [$this->getDefinitionIndexType() => $definition];
    }
850613
public function getDefAsArray()
    {
        return array_replace(
            [
                'name'              => $this->getName(),
                'type'              => $this->getType(),
                'exposedName'       => $this->getName(),
                'doctrineType'      => $this->getTypeDoctrine(),
                'serializerType'    => $this->getTypeSerializer(),
                'relType'           => self::REL_TYPE_EMBED,
                'isClassType'       => true,
                'constraints'       => [],
                'required'          => false,
                'searchable'        => 0,
            ],
            $this->definition === null ? [
                'required'          => $this->isRequired()
            ] : [
                'exposedName'       => $this->definition->getExposeAs() ?: $this->getName(),
                'title'             => $this->definition->getTitle(),
                'description'       => $this->definition->getDescription(),
                'readOnly'          => $this->definition->getReadOnly(),
                'required'          => $this->definition->getRequired(),
                'searchable'        => $this->definition->getSearchable(),
                'constraints'       => array_map(
                    [Utils\ConstraintNormalizer::class, 'normalize'],
                    $this->definition->getConstraints()
                ),
            ]
        );
    }
427489
public function getIndexData() {
		if ($this->index === null) {
			$currentPointer = ftell($this->file);
			fseek($this->file, 0);
			
			$count       = 0;
			$this->index = [];
			
			while (fgets($this->file) !== false) {
				$this->index[++ $count] = ftell($this->file);
			}

			fseek($this->file, $currentPointer);
		}
		
		return $this->index;
	}
1258789
public function getIndices()
    {
        $indices = $this->indices();

        if (empty($indices)) {
            $className = (new \ReflectionClass($this))->getShortName();

            return [$className];
        }

        return $indices;
    }
993871
public function get_index()
    {
        if (!$this->indexes) {
            $this->indexes = array();
            if ($json = $this->get_cache('index')) {
                $this->indexes = json_decode($json, true);
            }
        }

        return $this->indexes;
    }
1206536
private function getIndexer()
    {
        return $this->indexerRegistry->get(\Magento\Catalog\Model\Indexer\Category\Product::INDEXER_ID);
    }
152910
protected function getIndex()
	{
		if (!$this->index) {
			$this->index = $this->getClient()->initIndex($this->name);
		}
		
		return $this->index;
	}
1128749
public function indexAction()
    {
        $em = $this->getDoctrine()->getEntityManager();

        $entities = $em->getRepository('DMSLauncherBundle:PreUser')->findAll();

        return array('entities' => $entities);
    }
1204507
protected function _getIndexType()
    {
        $action = $this->_action();

        $indexType = $action->getConfig('scaffold.index_type');
        if (empty($indexType)) {
            $indexType = 'table';
        }

        return $indexType;
    }
1133727
public function getIndexInfo()
    {
        $convertIndex = function (\MongoDB\Model\IndexInfo $indexInfo) {
            $infos = [
                'v' => $indexInfo->getVersion(),
                'key' => $indexInfo->getKey(),
                'name' => $indexInfo->getName(),
                'ns' => $indexInfo->getNamespace(),
            ];

            $additionalKeys = [
                'unique',
                'sparse',
                'partialFilterExpression',
                'expireAfterSeconds',
                'storageEngine',
                'weights',
                'default_language',
                'language_override',
                'textIndexVersion',
                'collation',
                '2dsphereIndexVersion',
                'bucketSize'
            ];

            foreach ($additionalKeys as $key) {
                if (! isset($indexInfo[$key])) {
                    continue;
                }

                $infos[$key] = $indexInfo[$key];
            }

            return $infos;
        };

        return array_map($convertIndex, iterator_to_array($this->collection->listIndexes()));
    }
1181376
public function getDefinitionCache(): array
    {
        return [
            $this->name,
            $this->methods,
            $this->segments,
            $this->patterns,
            $this->handler,
            $this->format,
            $this->parameterNames,
        ];
    }
301407
protected function getIndexQueueConfigurationTableMap()
    {
        $indexingTableMap = [];

        $solrConfiguration = $this->site->getSolrConfiguration();
        $configurationNames = $solrConfiguration->getEnabledIndexQueueConfigurationNames();
        foreach ($configurationNames as $configurationName) {
            $indexingTableMap[$configurationName] = $solrConfiguration->getIndexQueueTableNameOrFallbackToConfigurationName($configurationName);
        }

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

        $this->indexedRes  = array();
        $this->commitedRes = array();
        return $indexed;
    }
1204969
public function getAllIndexes()
    {
        $result = [new Index('id', ['id'], IndexInterface::PRIMARY)];

        if ($this->getPolymorph()) {
            $result[] = new Index('type');
        }

        if (!empty($this->getIndexes())) {
            $result = array_merge($result, $this->getIndexes());
        }

        foreach ($this->getAssociations() as $assosication) {
            if ($assosication instanceof InjectIndexesInsterface) {
                $association_indexes = $assosication->getIndexes();

                if (!empty($association_indexes)) {
                    $result = array_merge($result, $association_indexes);
                }
            }
        }

        return $result;
    }
865090
public function toOptionArray()
    {
        return [
            ['value' => BucketInterface::SORT_ORDER_COUNT, 'label' => __('Result count')],
            ['value' => BucketInterface::SORT_ORDER_MANUAL, 'label' => __('Admin sort')],
            ['value' => BucketInterface::SORT_ORDER_TERM, 'label' => __('Name')],
            ['value' => BucketInterface::SORT_ORDER_RELEVANCE, 'label' => __('Relevance')],
        ];
    }
15519
public function getDefAsArray()
    {
        return [
            'length'                => $this->definition->getLength(),
            'title'                 => $this->definition->getTitle(),
            'description'           => $this->definition->getDescription(),
            'readOnly'              => $this->definition->getReadOnly(),
            'hidden'                => $this->definition->getHidden(),
            'recordOriginException' => $this->definition->isRecordOriginException(),
            'required'              => $this->definition->getRequired(),
            'searchable'            => $this->definition->getSearchable(),
            'translatable'          => $this->definition->getTranslatable(),
            'collection'            => $this->definition->getCollection(),
            'groups'                => $this->definition->getGroups(),
            'restrictions'          => $this->definition->getRestrictions(),
            'onVariation'           => $this->definition->getOnVariation(),

            'name'                  => $this->getName(),
            'type'                  => $this->getType(),
            'exposedName'           => $this->getExposedName(),
            'doctrineType'          => $this->getTypeDoctrine(),
            'serializerType'        => $this->getTypeSerializer(),
            'xDynamicKey'           => $this->getXDynamicKey(),
            'relType'               => null,
            'isClassType'           => false,
            'constraints'           => array_map(
                [Utils\ConstraintNormalizer::class, 'normalize'],
                $this->definition->getConstraints()
            ),
        ];
    }
1354168
protected function getListCharFontIndex()
    {
        if ($this->_font) {
            $fontFamily = $this->_font->getFontFamily();
            return $this->_rtf->getFontTable()->getFontIndex($fontFamily);
        }

        return parent::getListCharFontIndex();
    }