1 | <?php |
||
19 | abstract class DomainBase implements DomainInterface |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Equivalent to `__FILE__` for main plugin file. |
||
24 | * |
||
25 | * @var FilePath |
||
26 | */ |
||
27 | private $plugin_file; |
||
28 | |||
29 | /** |
||
30 | * String indicating version for plugin |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | private $version; |
||
35 | |||
36 | /** |
||
37 | * @var string $plugin_basename |
||
38 | */ |
||
39 | private $plugin_basename; |
||
40 | |||
41 | /** |
||
42 | * @var string $plugin_path |
||
43 | */ |
||
44 | private $plugin_path; |
||
45 | |||
46 | /** |
||
47 | * @var string $plugin_url |
||
48 | */ |
||
49 | private $plugin_url; |
||
50 | |||
51 | |||
52 | |||
53 | /** |
||
54 | * Initializes internal properties. |
||
55 | * |
||
56 | * @param FilePath $plugin_file |
||
57 | * @param Version $version |
||
58 | */ |
||
59 | public function __construct(FilePath $plugin_file, Version $version) |
||
67 | |||
68 | |||
69 | /** |
||
70 | * @return string |
||
71 | */ |
||
72 | public function pluginFile() |
||
76 | |||
77 | |||
78 | |||
79 | /** |
||
80 | * @return string |
||
81 | */ |
||
82 | public function pluginBasename() |
||
86 | |||
87 | |||
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | public function pluginPath() |
||
96 | |||
97 | |||
98 | |||
99 | /** |
||
100 | * @return string |
||
101 | */ |
||
102 | public function pluginUrl() |
||
106 | |||
107 | |||
108 | |||
109 | /** |
||
110 | * @return string |
||
111 | */ |
||
112 | public function version() |
||
116 | |||
117 | |||
118 | |||
119 | /** |
||
120 | * @return Version |
||
121 | */ |
||
122 | public function versionValueObject() |
||
126 | |||
127 | |||
128 | /** |
||
129 | * @return string |
||
130 | */ |
||
131 | public function distributionAssetsPath() |
||
135 | |||
136 | |||
137 | /** |
||
138 | * @return string |
||
139 | */ |
||
140 | public function distributionAssetsUrl() |
||
144 | } |
||
145 |