GRAYBYTE WORDPRESS FILE MANAGER5954

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/healingtouchinstitute.co.in/wp-content/plugins/wpforms-lite/src/Logger/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/healingtouchinstitute.co.in/wp-content/plugins/wpforms-lite/src/Logger//Record.php
<?php

namespace WPForms\Logger;

/**
 * Class Record.
 *
 * @since 1.6.3
 */
class Record {

	/**
	 * Record ID.
	 *
	 * @since 1.6.3
	 *
	 * @var int
	 */
	private $id;

	/**
	 * Record title.
	 *
	 * @since 1.6.3
	 *
	 * @var string
	 */
	private $title;

	/**
	 * Record message.
	 *
	 * @since 1.6.3
	 *
	 * @var string
	 */
	private $message;

	/**
	 * Array, string, or string separated by commas types.
	 *
	 * @since 1.6.3
	 *
	 * @var array|string
	 */
	private $types;

	/**
	 * Datetime of creating record.
	 *
	 * @since 1.6.3
	 *
	 * @var string
	 */
	private $create_at;

	/**
	 * Record form ID.
	 *
	 * @since 1.6.3
	 *
	 * @var int
	 */
	private $form_id;

	/**
	 * Record entry ID.
	 *
	 * @since 1.6.3
	 *
	 * @var int
	 */
	private $entry_id;

	/**
	 * Record user ID.
	 *
	 * @since 1.6.3
	 *
	 * @var int
	 */
	private $user_id;

	/**
	 * Record constructor.
	 *
	 * @since 1.6.3
	 *
	 * @param int          $id        Record ID.
	 * @param string       $title     Record title.
	 * @param string       $message   Record message.
	 * @param array|string $types     Array, string, or string separated by commas types.
	 * @param string       $create_at Datetime of creating record.
	 * @param int          $form_id   Record form ID.
	 * @param int          $entry_id  Record entry ID.
	 * @param int          $user_id   Record user ID.
	 */
	public function __construct( $id, $title, $message, $types, $create_at, $form_id = 0, $entry_id = 0, $user_id = 0 ) {

		$this->id        = $id;
		$this->title     = $title;
		$this->message   = $message;
		$this->types     = $types;
		$this->create_at = strtotime( $create_at );
		$this->form_id   = $form_id;
		$this->entry_id  = $entry_id;
		$this->user_id   = $user_id;
	}

	/**
	 * Get record ID.
	 *
	 * @since 1.6.3
	 *
	 * @return int
	 */
	public function get_id() {

		return $this->id;
	}

	/**
	 * Get record title.
	 *
	 * @since 1.6.3
	 *
	 * @return string
	 */
	public function get_title() {

		return $this->title;
	}

	/**
	 * Get record message.
	 *
	 * @since 1.6.3
	 *
	 * @return string
	 */
	public function get_message() {

		return $this->message;
	}

	/**
	 * Get record types.
	 *
	 * @since 1.6.3
	 *
	 * @param string $view Keys or labels.
	 *
	 * @return array
	 */
	public function get_types( $view = 'key' ) {

		$this->types = is_array( $this->types ) ? $this->types : explode( ',', $this->types );

		if ( $view === 'label' ) {
			return array_intersect_key(
				Log::get_log_types(),
				array_flip( $this->types )
			);
		}

		return $this->types;
	}

	/**
	 * Get date of creating record.
	 *
	 * @since 1.6.3
	 *
	 * @param string $format Date format full|short|default sql format.
	 *
	 * @return string
	 */
	public function get_date( $format = 'short' ) {

		switch ( $format ) {
			case 'short':
				$date = wpforms_date_format( $this->create_at, '', true );
				break;

			case 'full':
				$date = wpforms_datetime_format( $this->create_at, '', true );
				break;

			case 'sql':
				$date = wpforms_datetime_format( $this->create_at, 'Y-m-d H:i:s' );
				break;

			case 'sql-local':
				$date = wpforms_datetime_format( $this->create_at, 'Y-m-d H:i:s', true );
				break;

			default:
				$date = '';
				break;
		}

		return $date;
	}

	/**
	 * Get form ID.
	 *
	 * @since 1.6.3
	 *
	 * @return int
	 */
	public function get_form_id() {

		return $this->form_id;
	}

	/**
	 * Get entry ID.
	 *
	 * @since 1.6.3
	 *
	 * @return int
	 */
	public function get_entry_id() {

		return $this->entry_id;
	}

	/**
	 * Get user ID.
	 *
	 * @since 1.6.3
	 *
	 * @return int
	 */
	public function get_user_id() {

		return $this->user_id;
	}

	/**
	 * Create new record.
	 *
	 * @since 1.6.3
	 *
	 * @param string       $title    Record title.
	 * @param string       $message  Record message.
	 * @param array|string $types    Array, string, or string separated by commas types.
	 * @param int          $form_id  Record form ID.
	 * @param int          $entry_id Record entry ID.
	 * @param int          $user_id  Record user ID.
	 *
	 * @return Record
	 */
	public static function create( $title, $message, $types, $form_id = 0, $entry_id = 0, $user_id = 0 ) {

		return new Record(
			0,
			sanitize_text_field( $title ),
			wp_kses( $message, [ 'pre' => [] ] ),
			$types,
			gmdate( 'Y-m-d H:i:s' ),
			absint( $form_id ),
			absint( $entry_id ),
			absint( $user_id )
		);
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 09 2025 08:42:31
giriqfky / giriqfky
0755
ListTable.php
12.46 KB
June 05 2025 16:54:44
giriqfky / giriqfky
0644
Log.php
5.275 KB
August 08 2024 19:32:00
giriqfky / giriqfky
0644
Record.php
4.28 KB
November 28 2023 16:59:36
giriqfky / giriqfky
0644
RecordQuery.php
1.819 KB
September 26 2024 15:36:36
giriqfky / giriqfky
0644
Records.php
1.939 KB
February 03 2022 16:56:54
giriqfky / giriqfky
0644
Repository.php
5.949 KB
November 07 2024 17:15:50
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF