EventData Class¶
final class EventData implements \ArrayAccess, \Iterator, \Countable
{
/**
* Database fields; read-only
*/
int $blog_id;
int $event;
string $ipv6;
?string $username;
?string $password;
?int $ref_id;
?string $iso;
?int $plugin;
?string $request_method;
?string $url;
?string $content_type;
?string $referer;
?string $user_agent;
?string $post;
?string $headers;
/**
* Getters
*/
function getBlogId(): int;
function getEventId(): int;
function getIp(): string;
function getUsername(): ?string;
function getPassword(): ?string;
function getRefId(): ?int;
function getIsoCountryCode(): ?string;
function getPluginId(): ?int;
function getRequestMethod(): ?string;
function getUrl(): ?string;
function getContentType(): ?string;
function getReferer(): ?string;
function getUserAgent(): ?string;
function getPostData(): ?string;
function getHttpHeaders(): ?string;
}
WPf2b Event data.
Database field:
blog_id
Database field:
event
Database field:
ipv6
Database field:
username
Database field:
password
Database field:
ref_id
Database field:
iso
Database field:
plugin
Database field:
request_method
Database field:
url
Database field:
content_type
Database field:
referer
Database field:
user_agent
Database field:
post
Database field:
headers
Get the ID of the blog that generated the event.
Returns: The Blog ID as an integer.
Get the ID of the Event.
Returns: Returns the Event ID as an integer.
Get the IP address of the host that caused the Event.
Returns: Returns the IP address as a string.
Get the username used to trigger the Event. Set by:
- WPF2B_EVENT_AUTH_BLOCK_USER
- WPF2B_EVENT_AUTH_BLOCK_USERNAME_LOGIN
- WPF2B_EVENT_AUTH_FAIL
- WPF2B_EVENT_AUTH_OK
- WPF2B_EVENT_PASSWORD_REQUEST
Returns: The username as a string, or null
if not set.
Get the password used to trigger the Event. Set by;
Returns: The password as a string, or null
if not set.
Get the referenced ID for the Event. Set by:
- WPF2B_EVENT_COMMENT_CLOSED
- WPF2B_EVENT_COMMENT_DRAFT
- WPF2B_EVENT_COMMENT_NOT_FOUND
- WPF2B_EVENT_COMMENT_PASSWORD
- WPF2B_EVENT_COMMENT_SPAM
- WPF2B_EVENT_COMMENT_TRASH
- WPF2B_EVENT_COMMENT
Returns: The Reference ID as an integer, or null
if not set.
Get the 2-letter ISO country code for the Event.
Returns: The country code as a string, or null
if unknown.
Get the registered plugin ID. See Register Plugin.
Returns: The plugin ID as an integer, or null
for core Events.
Get the HTTP Request Method for the Event. See WP_FAIL2BAN_EX_LOG_URL.
Returns: The request method as a string, or null
if URL logging is not enabled.
Get the HTTP URL for the Event. See WP_FAIL2BAN_EX_LOG_URL.
Returns: The URL as a string, or null
if URL logging is not enabled.
Get the HTTP Content Type for the Event. See WP_FAIL2BAN_EX_LOG_POST_DATA.
Returns: The content type as a string, or null
if POST data logging is not enabled.
Get the HTTP Referer for the Event. See WP_FAIL2BAN_EX_LOG_REFERER.
Returns: The Referer as a string, or null
if Referer logging is not enabled.
Get the HTTP User Agent for the Event. See WP_FAIL2BAN_EX_LOG_USER_AGENT.
Returns: The user agent as a string, or null
if User Agent logging is not enabled.
Get the HTTP POST data for the Event. See WP_FAIL2BAN_EX_LOG_POST_DATA.
Returns: The POST data as a string, or null
if POST data logging is not enabled.
Get the HTTP headers for the Event. See WP_FAIL2BAN_EX_LOG_HEADERS.
Returns: The HTTP headers as a string, or null
if header logging is not enabled.