/** * Return the current request transport type. * * @return string */ public static function type() { $type = 'HTTP'; if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') { $type = 'AJAX'; } if (isset($_SERVER['HTTP_X_FLASH_VERSION'])) { $type = 'FLASH'; } if (preg_match('/^(Shockwave|Adobe) Flash/', KRequest::client()) == 1) { $type = 'FLASH'; } return $type; }