Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12944169
Environment.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
632 B
Referenced Files
None
Subscribers
None
Environment.php
View Options
<?php
namespace
Waystone\Workspaces\Engines\Framework
;
use
Dotenv\Dotenv
;
/**
* Interact with the environment
*/
class
Environment
{
/**
* Path to
*/
const
string
ROOT_DIR
=
__DIR__
.
"/../../.."
;
const
array
ENV_DIR_CANDIDATES
=
[
# Framework installed from workspaces/
self
::
ROOT_DIR
,
# Monorepo installation
self
::
ROOT_DIR
.
"/.."
,
];
/**
* Reads and loads .env environment file into environment
*/
public
static
function
init
()
:
void
{
$dotenv
=
Dotenv
::
createImmutable
(
self
::
ENV_DIR_CANDIDATES
);
$dotenv
->
safeLoad
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Nov 18, 17:05 (18 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3163954
Default Alt Text
Environment.php (632 B)
Attached To
Mode
rOBSIDIAN Obsidian Workspaces
Attached
Detach File
Event Timeline
Log In to Comment