CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (Github)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C Elastic Search 2.x API

  • Project:
    • Elastic Search
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 2.x
      • 4.x
      • 3.x
      • 2.x

Namespaces

  • Cake\ElasticSearch
    • Association
    • Datasource
      • Log
    • Rule
    • TestSuite
    • View

Class MappingSchema

Object interface for elastic search mapping information.

Namespace: Cake\ElasticSearch\Datasource

Property Summary

  • $data protected
    array

    The raw mapping data from elasticsearch

  • $name protected
    string

    The name of the type this mapping data is for.

Method Summary

  • __construct() public

    Constructor

  • field() public

    Get the mapping information for a single field.

  • fieldType() public

    Get the field type for a field.

  • fields() public

    Get the field names in the mapping.

  • name() public

    Get the name of the type for this mapping.

Method Detail

__construct() ¶ public

__construct(string $name, array $data)

Constructor

Parameters
string $name

The name of the type of the mapping data

array $data

The mapping data from elasticsearch

field() ¶ public

field(string $name): array|null

Get the mapping information for a single field.

Can access nested fields through dot paths.

Parameters
string $name

The path to the field you want.

Returns
array|null

fieldType() ¶ public

fieldType(string $name): string|null

Get the field type for a field.

Can access nested fields through dot paths.

Parameters
string $name

The path to the field you want.

Returns
string|null

fields() ¶ public

fields(): array

Get the field names in the mapping.

Will only return the top level fields. Nested object field names will not be included.

Returns
array

name() ¶ public

name(): string

Get the name of the type for this mapping.

Returns
string

Property Detail

$data ¶ protected

The raw mapping data from elasticsearch

Type
array

$name ¶ protected

The name of the type this mapping data is for.

Type
string
OpenHub
Pingping
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (Github)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs