2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-2013 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_CLOSURE_H_
19 #define incl_HPHP_EXT_CLOSURE_H_
21 // >>>>>> Generated by idl.php. Do NOT modify. <<<<<<
23 #include "hphp/runtime/base/base_includes.h"
24 #include "hphp/runtime/vm/func.h"
27 ///////////////////////////////////////////////////////////////////////////////
30 ///////////////////////////////////////////////////////////////////////////////
33 FORWARD_DECLARE_CLASS_BUILTIN(Closure
);
34 class c_Closure
: public ExtObjectData
{
36 DECLARE_CLASS(Closure
, Closure
, ObjectData
)
39 public: c_Closure(Class
* cls
= c_Closure::s_cls
);
41 public: void t___construct();
43 // implemented by HPHP
44 public: c_Closure
*create();
46 public: c_Closure
* clone();
48 c_Closure
* init(int numArgs
, ActRec
* ar
, TypedValue
* sp
);
49 ObjectData
* getThisOrClass() { return m_thisOrClass
; }
50 const Func
* getInvokeFunc() { return m_func
; }
51 HphpArray
* getStaticLocals();
52 TypedValue
* getUseVars() { return propVec(); }
53 int getNumUseVars() { return m_cls
->numDeclProperties(); }
55 static size_t funcOffset() { return offsetof(c_Closure
, m_func
); }
56 static size_t thisOffset() { return offsetof(c_Closure
, m_thisOrClass
); }
59 virtual bool php_sleep(Variant
&ret
);
61 SmartPtr
<HphpArray
> m_VMStatics
;
62 ObjectData
* m_thisOrClass
;
66 ///////////////////////////////////////////////////////////////////////////////
69 FORWARD_DECLARE_CLASS_BUILTIN(DummyClosure
);
70 class c_DummyClosure
: public ExtObjectData
{
72 DECLARE_CLASS(DummyClosure
, DummyClosure
, ObjectData
)
75 public: c_DummyClosure(Class
* cls
= c_DummyClosure::s_cls
);
76 public: ~c_DummyClosure();
77 public: void t___construct();
79 // implemented by HPHP
80 public: c_DummyClosure
*create();
84 ///////////////////////////////////////////////////////////////////////////////
87 #endif // incl_HPHP_EXT_CLOSURE_H_