# jetformbuilder/3.6.6/modules/security/csrf/csrf-token-view.php

JetFormBuilder — Dynamic Blocks Form Builder, version 3.6.6. 48 lines.

- Page: https://pluginprobe.com/plugins/jetformbuilder/3.6.6/code/modules/security/csrf/csrf-token-view.php
- Raw: https://pluginprobe.com/plugins/jetformbuilder/3.6.6/raw/modules/security/csrf/csrf-token-view.php
- Modified: 2023-11-20T11:46:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/jetformbuilder/3.6.6/code/modules/security/csrf/csrf-token-view.php#L10-L20`.

```php
<?php


namespace JFB_Modules\Security\Csrf;

use Jet_Form_Builder\Db_Queries\Views\View_Base;
use Jet_Form_Builder\Exceptions\Query_Builder_Exception;

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

class Csrf_Token_View extends View_Base {

	/**
	 * @return string
	 */
	public function table(): string {
		return Csrf_Token_Model::table();
	}

	public function select_columns(): array {
		return Csrf_Token_Model::schema_columns();
	}

	public function get_dependencies(): array {
		return array(
			new Csrf_Token_Model(),
		);
	}

	/**
	 * @param string $client_id
	 *
	 * @return array
	 * @throws Query_Builder_Exception
	 */
	public static function by_client( string $client_id ): array {
		return static::findOne(
			array(
				'client_id' => $client_id,
			)
		)->query()->query_one();
	}

}

```
