/** * Do any necessary startup work after initialization. * * This method is not called directly after initialize(). * * @author David Zülke <*****@*****.**> * @since 0.11.0 */ public function startup() { parent::startup(); if ($this->getParameter('unset_input', true)) { $rla = ini_get('register_long_arrays'); $_GET = $_POST = $_COOKIE = $_REQUEST = $_FILES = array(); if ($rla) { // clean long arrays, too! $GLOBALS['HTTP_GET_VARS'] = $GLOBALS['HTTP_POST_VARS'] = $GLOBALS['HTTP_COOKIE_VARS'] = $GLOBALS['HTTP_POST_FILES'] = array(); } foreach ($_SERVER as $key => $value) { if (substr($key, 0, 5) == 'HTTP_' || $key == 'CONTENT_TYPE' || $key == 'CONTENT_LENGTH') { unset($_SERVER[$key]); unset($_ENV[$key]); if ($rla) { unset($GLOBALS['HTTP_SERVER_VARS'][$key]); unset($GLOBALS['HTTP_ENV_VARS'][$key]); } } } } }
/** * Do any necessary startup work after initialization. * * This method is not called directly after initialize(). * * @author David Zülke <*****@*****.**> * @since 1.0.0 */ public function startup() { parent::startup(); if ($this->getParameter('unset_input', true)) { $_SERVER['argv'] = $_ENV['argv'] = $GLOBALS['argv'] = array(); $_SERVER['argc'] = $_ENV['argc'] = $GLOBALS['argc'] = 0; } }