codemod 2010-2016 to 2010-present
[hiphop-php.git] / hphp / runtime / ext / url / ext_url.h
blob9b0b77ce796a3cc087b8b008353c044d5d908fe7
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 | Copyright (c) 1997-2010 The PHP Group |
7 +----------------------------------------------------------------------+
8 | This source file is subject to version 3.01 of the PHP license, |
9 | that is bundled with this package in the file LICENSE, and is |
10 | available through the world-wide-web at the following url: |
11 | http://www.php.net/license/3_01.txt |
12 | If you did not receive a copy of the PHP license and are unable to |
13 | obtain it through the world-wide-web, please send a note to |
14 | license@php.net so we can mail you a copy immediately. |
15 +----------------------------------------------------------------------+
18 #ifndef incl_HPHP_EXT_URL_H_
19 #define incl_HPHP_EXT_URL_H_
21 #include "hphp/runtime/ext/extension.h"
23 namespace HPHP {
24 ///////////////////////////////////////////////////////////////////////////////
26 extern const int64_t k_PHP_URL_SCHEME;
27 extern const int64_t k_PHP_URL_HOST;
28 extern const int64_t k_PHP_URL_PORT;
29 extern const int64_t k_PHP_URL_USER;
30 extern const int64_t k_PHP_URL_PASS;
31 extern const int64_t k_PHP_URL_PATH;
32 extern const int64_t k_PHP_URL_QUERY;
33 extern const int64_t k_PHP_URL_FRAGMENT;
34 extern const int64_t k_PHP_QUERY_RFC1738;
35 extern const int64_t k_PHP_QUERY_RFC3986;
37 Variant HHVM_FUNCTION(base64_decode, const String& data,
38 bool strict /* = false */);
39 Variant HHVM_FUNCTION(base64_encode, const String& data);
41 Variant HHVM_FUNCTION(get_headers, const String& url, int format /* = 0 */);
42 Array HHVM_FUNCTION(get_meta_tags, const String& filename,
43 bool use_include_path /* = false */);
45 Variant HHVM_FUNCTION(http_build_query, const Variant& formdata,
46 const Variant& numeric_prefix /* = null_string */,
47 const String& arg_separator /* = null_string */,
48 int enc_type = k_PHP_QUERY_RFC1738);
49 Variant HHVM_FUNCTION(parse_url, const String& url,
50 int64_t component /* = -1 */);
52 String HHVM_FUNCTION(rawurldecode, const String& str);
53 String HHVM_FUNCTION(rawurlencode, const String& str);
54 String HHVM_FUNCTION(urldecode, const String& str);
55 String HHVM_FUNCTION(urlencode, const String& str);
57 ///////////////////////////////////////////////////////////////////////////////
60 #endif // incl_HPHP_EXT_URL_H_