/** * initialising * * @param string $name * @param string $method * @throws SPException */ private static function init($name, $method) { if (!is_string($method)) { throw new SPException('Wrong method given: ' . get_class($method)); } self::$method = strtoupper($method); $name = self::$method == 'COOKIE' ? 'SPro_' . $name : $name; self::$name = $name; switch (self::$method) { case 'GET': // it's seems that Joomla! is storing the decoded variables from menu // into $_REQUEST instead of $_GET self::$request =& $_REQUEST; // self::$request =& $_GET; break; case 'POST': self::$request =& $_POST; break; case 'FILES': self::$request =& $_FILES; break; case 'COOKIE': self::$request =& $_COOKIE; break; case 'ENV': self::$request =& $_ENV; break; case 'SERVER': self::$request =& $_SERVER; break; case 'REQUESTCACHE': self::$request =& SPFactory::registry()->__get('requestcache'); break; default: self::$request =& $_REQUEST; self::$method = 'REQUEST'; break; } }