function apache_is_rewrite_engine_on_helper_($rewrite_engine) { return is_equal_('on', strtolower($rewrite_engine)); }
function prepare_external_response_($response) { assert(array_key_exists('content-type', $response['headers'])); $content_type_exists = array_key_exists('content-type', $response['headers']); $is_php_value = is_equal_($response['headers']['content-type'], 'application/x-php-value'); if ($is_php_value or !$content_type_exists) { if (is_string($response['body']) or is_null($response['body'])) { $response['headers']['content-type'] = 'text/plain'; } else { $response['body'] = serialize($response['body']); $response['headers']['content-type'] = 'application/x-serialized-php'; } } return $response; }
function inertia_default_response_($path, $relative_uri) { if (is_equal_('/', $path)) { return response_(STATUS_OK, array('content-type' => 'text/html'), inertia_test_page_()); } else { return response_(STATUS_NOT_FOUND, array('content-type' => 'text/html'), inertia_404_not_found_($relative_uri)); } }
function resolve_alias_($handler, $aliases) { foreach ($aliases as $alias) { if (is_equal_($handler, $alias['name'])) { return $alias['handler']; } } return $handler; }
function sub_path_($path, $start, $length = NULL) { $slash = is_equal_(substr($path, 0, 1), '/') ? '/' : ''; return ($sub_segments = sub_segments_($path, $start, $length)) ? $slash . implode("/", $sub_segments) : false; }
function uri_path_($index_dot_php_path) { $base_path = dirname($index_dot_php_path); $base_path_equals_directory_separator = (is_equal_(strlen($base_path), 1) and is_equal_(DIRECTORY_SEPARATOR, $base_path)); return $base_path_equals_directory_separator ? '' : str_sanitize_($base_path); }