PluginProbe
Depicter — Popup & Slider Builder / 1.3.3
Depicter — Popup & Slider Builder v1.3.3
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
depicter / vendor / htmlburger / wpemerge / src / Helpers / HasAttributesInterface.php

HasAttributesInterface.php in Depicter — Popup & Slider Builder 1.3.3, at vendor/htmlburger/wpemerge/src/Helpers/HasAttributesInterface.php

67 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package WPEmerge
4 * @author Atanas Angelov <hi@atanas.dev>
5 * @copyright 2017-2019 Atanas Angelov
6 * @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0
7 * @link https://wpemerge.com/
8 */
9
10 namespace WPEmerge\Helpers;
11
12 /**
13 * Represent an object which has an array of attributes.
14 */
15 interface HasAttributesInterface {
16 /**
17 * Get attribute.
18 *
19 * @param string $attribute
20 * @param mixed $default
21 * @return mixed
22 */
23 public function getAttribute( $attribute, $default = '' );
24
25 /**
26 * Get all attributes.
27 *
28 * @return array<string, mixed>
29 */
30 public function getAttributes();
31
32 /**
33 * Set attribute.
34 *
35 * @param string $attribute
36 * @param mixed $value
37 * @return void
38 */
39 public function setAttribute( $attribute, $value );
40
41 /**
42 * Fluent alias for setAttribute().
43 *
44 * @param string $attribute
45 * @param mixed $value
46 * @return static $this
47 */
48 public function attribute( $attribute, $value );
49
50 /**
51 * Set attributes.
52 * No attempt to merge attributes is done - this is a direct overwrite operation.
53 *
54 * @param array<string, mixed> $attributes
55 * @return void
56 */
57 public function setAttributes( $attributes );
58
59 /**
60 * Fluent alias for setAttributes().
61 *
62 * @param array<string, mixed> $attributes
63 * @return static $this
64 */
65 public function attributes( $attributes );
66 }
67