Cake\ElasticSearch\Datasource\MappingSchema::__construct PHP Method

__construct() public method

Constructor
public __construct ( string $name, array $data )
$name string The name of the type of the mapping data
$data array The mapping data from elasticsearch
    public function __construct($name, array $data)
    {
        $this->name = $name;
        if (isset($data[$name]['properties'])) {
            $data = $data[$name]['properties'];
        }
        $this->data = $data;
    }