public function isDevelopment() { if (!isset($this->development)) { $this->development = FALSE; if ($this->hostConfig->get('development') !== NULL) { return $this->development = (bool) $this->hostConfig->get('development'); } $ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : FALSE; if ($ua === $this->hostConfig->get('uagent-key')) { return $this->development = TRUE; } if ($this->getConfiguration()->get('developer') === TRUE) { return $this->development = TRUE; } if (PSC::isTravis()) { return $this->development = TRUE; } } return $this->development; }
public function __construct(Configuration $configuration, $library = 'psc-cms') { $this->release = $configuration->get(array($library, 'version')) ?: '0.1-DEV'; }