2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #ifndef incl_HPHP_SYSTEMLIB_H_
18 #define incl_HPHP_SYSTEMLIB_H_
20 #include "hphp/runtime/base/types.h"
23 ///////////////////////////////////////////////////////////////////////////////
33 #define SYSTEMLIB_CLASSES(x) \
36 x(BadMethodCallException) \
37 x(InvalidArgumentException) \
39 x(OutOfBoundsException) \
40 x(InvalidOperationException) \
46 x(DateTimeInterface) \
47 x(DateTimeImmutable) \
59 x(IteratorAggregate) \
62 x(LazyKVZipIterable) \
64 x(LazyKeyedIterableView) \
67 x(__PHP_Incomplete_Class) \
68 x(__PHP_Unserializable_Class) \
73 static bool s_anyNonPersistentBuiltins
;
74 static std::string s_source
;
75 static HPHP::Unit
* s_unit
;
76 static HPHP::Unit
* s_hhas_unit
;
77 static HPHP::Unit
* s_nativeFuncUnit
;
78 static HPHP::Unit
* s_nativeClassUnit
;
81 #define DECLARE_SYSTEMLIB_CLASS(cls) \
82 static HPHP::Class* s_ ## cls ## Class;
83 SYSTEMLIB_CLASSES(DECLARE_SYSTEMLIB_CLASS
)
84 #undef DECLARE_SYSTEMLIB_CLASS
86 static HPHP::Func
* s_nullFunc
;
88 static ObjectData
* AllocStdClassObject();
89 static ObjectData
* AllocPinitSentinel();
90 static ObjectData
* AllocExceptionObject(const Variant
& message
);
91 static ObjectData
* AllocBadMethodCallExceptionObject(const Variant
& message
);
92 static ObjectData
* AllocInvalidArgumentExceptionObject(const Variant
& message
);
93 static ObjectData
* AllocRuntimeExceptionObject(const Variant
& message
);
94 static ObjectData
* AllocOutOfBoundsExceptionObject(const Variant
& message
);
95 static ObjectData
* AllocInvalidOperationExceptionObject(const Variant
& message
);
96 static ObjectData
* AllocDOMDocumentObject(const String
& version
= null_string
,
97 const String
& encoding
= null_string
);
98 static ObjectData
* AllocDOMExceptionObject(const Variant
& message
,
100 static ObjectData
* AllocDirectoryObject();
101 static ObjectData
* AllocPDOExceptionObject();
102 static ObjectData
* AllocSoapFaultObject(const Variant
& code
,
103 const Variant
& message
,
104 const Variant
& actor
= null_variant
,
105 const Variant
& detail
= null_variant
,
106 const Variant
& name
= null_variant
,
107 const Variant
& header
= null_variant
);
108 static ObjectData
* AllocLazyKVZipIterableObject(const Variant
& mp
);
110 static ObjectData
* AllocLazyIterableViewObject(const Variant
& iterable
);
111 static ObjectData
* AllocLazyKeyedIterableViewObject(const Variant
& iterable
);
114 ///////////////////////////////////////////////////////////////////////////////