You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to use lazy loading ghost objects in different contexts, we may need to allow partial initialization as well.
One way to do that is to generate different proxy classes for different sets of properties being requested to be skipped from following lazy-loading semantics.
A possible API implementation may look like following:
// no properties skipped$proxy = $factory->createProxy('Foo', function () { /* ... */ });
// skip privateProperty, protectedProperty and publicProperty$proxy = $factory->createProxy(
'Foo',
function () { /* ... */ },
['skippedProperties' => ["\0Foo\0privateProperty", "\0*\0protectedProperty", "publicProperty"]]
);
In order to avoid class inheritance collisions, values of 'skippedProperties' are PHP's internal logical property names (used for array serialization).
In order to use lazy loading ghost objects in different contexts, we may need to allow partial initialization as well.
One way to do that is to generate different proxy classes for different sets of properties being requested to be skipped from following lazy-loading semantics.
A possible API implementation may look like following:
A possible usage may be like following:
In order to avoid class inheritance collisions, values of
'skippedProperties'
are PHP's internal logical property names (used for array serialization).Ping @malukenho want to give this a shot?
The text was updated successfully, but these errors were encountered: