api/laravel/Http/Client/ResponseSequence.yaml

157 lines
3.4 KiB
YAML
Raw Normal View History

2024-09-26 09:03:21 +00:00
name: ResponseSequence
class_comment: null
dependencies:
- name: Macroable
type: class
source: Illuminate\Support\Traits\Macroable
- name: OutOfBoundsException
type: class
source: OutOfBoundsException
- name: Macroable
type: class
source: Macroable
properties:
- name: responses
visibility: protected
comment: '# * The responses in the sequence.
# *
# * @var array'
- name: failWhenEmpty
visibility: protected
comment: '# * Indicates that invoking this sequence when it is empty should throw
an exception.
# *
# * @var bool'
- name: emptyResponse
visibility: protected
comment: '# * The response that should be returned when the sequence is empty.
# *
# * @var \GuzzleHttp\Promise\PromiseInterface'
methods:
- name: __construct
visibility: public
parameters:
- name: responses
comment: "# * The responses in the sequence.\n# *\n# * @var array\n# */\n# protected\
\ $responses;\n# \n# /**\n# * Indicates that invoking this sequence when it is\
\ empty should throw an exception.\n# *\n# * @var bool\n# */\n# protected $failWhenEmpty\
\ = true;\n# \n# /**\n# * The response that should be returned when the sequence\
\ is empty.\n# *\n# * @var \\GuzzleHttp\\Promise\\PromiseInterface\n# */\n# protected\
\ $emptyResponse;\n# \n# /**\n# * Create a new response sequence.\n# *\n# * @param\
\ array $responses\n# * @return void"
- name: push
visibility: public
parameters:
- name: body
default: 'null'
- name: status
default: '200'
- name: headers
default: '[]'
comment: '# * Push a response to the sequence.
# *
# * @param string|array|null $body
# * @param int $status
# * @param array $headers
# * @return $this'
- name: pushStatus
visibility: public
parameters:
- name: status
- name: headers
default: '[]'
comment: '# * Push a response with the given status code to the sequence.
# *
# * @param int $status
# * @param array $headers
# * @return $this'
- name: pushFile
visibility: public
parameters:
- name: filePath
- name: status
default: '200'
- name: headers
default: '[]'
comment: '# * Push response with the contents of a file as the body to the sequence.
# *
# * @param string $filePath
# * @param int $status
# * @param array $headers
# * @return $this'
- name: pushResponse
visibility: public
parameters:
- name: response
comment: '# * Push a response to the sequence.
# *
# * @param mixed $response
# * @return $this'
- name: whenEmpty
visibility: public
parameters:
- name: response
comment: '# * Make the sequence return a default response when it is empty.
# *
# * @param \GuzzleHttp\Promise\PromiseInterface|\Closure $response
# * @return $this'
- name: dontFailWhenEmpty
visibility: public
parameters: []
comment: '# * Make the sequence return a default response when it is empty.
# *
# * @return $this'
- name: isEmpty
visibility: public
parameters: []
comment: '# * Indicate that this sequence has depleted all of its responses.
# *
# * @return bool'
- name: __invoke
visibility: public
parameters: []
comment: '# * Get the next response in the sequence.
# *
# * @return mixed
# *
# * @throws \OutOfBoundsException'
traits:
- Illuminate\Support\Traits\Macroable
- OutOfBoundsException
- Macroable
interfaces: []