210 lines
5.3 KiB
YAML
210 lines
5.3 KiB
YAML
|
name: MorphToMany
|
||
|
class_comment: '# * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
|
||
|
|
||
|
# * @template TDeclaringModel of \Illuminate\Database\Eloquent\Model
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @extends \Illuminate\Database\Eloquent\Relations\BelongsToMany<TRelatedModel,
|
||
|
TDeclaringModel>'
|
||
|
dependencies:
|
||
|
- name: Builder
|
||
|
type: class
|
||
|
source: Illuminate\Database\Eloquent\Builder
|
||
|
- name: Model
|
||
|
type: class
|
||
|
source: Illuminate\Database\Eloquent\Model
|
||
|
- name: Arr
|
||
|
type: class
|
||
|
source: Illuminate\Support\Arr
|
||
|
properties:
|
||
|
- name: morphType
|
||
|
visibility: protected
|
||
|
comment: '# * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
|
||
|
|
||
|
# * @template TDeclaringModel of \Illuminate\Database\Eloquent\Model
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @extends \Illuminate\Database\Eloquent\Relations\BelongsToMany<TRelatedModel,
|
||
|
TDeclaringModel>
|
||
|
|
||
|
# */
|
||
|
|
||
|
# class MorphToMany extends BelongsToMany
|
||
|
|
||
|
# {
|
||
|
|
||
|
# /**
|
||
|
|
||
|
# * The type of the polymorphic relation.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
- name: morphClass
|
||
|
visibility: protected
|
||
|
comment: '# * The class name of the morph type constraint.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
- name: inverse
|
||
|
visibility: protected
|
||
|
comment: '# * Indicates if we are connecting the inverse of the relation.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * This primarily affects the morphClass constraint.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var bool'
|
||
|
methods:
|
||
|
- name: __construct
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: query
|
||
|
- name: parent
|
||
|
- name: name
|
||
|
- name: table
|
||
|
- name: foreignPivotKey
|
||
|
- name: relatedPivotKey
|
||
|
- name: parentKey
|
||
|
- name: relatedKey
|
||
|
- name: relationName
|
||
|
default: 'null'
|
||
|
- name: inverse
|
||
|
default: 'false'
|
||
|
comment: "# * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n\
|
||
|
# * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n# *\n\
|
||
|
# * @extends \\Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany<TRelatedModel,\
|
||
|
\ TDeclaringModel>\n# */\n# class MorphToMany extends BelongsToMany\n# {\n# /**\n\
|
||
|
# * The type of the polymorphic relation.\n# *\n# * @var string\n# */\n# protected\
|
||
|
\ $morphType;\n# \n# /**\n# * The class name of the morph type constraint.\n#\
|
||
|
\ *\n# * @var string\n# */\n# protected $morphClass;\n# \n# /**\n# * Indicates\
|
||
|
\ if we are connecting the inverse of the relation.\n# *\n# * This primarily affects\
|
||
|
\ the morphClass constraint.\n# *\n# * @var bool\n# */\n# protected $inverse;\n\
|
||
|
# \n# /**\n# * Create a new morph to many relationship instance.\n# *\n# * @param\
|
||
|
\ \\Illuminate\\Database\\Eloquent\\Builder<TRelatedModel> $query\n# * @param\
|
||
|
\ TDeclaringModel $parent\n# * @param string $name\n# * @param string $table\n\
|
||
|
# * @param string $foreignPivotKey\n# * @param string $relatedPivotKey\n#\
|
||
|
\ * @param string $parentKey\n# * @param string $relatedKey\n# * @param string|null\
|
||
|
\ $relationName\n# * @param bool $inverse\n# * @return void"
|
||
|
- name: addWhereConstraints
|
||
|
visibility: protected
|
||
|
parameters: []
|
||
|
comment: '# * Set the where clause for the relation query.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return $this'
|
||
|
- name: addEagerConstraints
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: models
|
||
|
comment: '# @inheritDoc'
|
||
|
- name: baseAttachRecord
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: id
|
||
|
- name: timed
|
||
|
comment: '# * Create a new pivot attachment record.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param int $id
|
||
|
|
||
|
# * @param bool $timed
|
||
|
|
||
|
# * @return array'
|
||
|
- name: getRelationExistenceQuery
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: query
|
||
|
- name: parentQuery
|
||
|
- name: columns
|
||
|
default: '[''*'']'
|
||
|
comment: '# @inheritDoc'
|
||
|
- name: getCurrentlyAttachedPivots
|
||
|
visibility: protected
|
||
|
parameters: []
|
||
|
comment: '# * Get the pivot models that are currently attached.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return \Illuminate\Support\Collection<int, \Illuminate\Database\Eloquent\Relations\Pivot|\Illuminate\Database\Eloquent\Relations\MorphPivot>'
|
||
|
- name: newPivotQuery
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Create a new query builder for the pivot table.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return \Illuminate\Database\Query\Builder'
|
||
|
- name: newPivot
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: attributes
|
||
|
default: '[]'
|
||
|
- name: exists
|
||
|
default: 'false'
|
||
|
comment: '# * Create a new pivot model instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param array $attributes
|
||
|
|
||
|
# * @param bool $exists
|
||
|
|
||
|
# * @return \Illuminate\Database\Eloquent\Relations\Pivot'
|
||
|
- name: aliasedPivotColumns
|
||
|
visibility: protected
|
||
|
parameters: []
|
||
|
comment: '# * Get the pivot columns for the relation.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * "pivot_" is prefixed at each column for easy removal later.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return array'
|
||
|
- name: getMorphType
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the foreign key "type" name.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string'
|
||
|
- name: getQualifiedMorphTypeName
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the fully qualified morph type for the relation.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string'
|
||
|
- name: getMorphClass
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the class name of the parent model.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string'
|
||
|
- name: getInverse
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the indicator for a reverse relationship.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return bool'
|
||
|
traits:
|
||
|
- Illuminate\Database\Eloquent\Builder
|
||
|
- Illuminate\Database\Eloquent\Model
|
||
|
- Illuminate\Support\Arr
|
||
|
interfaces: []
|