api/symfony/Component/PropertyAccess/PropertyPathBuilder.yaml
2024-09-26 02:03:21 -07:00

114 lines
3.1 KiB
YAML

name: PropertyPathBuilder
class_comment: '# * @author Bernhard Schussek <bschussek@gmail.com>'
dependencies:
- name: OutOfBoundsException
type: class
source: Symfony\Component\PropertyAccess\Exception\OutOfBoundsException
properties: []
methods:
- name: append
visibility: public
parameters:
- name: path
- name: offset
default: '0'
- name: length
default: '0'
comment: "# * @author Bernhard Schussek <bschussek@gmail.com>\n# */\n# class PropertyPathBuilder\n\
# {\n# private array $elements = [];\n# private array $isIndex = [];\n# \n# public\
\ function __construct(PropertyPathInterface|string|null $path = null)\n# {\n\
# if (null !== $path) {\n# $this->append($path);\n# }\n# }\n# \n# /**\n# * Appends\
\ a (sub-) path to the current path.\n# *\n# * @param int $offset The offset where\
\ the appended piece starts in $path\n# * @param int $length The length of the\
\ appended piece; if 0, the full path is appended"
- name: appendIndex
visibility: public
parameters:
- name: name
comment: '# * Appends an index element to the current path.'
- name: appendProperty
visibility: public
parameters:
- name: name
comment: '# * Appends a property element to the current path.'
- name: remove
visibility: public
parameters:
- name: offset
- name: length
default: '1'
comment: '# * Removes elements from the current path.
# *
# * @throws OutOfBoundsException if offset is invalid'
- name: replace
visibility: public
parameters:
- name: offset
- name: length
- name: path
- name: pathOffset
default: '0'
- name: pathLength
default: '0'
comment: '# * Replaces a sub-path by a different (sub-) path.
# *
# * @param int $pathOffset The offset where the inserted piece starts in $path
# * @param int $pathLength The length of the inserted piece; if 0, the full path
is inserted
# *
# * @throws OutOfBoundsException If the offset is invalid'
- name: replaceByIndex
visibility: public
parameters:
- name: offset
- name: name
default: 'null'
comment: '# * Replaces a property element by an index element.
# *
# * @throws OutOfBoundsException If the offset is invalid'
- name: replaceByProperty
visibility: public
parameters:
- name: offset
- name: name
default: 'null'
comment: '# * Replaces an index element by a property element.
# *
# * @throws OutOfBoundsException If the offset is invalid'
- name: getLength
visibility: public
parameters: []
comment: '# * Returns the length of the current path.'
- name: getPropertyPath
visibility: public
parameters: []
comment: '# * Returns the current property path.'
- name: __toString
visibility: public
parameters: []
comment: '# * Returns the current property path as string.'
- name: resize
visibility: private
parameters:
- name: offset
- name: cutLength
- name: insertionLength
comment: '# * Resizes the path so that a chunk of length $cutLength is
# * removed at $offset and another chunk of length $insertionLength
# * can be inserted.'
traits:
- Symfony\Component\PropertyAccess\Exception\OutOfBoundsException
interfaces: []