src/Incoming/Processor.php
protected function buildModel($input_data, string $type, Builder $builder = null, Map $context = null)
    {
        $builder = $builder ?: $this->getBuilderForType($type);

        $this->enforceProcessCompatibility(($builder instanceof ContextualBuilder), (null !== $context), $builder);

        if ($builder instanceof ContextualBuilder) {
            return $builder->build($input_data, $context);
        }

        return $builder->build($input_data);
    }
protected function buildModel($input_data, string $type, Builder $builder = null, Map $context = null)
    {
        $builder = $builder ?: $this->getBuilderForType($type);

        $this->enforceProcessCompatibility(($builder instanceof ContextualBuilder), (null !== $context), $builder);

        if ($builder instanceof ContextualBuilder) {
            return $builder->build($input_data, $context);
        }

        return $builder->build($input_data);
    }
protected function buildModel ( $ input_data , string $ type , Builder $ builder = null , Map $ context = null ) { $ builder = $ builder ? : $ this -> getBuilderForType ( $ type ) ; $ this -> enforceProcessCompatibility ( ( $ builder instanceof ContextualBuilder ) , ( null !== $ context ) , $ builder ) ; if ( $ builder instanceof ContextualBuilder ) { return $ builder -> build ( $ input_data , $ context ) ; } return $ builder -> build ( $ input_data ) ; }
Build a model from incoming data.

If a builder isn't provided, an attempt will be made to automatically
resolve and build an appropriate builder from the provided factory.

@param mixed $input_data The input data.
@param string $type The type to build.
@param Builder|null $builder The builder to use.
@param Map|null $context An optional generic key-value map, for providing
contextual values during the process.
@return mixed The built model.
Build a model from incoming data .