mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-07 18:14:35 +00:00
41 lines
608 B
PHP
41 lines
608 B
PHP
<?php
|
|
|
|
namespace Alchemy\Phrasea\Application;
|
|
|
|
use Alchemy\Phrasea\Application;
|
|
|
|
class Environment
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $name;
|
|
|
|
/**
|
|
* @var bool
|
|
*/
|
|
private $debug = false;
|
|
|
|
public function __construct($name, $debug)
|
|
{
|
|
$this->name = (string) $name;
|
|
$this->debug = ((bool) $debug) || $name === Application::ENV_DEV;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function isDebug()
|
|
{
|
|
return $this->debug;
|
|
}
|
|
}
|