PluginProbe
Elementor Website Builder – more than just a page builder / 4.1.0
Elementor Website Builder – more than just a page builder v4.1.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / core / utils / api / parse-result.php

parse-result.php in Elementor Website Builder – more than just a page builder 4.1.0, at core/utils/api/parse-result.php

40 lines 612 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Core\Utils\Api;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit; // Exit if accessed directly.
7 }
8
9 class Parse_Result {
10 private Parse_Errors $errors;
11
12 private $value;
13
14 public static function make() {
15 return new static();
16 }
17
18 public function __construct() {
19 $this->errors = Parse_Errors::make();
20 }
21
22 public function wrap( $value ): self {
23 $this->value = $value;
24
25 return $this;
26 }
27
28 public function unwrap() {
29 return $this->value;
30 }
31
32 public function is_valid(): bool {
33 return $this->errors->is_empty();
34 }
35
36 public function errors(): Parse_Errors {
37 return $this->errors;
38 }
39 }
40