Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/elementor/data/base/sub-endpoint.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
namespace Elementor\Data\Base;
3
+
4
+
/**
5
+
* TODO: Add test.
6
+
*/
7
+
abstract class SubEndpoint extends Endpoint {
8
+
9
+
/**
10
+
* @var Endpoint
11
+
*/
12
+
protected $parent_endpoint;
13
+
14
+
/**
15
+
* @var string
16
+
*/
17
+
protected $parent_route = '';
18
+
19
+
public function __construct( $parent_route, $parent_endpoint ) {
20
+
$this->parent_endpoint = $parent_endpoint;
21
+
$this->parent_route = $parent_route;
22
+
23
+
parent::__construct( $this->parent_endpoint->controller );
24
+
}
25
+
26
+
/**
27
+
* Get parent route.
28
+
*
29
+
* @return \Elementor\Data\Base\Endpoint
30
+
*/
31
+
public function get_parent() {
32
+
return $this->parent_endpoint;
33
+
}
34
+
35
+
public function get_base_route() {
36
+
$controller_name = $this->controller->get_name();
37
+
38
+
return $controller_name . '/' . $this->parent_route . $this->get_name();
39
+
}
40
+
}
41
+