PHP Class Cake\ElasticSearch\Association\Embedded

Subclassed for the various kinds of embedded document types.
Datei anzeigen Open project: cakephp/elastic-search Class Usage Examples

Protected Properties

Property Type Description
$alias string The alias this association uses.
$entityClass string The class to use for the embeded document.
$property string The property the embedded document is located under.

Public Methods

Method Description
__construct ( string $alias, array $options = [] ) Constructor
alias ( ) : string Get the alias for this embed.
entityClass ( string | null $name = null ) : string Get/set the entity/document class used for this embed.
hydrate ( array $data, array $options ) : Document | array Hydrate instance(s) from the parent documents data.
property ( string | null $name = null ) : string Get/set the property this embed is attached to.
type ( ) : string Get the type of association this is.

Method Details

__construct() public method

Constructor
public __construct ( string $alias, array $options = [] )
$alias string The alias/name for the embedded document.
$options array The options for the embedded document.

alias() public method

Get the alias for this embed.
public alias ( ) : string
return string

entityClass() public method

Get/set the entity/document class used for this embed.
public entityClass ( string | null $name = null ) : string
$name string | null The class name to set.
return string The class name.

hydrate() abstract public method

Hydrate instance(s) from the parent documents data.
abstract public hydrate ( array $data, array $options ) : Document | array
$data array The data to use in the embedded document.
$options array The options to use in the new document.
return Cake\ElasticSearch\Document | array

property() public method

Get/set the property this embed is attached to.
public property ( string | null $name = null ) : string
$name string | null The property name to set.
return string The property name.

type() abstract public method

Returns one of the association type constants.
abstract public type ( ) : string
return string

Property Details

$alias protected_oe property

The alias this association uses.
protected string $alias
return string

$entityClass protected_oe property

The class to use for the embeded document.
protected string $entityClass
return string

$property protected_oe property

The property the embedded document is located under.
protected string $property
return string