api/laravel/Queue/SerializesAndRestoresModelIdentifiers.yaml
2024-09-26 02:03:21 -07:00

96 lines
2.3 KiB
YAML

name: SerializesAndRestoresModelIdentifiers
class_comment: null
dependencies:
- name: ModelIdentifier
type: class
source: Illuminate\Contracts\Database\ModelIdentifier
- name: QueueableCollection
type: class
source: Illuminate\Contracts\Queue\QueueableCollection
- name: QueueableEntity
type: class
source: Illuminate\Contracts\Queue\QueueableEntity
- name: EloquentCollection
type: class
source: Illuminate\Database\Eloquent\Collection
- name: AsPivot
type: class
source: Illuminate\Database\Eloquent\Relations\Concerns\AsPivot
- name: Pivot
type: class
source: Illuminate\Database\Eloquent\Relations\Pivot
properties: []
methods:
- name: getSerializedPropertyValue
visibility: protected
parameters:
- name: value
- name: withRelations
default: 'true'
comment: '# * Get the property value prepared for serialization.
# *
# * @param mixed $value
# * @param bool $withRelations
# * @return mixed'
- name: getRestoredPropertyValue
visibility: protected
parameters:
- name: value
comment: '# * Get the restored property value after deserialization.
# *
# * @param mixed $value
# * @return mixed'
- name: restoreCollection
visibility: protected
parameters:
- name: value
comment: '# * Restore a queueable collection instance.
# *
# * @param \Illuminate\Contracts\Database\ModelIdentifier $value
# * @return \Illuminate\Database\Eloquent\Collection'
- name: restoreModel
visibility: public
parameters:
- name: value
comment: '# * Restore the model from the model identifier instance.
# *
# * @param \Illuminate\Contracts\Database\ModelIdentifier $value
# * @return \Illuminate\Database\Eloquent\Model'
- name: getQueryForModelRestoration
visibility: protected
parameters:
- name: model
- name: ids
comment: '# * Get the query for model restoration.
# *
# * @template TModel of \Illuminate\Database\Eloquent\Model
# *
# * @param TModel $model
# * @param array|int $ids
# * @return \Illuminate\Database\Eloquent\Builder<TModel>'
traits:
- Illuminate\Contracts\Database\ModelIdentifier
- Illuminate\Contracts\Queue\QueueableCollection
- Illuminate\Contracts\Queue\QueueableEntity
- Illuminate\Database\Eloquent\Relations\Concerns\AsPivot
- Illuminate\Database\Eloquent\Relations\Pivot
interfaces: []