Closed FibonacciFox closed 1 year ago
Currently, this PHP-specific feature can only be defined in the PHP language.
As a workaround, in C#, you can define
class MyDynamicClass {
internal PhpArray __peach__runtimeFields;
}
so the class can have dynamic properties int PHP:
$x = new MyDynamicClass();
echo $x->prop; // looks into "__peach__runtimeFields" array
@jakubmisek ,Thanks, everything works fine. Closing the topic.
There is a wrapper class, it is written to interact with Avalonia Ui components.
Access to properties and fields using the wrapper is implemented via get and set!
But in order for the magic methods to work, I have to create an heir class.
Without a stub class, I can't get access to fields and properties.
Please tell me how to implement the above functionality without using a stub class. :(