PluginProbe
Disable Comments & Delete All Comments / 1.3.0
Disable Comments & Delete All Comments v1.3.0
1.3.3 1.3.2 trunk 1.0.0 1.0.4 1.0.5 1.0.8 1.0.9 1.1.1 1.1.3 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.3.0 1.3.1
comments-plus / libs / factory / forms / includes / providers / value-provider.interface.php

value-provider.interface.php in Disable Comments & Delete All Comments 1.3.0, at libs/factory/forms/includes/providers/value-provider.interface.php

62 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The file contains an interface for all value provides.
4 *
5 * A value provider is a provide to get and save values to some stores (database, metadata and so on).
6 *
7 * @author Alex Kovalev <alex.kovalevv@gmail.com>
8 * @copyright (c) 2018, Webcraftic Ltd
9 *
10 * @package factory-forms
11 * @since 1.0.0
12 */
13 // Exit if accessed directly
14 if( !defined('ABSPATH') ) {
15 exit;
16 }
17 if( !class_exists('Wbcr_IFactoryForms480_ValueProvider') ) {
18 /**
19 * The interface for all value provides.
20 *
21 * @since 1.0.0
22 */
23 interface Wbcr_IFactoryForms480_ValueProvider {
24
25 /**
26 * Inits a form a provider to get data from a storage.
27 *
28 * @since 1.0.0
29 * @return void
30 */
31 public function init();
32
33 /**
34 * Commits all changes.
35 *
36 * @since 1.0.0
37 * @return void
38 */
39 public function saveChanges();
40
41 /**
42 * Gets a value by its name.
43 *
44 * @since 1.0.0
45 * @param string $name A value name to get.
46 * @param mixed|null $default A default to return if a given name doesn't exist.
47 * @param string $name A value name to get.
48 * @return mixed
49 */
50 public function getValue($name, $default = null, $multiple = false);
51
52 /**
53 * Sets a value by its name.
54 *
55 * @since 1.0.0
56 * @param string $name A value name to set.
57 * @param mixed $value A value to set.
58 * @return void
59 */
60 public function setValue($name, $value);
61 }
62 }