api/laravel/View/ComponentAttributeBag.yaml
2024-09-26 02:03:21 -07:00

449 lines
8.6 KiB
YAML

name: ComponentAttributeBag
class_comment: null
dependencies:
- name: ArrayAccess
type: class
source: ArrayAccess
- name: ArrayIterator
type: class
source: ArrayIterator
- name: Htmlable
type: class
source: Illuminate\Contracts\Support\Htmlable
- name: Arr
type: class
source: Illuminate\Support\Arr
- name: HtmlString
type: class
source: Illuminate\Support\HtmlString
- name: Str
type: class
source: Illuminate\Support\Str
- name: Conditionable
type: class
source: Illuminate\Support\Traits\Conditionable
- name: Macroable
type: class
source: Illuminate\Support\Traits\Macroable
- name: IteratorAggregate
type: class
source: IteratorAggregate
- name: JsonSerializable
type: class
source: JsonSerializable
- name: Stringable
type: class
source: Stringable
- name: Traversable
type: class
source: Traversable
properties:
- name: attributes
visibility: protected
comment: '# * The raw array of attributes.
# *
# * @var array'
methods:
- name: __construct
visibility: public
parameters:
- name: attributes
default: '[]'
comment: "# * The raw array of attributes.\n# *\n# * @var array\n# */\n# protected\
\ $attributes = [];\n# \n# /**\n# * Create a new component attribute bag instance.\n\
# *\n# * @param array $attributes\n# * @return void"
- name: all
visibility: public
parameters: []
comment: '# * Get all of the attribute values.
# *
# * @return array'
- name: first
visibility: public
parameters:
- name: default
default: 'null'
comment: '# * Get the first attribute''s value.
# *
# * @param mixed $default
# * @return mixed'
- name: get
visibility: public
parameters:
- name: key
- name: default
default: 'null'
comment: '# * Get a given attribute from the attribute array.
# *
# * @param string $key
# * @param mixed $default
# * @return mixed'
- name: has
visibility: public
parameters:
- name: key
comment: '# * Determine if a given attribute exists in the attribute array.
# *
# * @param array|string $key
# * @return bool'
- name: hasAny
visibility: public
parameters:
- name: key
comment: '# * Determine if any of the keys exist in the attribute array.
# *
# * @param array|string $key
# * @return bool'
- name: missing
visibility: public
parameters:
- name: key
comment: '# * Determine if a given attribute is missing from the attribute array.
# *
# * @param string $key
# * @return bool'
- name: only
visibility: public
parameters:
- name: keys
comment: '# * Only include the given attribute from the attribute array.
# *
# * @param mixed $keys
# * @return static'
- name: except
visibility: public
parameters:
- name: keys
comment: '# * Exclude the given attribute from the attribute array.
# *
# * @param mixed|array $keys
# * @return static'
- name: filter
visibility: public
parameters:
- name: callback
comment: '# * Filter the attributes, returning a bag of attributes that pass the
filter.
# *
# * @param callable $callback
# * @return static'
- name: whereStartsWith
visibility: public
parameters:
- name: needles
comment: '# * Return a bag of attributes that have keys starting with the given
value / pattern.
# *
# * @param string|string[] $needles
# * @return static'
- name: whereDoesntStartWith
visibility: public
parameters:
- name: needles
comment: '# * Return a bag of attributes with keys that do not start with the given
value / pattern.
# *
# * @param string|string[] $needles
# * @return static'
- name: thatStartWith
visibility: public
parameters:
- name: needles
comment: '# * Return a bag of attributes that have keys starting with the given
value / pattern.
# *
# * @param string|string[] $needles
# * @return static'
- name: onlyProps
visibility: public
parameters:
- name: keys
comment: '# * Only include the given attribute from the attribute array.
# *
# * @param mixed|array $keys
# * @return static'
- name: exceptProps
visibility: public
parameters:
- name: keys
comment: '# * Exclude the given attribute from the attribute array.
# *
# * @param mixed|array $keys
# * @return static'
- name: class
visibility: public
parameters:
- name: classList
comment: '# * Conditionally merge classes into the attribute bag.
# *
# * @param mixed|array $classList
# * @return static'
- name: style
visibility: public
parameters:
- name: styleList
comment: '# * Conditionally merge styles into the attribute bag.
# *
# * @param mixed|array $styleList
# * @return static'
- name: merge
visibility: public
parameters:
- name: attributeDefaults
default: '[]'
- name: escape
default: 'true'
comment: '# * Merge additional attributes / values into the attribute bag.
# *
# * @param array $attributeDefaults
# * @param bool $escape
# * @return static'
- name: shouldEscapeAttributeValue
visibility: protected
parameters:
- name: escape
- name: value
comment: '# * Determine if the specific attribute value should be escaped.
# *
# * @param bool $escape
# * @param mixed $value
# * @return bool'
- name: prepends
visibility: public
parameters:
- name: value
comment: '# * Create a new appendable attribute value.
# *
# * @param mixed $value
# * @return \Illuminate\View\AppendableAttributeValue'
- name: resolveAppendableAttributeDefault
visibility: protected
parameters:
- name: attributeDefaults
- name: key
- name: escape
comment: '# * Resolve an appendable attribute value default value.
# *
# * @param array $attributeDefaults
# * @param string $key
# * @param bool $escape
# * @return mixed'
- name: isEmpty
visibility: public
parameters: []
comment: '# * Determine if the attribute bag is empty.
# *
# * @return bool'
- name: isNotEmpty
visibility: public
parameters: []
comment: '# * Determine if the attribute bag is not empty.
# *
# * @return bool'
- name: getAttributes
visibility: public
parameters: []
comment: '# * Get all of the raw attributes.
# *
# * @return array'
- name: setAttributes
visibility: public
parameters:
- name: attributes
comment: '# * Set the underlying attributes.
# *
# * @param array $attributes
# * @return void'
- name: extractPropNames
visibility: public
parameters:
- name: keys
comment: '# * Extract "prop" names from given keys.
# *
# * @param array $keys
# * @return array'
- name: toHtml
visibility: public
parameters: []
comment: '# * Get content as a string of HTML.
# *
# * @return string'
- name: __invoke
visibility: public
parameters:
- name: attributeDefaults
default: '[]'
comment: '# * Merge additional attributes / values into the attribute bag.
# *
# * @param array $attributeDefaults
# * @return \Illuminate\Support\HtmlString'
- name: offsetExists
visibility: public
parameters:
- name: offset
comment: '# * Determine if the given offset exists.
# *
# * @param string $offset
# * @return bool'
- name: offsetGet
visibility: public
parameters:
- name: offset
comment: '# * Get the value at the given offset.
# *
# * @param string $offset
# * @return mixed'
- name: offsetSet
visibility: public
parameters:
- name: offset
- name: value
comment: '# * Set the value at a given offset.
# *
# * @param string $offset
# * @param mixed $value
# * @return void'
- name: offsetUnset
visibility: public
parameters:
- name: offset
comment: '# * Remove the value at the given offset.
# *
# * @param string $offset
# * @return void'
- name: getIterator
visibility: public
parameters: []
comment: '# * Get an iterator for the items.
# *
# * @return \ArrayIterator'
- name: jsonSerialize
visibility: public
parameters: []
comment: '# * Convert the object into a JSON serializable form.
# *
# * @return mixed'
- name: __toString
visibility: public
parameters: []
comment: '# * Implode the attributes into a single HTML ready string.
# *
# * @return string'
traits:
- ArrayAccess
- ArrayIterator
- Illuminate\Contracts\Support\Htmlable
- Illuminate\Support\Arr
- Illuminate\Support\HtmlString
- Illuminate\Support\Str
- Illuminate\Support\Traits\Conditionable
- Illuminate\Support\Traits\Macroable
- IteratorAggregate
- JsonSerializable
- Stringable
- Traversable
- Conditionable
interfaces:
- ArrayAccess