HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/linde/wp-content/plugins/better-wp-security/core/modules/firewall/Rules/Rules_Options.php
<?php

namespace iThemesSecurity\Modules\Firewall\Rules;

class Rules_Options {

	/** @var array */
	private $for_refs = [];

	private $search = '';

	private $providers = [];

	private $vulnerabilities = [];

	/** @var bool|null */
	private $paused;

	/** @var int */
	private $page;

	/** @var int */
	private $per_page;

	/**
	 * Looks for a specific rule from a provider.
	 *
	 * @param string $provider The provider slug.
	 * @param string $ref      The provider's reference to find it by.
	 *
	 * @return $this
	 */
	public function for_provider_ref( string $provider, string $ref ): self {
		$this->for_refs[] = compact( 'provider', 'ref' );

		return $this;
	}

	public function get_provider_refs(): array {
		return $this->for_refs;
	}

	public function get_search(): string {
		return $this->search;
	}

	public function set_search( string $search ): self {
		$this->search = $search;

		return $this;
	}

	public function get_providers(): array {
		return $this->providers;
	}

	public function set_providers( array $providers ): self {
		$this->providers = $providers;

		return $this;
	}

	public function get_vulnerabilities(): array {
		return $this->vulnerabilities;
	}

	public function set_vulnerabilities( array $vulnerabilities ): self {
		$this->vulnerabilities = $vulnerabilities;

		return $this;
	}

	public function get_paused(): ?bool {
		return $this->paused;
	}

	public function set_paused( ?bool $paused ): self {
		$this->paused = $paused;

		return $this;
	}

	public function paginate( int $per_page = 10, int $page = 1 ): self {
		if ( $page < 1 ) {
			throw new \InvalidArgumentException( 'Page must be greater than 0.' );
		}

		if ( $per_page < 1 || $per_page > 100 ) {
			throw new \InvalidArgumentException( 'Per page must be greater than 0 and less than 100.' );
		}

		$this->per_page = $per_page;
		$this->page     = $page;

		return $this;
	}

	public function get_page(): ?int {
		return $this->page;
	}

	public function get_per_page(): ?int {
		return $this->per_page;
	}
}