Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy-loading of ghost objects only via properties access (no method overrides) #192

Merged
merged 153 commits into from
Dec 15, 2014

Conversation

Ocramius
Copy link
Owner

Basically a PoC implementation of #159.

Works with minimal code changes, but fatals have to be handled correctly.

@Ocramius Ocramius self-assigned this Nov 8, 2014
@Ocramius Ocramius added this to the 2.0.0 milestone Nov 8, 2014
@Ocramius
Copy link
Owner Author

Suggestion to clean up initialization: http://3v4l.org/JsRZ7

@lisachenko
Copy link

I should take a look into your solution ) I like such a non-standard feature. Probably it can help me to solve very old issue goaop/framework#54

@Ocramius
Copy link
Owner Author

@lisachenko it has the advantage of simplifying scope resolution by a lot, leaving it up to codegen and reducing runtime overhead to a minimum.

@lisachenko
Copy link

@Ocramius yeah, runtime performance should be good, will try this POC later after SymfonyCon )

@staabm
Copy link
Contributor

staabm commented Nov 24, 2014

regarding http://3v4l.org/JsRZ7

either unset($this->baz); is not required at all or it has a typo and should be unset($this->bar); ?

@Ocramius
Copy link
Owner Author

@staabm yes, there is a typo

…nd avoid overriding any other existing method
…appen in the static constructor, for consistency
…enerator\Constructor`, as it is unused in a lazy loading ghost
…f the object, therefore doesn't trigger lazy-loading
@Ocramius
Copy link
Owner Author

This one is ready for review. Also throw in nitpicking if there is anything to nitpick on.

$publicProperties,
$protectedProperties,
$privateProperties
),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all this Magic* with the same parameters, looks like duplication xD

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point. I'll consider converting it to a GhostObjectContext or such

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferred to #207

@Ocramius
Copy link
Owner Author

Documentation deferred to #208

Ocramius added a commit that referenced this pull request Dec 15, 2014
POC of lazy-loading of ghost objects implemented only via properties existence
@Ocramius Ocramius merged commit da837fa into master Dec 15, 2014
@Ocramius Ocramius deleted the poc/lazy-properties-ghost-object branch December 15, 2014 17:04
@Ocramius Ocramius changed the title POC of lazy-loading of ghost objects implemented only via properties existence Lazy-loading of ghost objects implemented only via properties existence Dec 15, 2014
@Ocramius Ocramius changed the title Lazy-loading of ghost objects implemented only via properties existence Lazy-loading of ghost objects only via properties existence Dec 15, 2014
@Ocramius Ocramius changed the title Lazy-loading of ghost objects only via properties existence Lazy-loading of ghost objects only via properties access (no method overrides) Dec 15, 2014
malukenho pushed a commit to malukenho/ProxyManager that referenced this pull request Jan 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants