PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.9
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.9
1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 0.8.7 0.8.6 All 33 releases
desktop-mode / includes / framework / app / contracts / interface-env.php

interface-env.php in OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin 1.1.9, at includes/framework/app/contracts/interface-env.php

68 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * OpenStation App Framework — Env contract.
4 *
5 * Facts about the host the app is running in: configuration
6 * constants, where content lives, which platform this is. The one
7 * place a window learns anything about WordPress without naming it.
8 *
9 * @package OpenStation
10 */
11
12 namespace OpenStation\App\Contracts;
13
14 // Direct access, unless a standalone host is booting on bare PHP.
15 if ( ! defined( 'ABSPATH' ) ) {
16 defined( 'OPENSTATION_STANDALONE' ) || exit;
17 }
18
19 interface Env {
20
21 /**
22 * A host configuration constant (`WP_DEBUG`, `SAVEQUERIES`, …).
23 *
24 * @param string $name Constant name.
25 * @param mixed $fallback Returned when the constant is undefined.
26 * @return mixed
27 */
28 public function constant( $name, $fallback = null );
29
30 /**
31 * Absolute path of the writable content directory.
32 *
33 * @return string
34 */
35 public function content_dir();
36
37 /**
38 * The host platform, as `array( 'name' => 'WordPress', 'version' => '6.8' )`.
39 *
40 * @return array{name:string,version:string}
41 */
42 public function platform();
43
44 /**
45 * Deployment environment: `production`, `staging`, `development`, `local`.
46 *
47 * @return string
48 */
49 public function environment_type();
50
51 /**
52 * Whether this install is one site among many sharing the same
53 * files (a WordPress network). Apps raise their bar accordingly.
54 *
55 * @return bool
56 */
57 public function is_network();
58
59 /**
60 * Format a Unix timestamp in the host's timezone and locale.
61 *
62 * @param int $timestamp Unix seconds.
63 * @param string $format PHP date format.
64 * @return string
65 */
66 public function format_datetime( $timestamp, $format = 'Y-m-d H:i:s' );
67 }
68