{@inheritdoc}

@see \C5TL\Parser::parseRunningConcrete5Do()
768018
protected function parseRunningConcrete5Do(\Gettext\Translations $translations, $concrete5version, $subParsersFilter)
    {
        foreach ($this->getSubParsers() as $dynamicItemParser) {
            if ((!is_array($subParsersFilter)) || in_array($dynamicItemParser->getDynamicItemsParserHandler(), $subParsersFilter, true)) {
                $dynamicItemParser->parse($translations, $concrete5version);
            }
        }
    }
1334732
public function create(string $uri, \stdClass $definition): Description
    {
        switch ($this->type) {
            case self::BUILDER_OPEN_API:
                return (
                new OpenApiBuilder(
                    new Document(
                        $uri,
                        (new RefResolver($definition, $uri))->resolve()
                    )
                )
                )->build();
            case self::BUILDER_RAML:
                return (
                new RamlBuilder(
                    new Document(
                        $uri,
                        $definition
                    )
                )
                )->build();
            default:
                throw new \InvalidArgumentException();
        }
    }
210953
public function buildExpression()
    {
        if (isset($this->simpleOperator)) {
            return sprintf(
                '%s %s %s',
                $this->fieldName,
                $this->simpleOperator,
                self::formatValue($this->simpleValue)
            );
        }

        if (isset($this->listOperator)) {
            return sprintf(
                '%s %s [%s]',
                $this->fieldName,
                $this->listOperator,
                implode(', ', self::formatValues($this->listValues))
            );
        }

        throw new BadFunctionCallException('An operator must be set' .
            ' prior to calling this function.');
    }
1330039
public function newSynonymCreateStruct($mainTagId, $mainLanguageCode)
    {
        $synonymCreateStruct = new SynonymCreateStruct();
        $synonymCreateStruct->mainTagId = $mainTagId;
        $synonymCreateStruct->mainLanguageCode = $mainLanguageCode;

        return $synonymCreateStruct;
    }
790017
public function build($count = false)
    {
        $modelNameSpace = $this->model->getModelNameSpace();
        $mm = $this->getDI()->get('modelsManager');
        $query = $mm->createBuilder()->from($modelNameSpace);

        // $columns = $this->model->getAllowedColumns(true);
        $columns = array(
            "$modelNameSpace.*"
        );

        // process hasOne Joins
        $this->queryJoinHelper($query);
        $this->querySearchHelper($query);
        $this->querySortHelper($query);

        if ($count) {
            $query->columns('count(*) as count');
        } else {
            // preserve any columns added through joins
            $existingColumns = $query->getColumns();
            $allColumns = array_merge($columns, $existingColumns);
            $query->columns($allColumns);
        }
        // skip limit if returning a count
        if (!$count) {
            $this->queryLimitHelper($query);
        }

        // todo build fields feature into PHQL instead of doing in PHP
        return $query;
    }
373495
public function compactEditBuilder()
    {
        if ($this->relationships == 0 && $this->enum == 0) {
            return '';
        } else {
            $compact = '';
            if ($this->relationships > 0) {
                foreach ($this->fields as $field) {
                    if ($field->type == 'relationship') {
                        $compact .= ', "' . $field->relationship_name . '"';
                    }
                }
            }
            if ($this->enum > 0) {
                foreach ($this->fields as $field) {
                    if ($field->type == 'enum') {
                        $compact .= ', "' . $field->title . '"';
                    }
                }
            }

            return $compact;
        }
    }
672125
public function build(): GetRealtimeDataRequest
	{
		$instance = new GetRealtimeDataRequest();
		if ($this->contextId === null) {
			throw new BuilderException('Property [contextId] is required.');
		}
		$instance->contextId = $this->contextId;
		return $instance;
	}
834740
private function buildDefinitionBuilderNode($name)
    {
        $node = new ArrayNodeDefinition($name);

        $node
            ->children()
                ->booleanNode('public')
                    ->defaultFalse()
                    ->treatNullLike(false)
                ->end()
            ->end()
        ;

        return $node;
    }
1075454
public function build(): GetFileInfoRequest
	{
		$instance = new GetFileInfoRequest();
		if ($this->objectId === null) {
			throw new BuilderException('Property [objectId] is required.');
		}
		$instance->objectId = $this->objectId;
		return $instance;
	}
317596
public function isConcrete()
    {
        if ($this->isQuad() && !$this->getGraph()->isConcrete()) {
            return false;
        }

        return $this->getSubject()->isConcrete()
               && $this->getPredicate()->isConcrete()
               && $this->getObject()->isConcrete();
    }
251819
protected function build($concrete, array $arguments = [])
    {
        if (is_callable($concrete)) {
            return $concrete($this, $arguments);
        }

        if (isset($this->reflectionClass[$concrete])) {
            $reflection = $this->reflectionClass[$concrete];
        } else {
            try {
                $reflection = $this->reflectionClass[$concrete] = new ReflectionClass($concrete);
            } catch (\ReflectionException $e) {
                throw new BindingException('ReflectionException: ' . $e->getMessage());
            }
        }

        if (!$reflection->isInstantiable()) {
            throw new BindingException("The '${concrete}' type is not instantiable");
        }

        if (isset($this->reflectionMethod[$concrete])) {
            $constructor = $this->reflectionMethod[$concrete];
        } else {
            $constructor = $this->reflectionMethod[$concrete] = $reflection->getConstructor();
        }

        if (is_null($constructor)) {
            return new $concrete();
        }

        // Resolve arguments
        $parameters = array_diff_key($constructor->getParameters(), $arguments);

        /**
         * @var int $key
         * @var  \ReflectionParameter $parameter
         */
        foreach ($parameters as $key => $parameter) {
            if (null === $class = $parameter->getClass()) {
                if ($parameter->isDefaultValueAvailable()) {
                    $arguments[$key] = $parameter->getDefaultValue();
                } else {
                    throw new BindingException("Could not resolve [$parameter]");
                }
                continue;
            }

            try {
                $class = $class->name;
                $arguments[$key] = isset($this->bindings[$class]) ? $this->make($class) : $this->build($class);
            } catch (BindingException $e) {
                if (!$parameter->isOptional()) {
                    throw $e;
                }
                $arguments[$key] = $parameter->getDefaultValue();
            }
        }

        ksort($arguments);

        return $reflection->newInstanceArgs($arguments);
    }
256586
public function build(): SetInspectedNodeRequest
	{
		$instance = new SetInspectedNodeRequest();
		if ($this->nodeId === null) {
			throw new BuilderException('Property [nodeId] is required.');
		}
		$instance->nodeId = $this->nodeId;
		return $instance;
	}
1084481
public function build($concrete, $parameters = array())
        {
            // If the concrete type is actually a Closure, we will just execute it and
            // hand back the results of the functions, which allows functions to be
            // used as resolvers for more fine-tuned resolution of these objects.
            if ($concrete instanceof \Closure) {
                return $concrete($this, $parameters);
            }

            $reflector = new \ReflectionClass($concrete);

            // If the type is not instantiable, the developer is attempting to resolve
            // an abstract type such as an Interface of Abstract Class and there is
            // no binding registered for the abstractions so we need to bail out.
            if (!$reflector->isInstantiable()) {
                $message = "Target [$concrete] is not instantiable.";

                throw new Exception($message);
            }

            $constructor = $reflector->getConstructor();

            // If there are no constructors, that means there are no dependencies then
            // we can just resolve the instances of the objects right away, without
            // resolving any other types or dependencies out of these containers.
            if (is_null($constructor)) {
                return new $concrete;
            }

            $parameters = $constructor->getParameters();

            // Once we have all the constructor's parameters we can create each of the
            // dependency instances and then use the reflection instances to make a
            // new instance of this class, injecting the created dependencies in.
            $dependencies = $this->getDependencies($parameters);

            return $reflector->newInstanceArgs($dependencies);
        }
15993
public function getConcrete5ProfileURL($user)
    {
        $result = null;
        $binding = $this->getBindingForUser($user);
        if ($binding !== null) {
            $concrete5UserID = (int) $binding;
            if ($concrete5UserID !== 0) {
                $result = "https://www.concrete5.org/profile/-/view/$concrete5UserID/";
            }
        }

        return $result;
    }
35439
protected function getConcrete($id)
    {
        if (!isset($this->binds[$id])) {

            return $id;          

        } else {

            return $this->binds[$id]['concrete'];

        }
    }
1345341
public function build($concrete)
    {
        // If the concrete type is actually a Closure, we will just execute it and
        // hand back the results of the functions, which allows functions to be
        // used as resolvers for more fine-tuned resolution of these objects.
        if ($concrete instanceof Closure) {
            return $concrete($this, $this->getLastParameterOverride());
        }

        $reflector = new ReflectionClass($concrete);

        // If the type is not instantiable, the developer is attempting to resolve
        // an abstract type such as an Interface or Abstract Class and there is
        // no binding registered for the abstractions so we need to bail out.
        if (! $reflector->isInstantiable()) {
            return $this->notInstantiable($concrete);
        }

        $this->buildStack[] = $concrete;

        $constructor = $reflector->getConstructor();

        // If there are no constructors, that means there are no dependencies then
        // we can just resolve the instances of the objects right away, without
        // resolving any other types or dependencies out of these containers.
        if (is_null($constructor)) {
            array_pop($this->buildStack);

            return new $concrete;
        }

        $dependencies = $constructor->getParameters();

        // Once we have all the constructor's parameters we can create each of the
        // dependency instances and then use the reflection instances to make a
        // new instance of this class, injecting the created dependencies in.
        $instances = $this->resolveDependencies(
            $dependencies
        );

        array_pop($this->buildStack);

        return $reflector->newInstanceArgs($instances);
    }
250579
public function parseManual(\Gettext\Translations $translations, $concrete5version)
    {
        $akcNameMap = array(
            'collection' => 'Page attributes',
            'user' => 'User attributes',
            'file' => 'File attributes',
        );
        if (version_compare($concrete5version, '5.7') < 0) {
            $akcClass = '\AttributeKeyCategory';
        } else {
            $akcClass = '\Concrete\Core\Attribute\Key\Category';
        }
        if (class_exists($akcClass, true) && method_exists($akcClass, 'getList')) {
            foreach (call_user_func($akcClass.'::getList') as $akc) {
                $akcHandle = $akc->getAttributeKeyCategoryHandle();
                $this->addTranslation($translations, isset($akcNameMap[$akcHandle]) ? $akcNameMap[$akcHandle] : ucwords(str_replace(array('_', '-', '/'), ' ', $akcHandle)));
            }
        }
    }