TYPO3 CMS  TYPO3_6-2
EnvironmentService.php
Go to the documentation of this file.
1 <?php
3 
20 
26  public function isEnvironmentInFrontendMode() {
27  return (defined('TYPO3_MODE') && TYPO3_MODE === 'FE') ?: FALSE;
28  }
29 
35  public function isEnvironmentInBackendMode() {
36  return (defined('TYPO3_MODE') && TYPO3_MODE === 'BE') ?: FALSE;
37  }
38 
44  public function isEnvironmentInCliMode() {
45  return $this->isEnvironmentInBackendMode() && defined('TYPO3_cliMode') && TYPO3_cliMode === TRUE;
46  }
47 
51  public function getServerRequestMethod() {
52  return isset($_SERVER['REQUEST_METHOD']) && is_string($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
53  }
54 }
const TYPO3_MODE
Definition: init.php:40