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

compileObject() public method

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