Automattic\WooCommerce\Api\Pagination
PaginationParams::__construct
Constructor.
Method of the class: PaginationParams{}
No Hooks.
Returns
null. Nothing (null).
Usage
$PaginationParams = new PaginationParams(); $PaginationParams->__construct( #[Description( 'Return the first N results. Must be between 0 and ' . self::MAX_PAGE_SIZE . '.' )] readonly ?int $first = null, #[Description( 'Return the last N results. Must be between 0 and ' . self::MAX_PAGE_SIZE . '.' )] readonly ?int $last = null, #[Description( 'Return results after this cursor.' )] readonly ?string $after = null, #[Description( 'Return results before this cursor.' )] readonly ?string $before = null, );
[Description( foo . self::MAX_PAGE_SIZE . fooo )] public readonly ?int $first
: .
Default: null
[Description( foooo . self::MAX_PAGE_SIZE . fooooo )] public readonly ?int $last
: .
Default: null
[Description( foooooo )] public readonly ?string $after
: .
Default: null
[Description( fooooooo )] public readonly ?string $before
: .
Default: null
- (required)
- .
PaginationParams::__construct() PaginationParams:: construct code WC 10.9.1
public function __construct(
#[Description( 'Return the first N results. Must be between 0 and ' . self::MAX_PAGE_SIZE . '.' )]
public readonly ?int $first = null,
#[Description( 'Return the last N results. Must be between 0 and ' . self::MAX_PAGE_SIZE . '.' )]
public readonly ?int $last = null,
#[Description( 'Return results after this cursor.' )]
public readonly ?string $after = null,
#[Description( 'Return results before this cursor.' )]
public readonly ?string $before = null,
) {
self::validate_limit( 'first', $first );
self::validate_limit( 'last', $last );
}