PHP Class Sleimanx2\Plastic\Map\Builder

Show file Open project: sleimanx2/plastic

Protected Properties

Property Type Description
$connection Sleimanx2\Plastic\Connection Plastic connection instance.
$grammar Grammar Map grammar instance.
$resolver Closure Blueprint resolver callback.

Public Methods

Method Description
__construct ( Connection $connection ) Schema constructor.
blueprintResolver ( Closure $resolver ) : void Set the Schema Blueprint resolver callback.
create ( string $type, Closure $callback, string $index = null ) Create a map on your elasticsearch index.

Protected Methods

Method Description
build ( Blueprint $blueprint ) Execute the blueprint to build.
createBlueprint ( string $type, Closure $callback = null, null $index = null ) : mixed | Blueprint Create a new command set with a Closure.

Method Details

__construct() public method

Schema constructor.
public __construct ( Connection $connection )
$connection Sleimanx2\Plastic\Connection

blueprintResolver() public method

Set the Schema Blueprint resolver callback.
public blueprintResolver ( Closure $resolver ) : void
$resolver Closure
return void

build() protected method

Execute the blueprint to build.
protected build ( Blueprint $blueprint )
$blueprint Blueprint

create() public method

Create a map on your elasticsearch index.
public create ( string $type, Closure $callback, string $index = null )
$type string
$callback Closure
$index string

createBlueprint() protected method

Create a new command set with a Closure.
protected createBlueprint ( string $type, Closure $callback = null, null $index = null ) : mixed | Blueprint
$type string
$callback Closure
$index null
return mixed | Blueprint

Property Details

$connection protected property

Plastic connection instance.
protected Connection,Sleimanx2\Plastic $connection
return Sleimanx2\Plastic\Connection

$grammar protected property

Map grammar instance.
protected Grammar,Sleimanx2\Plastic\Map $grammar
return Grammar

$resolver protected property

Blueprint resolver callback.
protected Closure $resolver
return Closure