136 lines
3.3 KiB
YAML
136 lines
3.3 KiB
YAML
|
name: MorphOneOrMany
|
||
|
class_comment: null
|
||
|
dependencies:
|
||
|
- name: Builder
|
||
|
type: class
|
||
|
source: Illuminate\Database\Eloquent\Builder
|
||
|
- name: Model
|
||
|
type: class
|
||
|
source: Illuminate\Database\Eloquent\Model
|
||
|
properties:
|
||
|
- name: morphType
|
||
|
visibility: protected
|
||
|
comment: '# * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
|
||
|
|
||
|
# * @template TDeclaringModel of \Illuminate\Database\Eloquent\Model
|
||
|
|
||
|
# * @template TResult
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @extends \Illuminate\Database\Eloquent\Relations\HasOneOrMany<TRelatedModel,
|
||
|
TDeclaringModel, TResult>
|
||
|
|
||
|
# */
|
||
|
|
||
|
# abstract class MorphOneOrMany extends HasOneOrMany
|
||
|
|
||
|
# {
|
||
|
|
||
|
# /**
|
||
|
|
||
|
# * The foreign key type for the relationship.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
- name: morphClass
|
||
|
visibility: protected
|
||
|
comment: '# * The class name of the parent model.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
methods:
|
||
|
- name: __construct
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: query
|
||
|
- name: parent
|
||
|
- name: type
|
||
|
- name: id
|
||
|
- name: localKey
|
||
|
comment: "# * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n\
|
||
|
# * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n# *\
|
||
|
\ @template TResult\n# *\n# * @extends \\Illuminate\\Database\\Eloquent\\Relations\\\
|
||
|
HasOneOrMany<TRelatedModel, TDeclaringModel, TResult>\n# */\n# abstract class\
|
||
|
\ MorphOneOrMany extends HasOneOrMany\n# {\n# /**\n# * The foreign key type for\
|
||
|
\ the relationship.\n# *\n# * @var string\n# */\n# protected $morphType;\n# \n\
|
||
|
# /**\n# * The class name of the parent model.\n# *\n# * @var string\n# */\n#\
|
||
|
\ protected $morphClass;\n# \n# /**\n# * Create a new morph one or many relationship\
|
||
|
\ instance.\n# *\n# * @param \\Illuminate\\Database\\Eloquent\\Builder<TRelatedModel>\
|
||
|
\ $query\n# * @param TDeclaringModel $parent\n# * @param string $type\n#\
|
||
|
\ * @param string $id\n# * @param string $localKey\n# * @return void"
|
||
|
- name: addConstraints
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Set the base constraints on the relation query.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return void'
|
||
|
- name: addEagerConstraints
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: models
|
||
|
comment: '# @inheritDoc'
|
||
|
- name: forceCreate
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: attributes
|
||
|
default: '[]'
|
||
|
comment: '# * Create a new instance of the related model. Allow mass-assignment.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param array $attributes
|
||
|
|
||
|
# * @return TRelatedModel'
|
||
|
- name: setForeignAttributesForCreate
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: model
|
||
|
comment: '# * Set the foreign ID and type for creating a related model.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param TRelatedModel $model
|
||
|
|
||
|
# * @return void'
|
||
|
- name: getRelationExistenceQuery
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: query
|
||
|
- name: parentQuery
|
||
|
- name: columns
|
||
|
default: '[''*'']'
|
||
|
comment: '# @inheritDoc'
|
||
|
- name: getQualifiedMorphType
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the foreign key "type" name.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string'
|
||
|
- name: getMorphType
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the plain morph type name without the table.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string'
|
||
|
- name: getMorphClass
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the class name of the parent model.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string'
|
||
|
traits:
|
||
|
- Illuminate\Database\Eloquent\Builder
|
||
|
- Illuminate\Database\Eloquent\Model
|
||
|
interfaces: []
|