Sleimanx2\Plastic\Map\Grammar::compileNested PHP Method

compileNested() public method

Compile a nested map.
public compileNested ( Illuminate\Support\Fluent $fluent ) : array
$fluent Illuminate\Support\Fluent
return array
    public function compileNested(Fluent $fluent)
    {
        $blueprint = new Blueprint($fluent->type);
        /* @var \Closure $callback */
        $callback = $fluent->callback;
        if (is_callable($callback)) {
            $callback($blueprint);
        }
        return ['type' => 'nested', 'properties' => $this->compileFields($blueprint->getFields())];
    }