Cake\ElasticSearch\Type::schema PHP Method

schema() public method

This will fetch the schema from ElasticSearch the first time this method is called.
public schema ( ) : array
return array
    public function schema()
    {
        if ($this->schema !== null) {
            return $this->schema;
        }
        $name = $this->name();
        $type = $this->connection()->getIndex()->getType($name);
        $this->schema = new MappingSchema($name, $type->getMapping());
        return $this->schema;
    }