Return the current element.

@return BaseFilterBuilder

@throws DcGeneralRuntimeException When the current position is invalid.
765425
public function current()
    {
        if (-1 === $this->index) {
            return $this->first();
        }

        if (!$this->valid()) {
            throw new DcGeneralRuntimeException('FilterBuilder position is invalid.');
        }

        return $this->children[$this->key()];
    }
930411
public function current()
    {
        if (!$this->page) {
            $this->page = $this->executeCall();
        }

        if (isset($this->page['prefixes'])) {
            $this->updatePrefixes();
        }

        return $this->get($this->itemsPath, $this->page);
    }
812095
public function current()
	{
		list($option, $values) = parent::current();
		
		if (isset($this->getAliasOptions()[ltrim($option, '-')]))
		{
			$option = $this->getAliasOptions()[ltrim($option, '-')];
		}
		
		$option = $option[0] == '-' ? $option : '-'.$option;
		
		if ($option == '-output')
		{
			return [];
		}
		
		$options = [];
		
		if ($option == '-map' || $option == '-metadata')
		{
			foreach ($option == '-metadata' ? array_merge(...$values) : $values as $key => $value)
			{
				$options[] = $option;
				$options[] = is_int($key) ? $value : sprintf('%s=%s', $key, $value);
			}
		}
		else if (stripos($option, 'filter') === 1)
		{
			// array_merge_recursive(...$values)
			$options[] = $option;
			$options[] = implode('; ', $values);
		}
		else if (($value = array_pop($values)) !== false)
		{
			$options[] = $option;
			
			if (is_scalar($value) && trim($value) != '' && $value !== true)
			{
				$options[] = $value;
			}
		}
		
		return $options;
	}
703958
public function getFilter()
    {
        if ($this->filter) {
            return $this->filter;
        }

        $filterType = $this->getFilterType();

        if (!$filterType) {
            return false;
        }

        if (class_exists($filterType)) {
            $className = $filterType;
        } else {
            $className = str_replace('_', ' ', $filterType);
            $className = ucwords(strtolower($className));
            $className = str_replace(' ', '', $className);

            $className = 'PedroTeixeira\Bundle\GridBundle\Grid\Filter\\' . $className;
        }

        try {
            $reflection = new \ReflectionClass($className);

            $this->filter = $reflection->newInstance(
                $this->container
            );

            $this->filter->setIndex($this->getIndex());

            return $this->filter;

        } catch (\Exception $e) {
            throw new \Exception(
                sprintf('Grid column type "%s" doesn\'t exist', $filterType)
            );
        }
    }
142104
public function getCurrentFilter()
    {
        $alias = $this->filter_names[$this->position];
        $define = $this->filters[$alias];
        $filter = $this->getFilterByName($define['name'], $define['attributes']);
        return $filter;
    }
531062
public function getChildren()
    {
        $element = $this->current();
        $childContext = $this->elementProcessor->processElementChildren(
            $element,
            $this->contexts[$this->contextMap[$this->key()]]
        );
        return new static($element->childNodes, $childContext, $this->elementProcessor);
    }
469351
protected function _fetchCurrent()
    {
        if ($this->_current !== null) {
            return $this->_current;
        }

        return $this->_current = parent::current();
    }
1215556
public function createDcGeneral()
    {
        if (empty($this->containerName) && !$this->dataContainer) {
            throw new DcGeneralRuntimeException('Required container name or container is missing');
        }

        if (null === $this->eventDispatcher) {
            throw new DcGeneralRuntimeException('Required event dispatcher is missing');
        }

        // Backwards compatibility.
        $this->getEventDispatcher()->dispatch(PreCreateDcGeneralEvent::NAME, new PreCreateDcGeneralEvent($this));

        $environment = $this->environment ?: $this->createEnvironment();

        /** @var DcGeneral $dcGeneral */
        $dcGeneral = (new \ReflectionClass($this->dcGeneralClassName))->newInstance($environment);

        // Backwards compatibility.
        $this->getEventDispatcher()->dispatch(CreateDcGeneralEvent::NAME, new CreateDcGeneralEvent($dcGeneral));

        return $dcGeneral;
    }
34797
public function getCurrentItems() {
		if ($this->_currentItems === null) {
			$offset = $this->_itemsPerPage * $this->_currentPage - $this->_itemsPerPage;
			
			$this->_currentItems = $this->getAdapter()->getItems($offset, $this->_itemsPerPage);
			
			if (! $this->_currentItems instanceof Traversable) {
				throw new RuntimeException('Data from an adapter must implement the "Traversable" interface');
			}
		}
		
		return $this->_currentItems;
	}
992597
public function current()
    {
        $callback = $this->_callback;

        return $callback(parent::current(), $this->key(), $this->_innerIterator);
    }
364916
public function current()
    {
        if ($this->valid() && !isset($this->objects[$this->position])) {
            $class = $this->objectClass;
            $object = new $class();
            $this->hydrator->hydrate($object, $this->currentData);
            $this->classMetadata->getEventManager()->execute(EventManager::EVENT_POST_LOAD, $object);
            if (!$this->readOnly) {
                $this->repository->cacheObject($object);
                $this->documentManager->addObject($object, DocumentManager::OBJ_MANAGED, $this->repository);
            }
            if ($this->rewindable) {
                $this->objects[] = $object;
            } else {
                return $object;
            }
        }

        if (isset($this->objects[$this->position])) {
            return $this->objects[$this->position];
        } else {
            return null;
        }
    }
412266
public function current()
    {
        $extractor = $this->_value;
        $current = $this->_fetchCurrent();
        $spacer = str_repeat($this->_spacer, $this->getDepth());

        return $spacer . $extractor($current, parent::key(), $this);
    }
260712
public function getComponent()
    {
        // Simple cache.
        if (!empty($this->component)) {
            return $this->component;
        }

        $filter = new StatementFilter();
        $parser = new CodeParser();

        $notFound   = 'The plugin must define the $plugin->component in the version.php file.';
        $statements = $parser->parseFile($this->directory.'/version.php');

        try {
            $assign = $filter->findFirstPropertyFetchAssignment($statements, 'plugin', 'component', $notFound);
        } catch (\Exception $e) {
            $assign = $filter->findFirstPropertyFetchAssignment($statements, 'module', 'component', $notFound);
        }

        if (!$assign->expr instanceof String_) {
            throw new \RuntimeException('The $plugin->component must be assigned to a string in the version.php file.');
        }
        $this->component = $assign->expr->value;

        return $this->component;
    }
1340991
public function current() {
        // It is possible that this context has been deleted and we now have subsequent calls being made with this
        // contextlist. Exceptions here will stop the further processing of this component and that is why we are
        // doing a try catch.
        try {
            $context = \context::instance_by_id($this->contextids[$this->iteratorposition]);
        } catch (\Exception $e) {
            // Remove this context.
            unset($this->contextids[$this->iteratorposition]);
            // Check to see if there are any more contexts left.
            if ($this->count()) {
                // Move the pointer to the next record and try again.
                $this->next();
                $context = $this->current();
            } else {
                // There are no more context ids left.
                return;
            }
        }
        return $context;
    }
1215151
public function current()
    {
        $documentData = $this->myResultCursor->current();
        if (is_null($documentData)) {
            return null; 
        }
        /** @var MongoObject $document */
        $document = $this->container->get(
            $this->classMapInterface->getClassForResult($this->collection, $documentData)
        );

        $document->setCollection($this->collection);
        $document->loadFromArray($documentData);

        return $document;
    }
1286779
public function getElement($indexOrName)
    {
        if (\is_string($indexOrName)) {
            foreach ($this as $element) {
                /** @var ElementInformationInterface $element */
                if ($indexOrName === $element->getName()) {
                    return $element;
                }
            }
        } elseif (!\is_numeric($indexOrName)) {
            throw new DcGeneralInvalidArgumentException('Invalid value for element name given.');
        }

        if (!isset($this->elements[$indexOrName])) {
            throw new DcGeneralInvalidArgumentException('Value out of bounds: ' . $indexOrName . '.');
        }

        return $this->elements[$indexOrName];
    }
1308641
public function current()
    {
        $map = $this->__getSerialisablePropertyMap();
        $mapKeys = array_keys($map);
        return $map[$mapKeys[$this->iteratorPosition]];
    }