RelationshipInterface
Interface for model relationship management
- Full name: \Zemit\Mvc\Model\Interfaces\RelationshipInterface
Methods
setKeepMissingRelated
public setKeepMissingRelated(array $keepMissingRelated): void
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $keepMissingRelated | array | 
getKeepMissingRelated
public getKeepMissingRelated(): array
getKeepMissingRelatedAlias
public getKeepMissingRelatedAlias(string $alias): bool
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $alias | string | 
setKeepMissingRelatedAlias
public setKeepMissingRelatedAlias(string $alias, bool $keepMissing): void
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $alias | string | |
| $keepMissing | bool | 
getRelationshipContext
public getRelationshipContext(): string
setRelationshipContext
public setRelationshipContext(string $context): void
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $context | string | 
getDirtyRelated
public getDirtyRelated(): array
setDirtyRelated
public setDirtyRelated(array $dirtyRelated): void
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $dirtyRelated | array | 
getDirtyRelatedAlias
public getDirtyRelatedAlias(string $alias): mixed
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $alias | string | 
setDirtyRelatedAlias
public setDirtyRelatedAlias(string $alias, mixed $value): void
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $alias | string | |
| $value | mixed | 
hasDirtyRelated
public hasDirtyRelated(): bool
hasDirtyRelatedAlias
public hasDirtyRelatedAlias(string $alias): bool
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $alias | string | 
assignRelated
public assignRelated(array $data, ?array $whiteList = null, ?array $dataColumnMap = null): \Phalcon\Mvc\ModelInterface
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $data | array | |
| $whiteList | ?array | |
| $dataColumnMap | ?array | 
postSaveRelatedRecordsAfter
public postSaveRelatedRecordsAfter(\Phalcon\Mvc\Model\RelationInterface $relation, mixed $relatedRecords, \Phalcon\Support\Collection\CollectionInterface $visited): ?bool
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $relation | \Phalcon\Mvc\Model\RelationInterface | |
| $relatedRecords | mixed | |
| $visited | \Phalcon\Support\Collection\CollectionInterface | 
postSaveRelatedThroughAfter
public postSaveRelatedThroughAfter(\Phalcon\Mvc\Model\RelationInterface $relation, mixed $relatedRecords, \Phalcon\Support\Collection\CollectionInterface $visited): ?bool
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $relation | \Phalcon\Mvc\Model\RelationInterface | |
| $relatedRecords | mixed | |
| $visited | \Phalcon\Support\Collection\CollectionInterface | 
getEntityFromData
public getEntityFromData(array $data, array $configuration = []): \Phalcon\Mvc\ModelInterface
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $data | array | |
| $configuration | array | 
appendMessages
public appendMessages(array $messages = [], ?string $context = null, ?int $index): void
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $messages | array | |
| $context | ?string | |
| $index | ?int | 
appendMessagesFromRecord
public appendMessagesFromRecord(?\Phalcon\Mvc\ModelInterface $record = null, string $context = null, ?int $index): void
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $record | ?\Phalcon\Mvc\ModelInterface | |
| $context | string | |
| $index | ?int | 
appendMessagesFromResultset
public appendMessagesFromResultset(?\Phalcon\Mvc\Model\ResultsetInterface $resultset = null, ?string $context = null, ?int $index): void
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $resultset | ?\Phalcon\Mvc\Model\ResultsetInterface | |
| $context | ?string | |
| $index | ?int | 
appendMessagesFromRecordList
public appendMessagesFromRecordList(?iterable $recordList = null, ?string $context = null, ?int $index): void
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $recordList | ?iterable | |
| $context | ?string | |
| $index | ?int | 
rebuildMessageContext
public rebuildMessageContext(\Phalcon\Messages\Message $message, string $context): ?string
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $message | \Phalcon\Messages\Message | |
| $context | string | 
rebuildMessageIndex
public rebuildMessageIndex(\Phalcon\Messages\Message $message, ?int $index): ?string
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $message | \Phalcon\Messages\Message | |
| $index | ?int | 
relatedToArray
public relatedToArray(?array $columns = null, bool $useGetter = true): array
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| $columns | ?array | |
| $useGetter | bool |