# comments-plus/trunk/libs/factory/forms/includes/providers/value-provider.interface.php

Disable Comments &amp; Delete All Comments, version trunk. 62 lines.

- Page: https://pluginprobe.com/plugins/comments-plus/trunk/code/libs/factory/forms/includes/providers/value-provider.interface.php
- Raw: https://pluginprobe.com/plugins/comments-plus/trunk/raw/libs/factory/forms/includes/providers/value-provider.interface.php
- Modified: 2024-12-10T00:10:16+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/comments-plus/trunk/code/libs/factory/forms/includes/providers/value-provider.interface.php#L10-L20`.

```php
<?php
	/**
	 * The file contains an interface for all value provides.
	 *
	 * A value provider is a provide to get and save values to some stores (database, metadata and so on).
	 *
	 * @author Alex Kovalev <alex.kovalevv@gmail.com>
	 * @copyright (c) 2018, Webcraftic Ltd
	 *
	 * @package factory-forms
	 * @since 1.0.0
	 */
	// Exit if accessed directly
	if( !defined('ABSPATH') ) {
		exit;
	}
	if( !class_exists('Wbcr_IFactoryForms480_ValueProvider') ) {
		/**
		 * The interface for all value provides.
		 *
		 * @since 1.0.0
		 */
		interface Wbcr_IFactoryForms480_ValueProvider {

			/**
			 * Inits a form a provider to get data from a storage.
			 *
			 * @since 1.0.0
			 * @return void
			 */
			public function init();

			/**
			 * Commits all changes.
			 *
			 * @since 1.0.0
			 * @return void
			 */
			public function saveChanges();

			/**
			 * Gets a value by its name.
			 *
			 * @since 1.0.0
			 * @param string $name A value name to get.
			 * @param mixed|null $default A default to return if a given name doesn't exist.
			 * @param string $name A value name to get.
			 * @return mixed
			 */
			public function getValue($name, $default = null, $multiple = false);

			/**
			 * Sets a value by its name.
			 *
			 * @since 1.0.0
			 * @param string $name A value name to set.
			 * @param mixed $value A value to set.
			 * @return void
			 */
			public function setValue($name, $value);
		}
	}
```
