File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -238,16 +238,23 @@ impl ClassBuilder {
238
238
"Class name in builder does not match class name in `impl RegisteredClass`."
239
239
) ;
240
240
self . object_override = Some ( create_object :: < T > ) ;
241
+
242
+ let mut func = if T :: FLAGS . contains ( ClassFlags :: Interface ) {
243
+ FunctionBuilder :: new_abstract ( "__construct" )
244
+ } else {
245
+ FunctionBuilder :: new ( "__construct" , constructor :: < T > )
246
+ } ;
247
+
241
248
self . method (
242
249
{
243
- let mut func = FunctionBuilder :: new ( "__construct" , constructor :: < T > ) ;
244
250
if let Some ( ConstructorMeta { build_fn, .. } ) = T :: constructor ( ) {
245
251
func = build_fn ( func) ;
246
252
}
247
253
func
248
254
} ,
249
255
MethodFlags :: Public ,
250
256
)
257
+
251
258
}
252
259
253
260
/// Function to register the class with PHP. This function is called after
You can’t perform that action at this time.
0 commit comments