platform/api/laravel/Support/Fluent.yaml
2024-09-02 10:44:11 -07:00

276 lines
5.4 KiB
YAML

name: Fluent
class_comment: '# * @template TKey of array-key
# * @template TValue
# *
# * @implements \Illuminate\Contracts\Support\Arrayable<TKey, TValue>
# * @implements \ArrayAccess<TKey, TValue>'
dependencies:
- name: ArrayAccess
type: class
source: ArrayAccess
- name: Arrayable
type: class
source: Illuminate\Contracts\Support\Arrayable
- name: Jsonable
type: class
source: Illuminate\Contracts\Support\Jsonable
- name: JsonSerializable
type: class
source: JsonSerializable
properties:
- name: attributes
visibility: protected
comment: '# * @template TKey of array-key
# * @template TValue
# *
# * @implements \Illuminate\Contracts\Support\Arrayable<TKey, TValue>
# * @implements \ArrayAccess<TKey, TValue>
# */
# class Fluent implements Arrayable, ArrayAccess, Jsonable, JsonSerializable
# {
# /**
# * All of the attributes set on the fluent instance.
# *
# * @var array<TKey, TValue>'
methods:
- name: __construct
visibility: public
parameters:
- name: attributes
default: '[]'
comment: "# * @template TKey of array-key\n# * @template TValue\n# *\n# * @implements\
\ \\Illuminate\\Contracts\\Support\\Arrayable<TKey, TValue>\n# * @implements \\\
ArrayAccess<TKey, TValue>\n# */\n# class Fluent implements Arrayable, ArrayAccess,\
\ Jsonable, JsonSerializable\n# {\n# /**\n# * All of the attributes set on the\
\ fluent instance.\n# *\n# * @var array<TKey, TValue>\n# */\n# protected $attributes\
\ = [];\n# \n# /**\n# * Create a new fluent instance.\n# *\n# * @param iterable<TKey,\
\ TValue> $attributes\n# * @return void"
- name: get
visibility: public
parameters:
- name: key
- name: default
default: 'null'
comment: '# * Get an attribute from the fluent instance using "dot" notation.
# *
# * @template TGetDefault
# *
# * @param TKey $key
# * @param TGetDefault|(\Closure(): TGetDefault) $default
# * @return TValue|TGetDefault'
- name: value
visibility: public
parameters:
- name: key
- name: default
default: 'null'
comment: '# * Get an attribute from the fluent instance.
# *
# * @param string $key
# * @param mixed $default
# * @return mixed'
- name: scope
visibility: public
parameters:
- name: key
- name: default
default: 'null'
comment: '# * Get the value of the given key as a new Fluent instance.
# *
# * @param string $key
# * @param mixed $default
# * @return static'
- name: getAttributes
visibility: public
parameters: []
comment: '# * Get the attributes from the fluent instance.
# *
# * @return array<TKey, TValue>'
- name: toArray
visibility: public
parameters: []
comment: '# * Convert the fluent instance to an array.
# *
# * @return array<TKey, TValue>'
- name: collect
visibility: public
parameters:
- name: key
default: 'null'
comment: '# * Convert the fluent instance to a Collection.
# *
# * @param string|null $key
# * @return \Illuminate\Support\Collection'
- name: jsonSerialize
visibility: public
parameters: []
comment: '# * Convert the object into something JSON serializable.
# *
# * @return array<TKey, TValue>'
- name: toJson
visibility: public
parameters:
- name: options
default: '0'
comment: '# * Convert the fluent instance to JSON.
# *
# * @param int $options
# * @return string'
- name: offsetExists
visibility: public
parameters:
- name: offset
comment: '# * Determine if the given offset exists.
# *
# * @param TKey $offset
# * @return bool'
- name: offsetGet
visibility: public
parameters:
- name: offset
comment: '# * Get the value for a given offset.
# *
# * @param TKey $offset
# * @return TValue|null'
- name: offsetSet
visibility: public
parameters:
- name: offset
- name: value
comment: '# * Set the value at the given offset.
# *
# * @param TKey $offset
# * @param TValue $value
# * @return void'
- name: offsetUnset
visibility: public
parameters:
- name: offset
comment: '# * Unset the value at the given offset.
# *
# * @param TKey $offset
# * @return void'
- name: __call
visibility: public
parameters:
- name: method
- name: parameters
comment: '# * Handle dynamic calls to the fluent instance to set attributes.
# *
# * @param TKey $method
# * @param array{0: ?TValue} $parameters
# * @return $this'
- name: __get
visibility: public
parameters:
- name: key
comment: '# * Dynamically retrieve the value of an attribute.
# *
# * @param TKey $key
# * @return TValue|null'
- name: __set
visibility: public
parameters:
- name: key
- name: value
comment: '# * Dynamically set the value of an attribute.
# *
# * @param TKey $key
# * @param TValue $value
# * @return void'
- name: __isset
visibility: public
parameters:
- name: key
comment: '# * Dynamically check if an attribute is set.
# *
# * @param TKey $key
# * @return bool'
- name: __unset
visibility: public
parameters:
- name: key
comment: '# * Dynamically unset an attribute.
# *
# * @param TKey $key
# * @return void'
traits:
- ArrayAccess
- Illuminate\Contracts\Support\Arrayable
- Illuminate\Contracts\Support\Jsonable
- JsonSerializable
interfaces:
- \Illuminate\Contracts\Support\Arrayable
- \ArrayAccess
- Arrayable