Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5/**
6 * This file is part of php-fast-forward/http-message.
7 *
8 * This source file is subject to the license bundled
9 * with this source code in the file LICENSE.
10 *
11 * @copyright Copyright (c) 2025-2026 Felipe SayĆ£o Lobato Abreu <github@mentordosnerds.com>
12 * @license   https://opensource.org/licenses/MIT MIT License
13 *
14 * @see       https://github.com/php-fast-forward/http-message
15 * @see       https://github.com/php-fast-forward
16 * @see       https://datatracker.ietf.org/doc/html/rfc2119
17 */
18
19namespace FastForward\Http\Message;
20
21/**
22 * Interface PayloadAwareInterface.
23 *
24 * Defines functionality for objects that encapsulate and manage a payload.
25 * Implementations of this interface MUST provide immutable methods for accessing and replacing the payload.
26 * The payload MAY be of any type supported by the implementation, including arrays, objects, scalars, or null.
27 */
28interface PayloadAwareInterface
29{
30    /**
31     * Retrieves the payload contained within the object.
32     *
33     * This method MUST return the payload as originally provided or modified.
34     * The returned type MAY vary depending on the structure of the payload (e.g., array, object, scalar, or null).
35     *
36     * @return mixed the payload, which MAY be of any type including array, object, scalar, or null
37     */
38    public function getPayload(): mixed;
39}