Skip to content

Method::from($from) loads method body as well#4

Closed
uestla wants to merge 1 commit into
nette:masterfrom
uestla:method-body
Closed

Method::from($from) loads method body as well#4
uestla wants to merge 1 commit into
nette:masterfrom
uestla:method-body

Conversation

@uestla

@uestla uestla commented Jul 4, 2014

Copy link
Copy Markdown
Contributor

No description provided.

@dg

dg commented Jul 4, 2014

Copy link
Copy Markdown
Member

Can you add a test please?

(Test it with some class from minified Nette and PDO)

@mishak87

mishak87 commented Jul 4, 2014

Copy link
Copy Markdown

❤️ Awesome! But I guess it won't pass for B::b of this source.

<?php class A{function a(){return 'Aa';}}class B{function a(){return'Ba';} function b() {return'Bb';}function c(){return'Bc';}}class C{function a() {return'Ca';}}

Basically you would need to parse php code with context buffer to make it bullet proof and use begin and end for optimization.

@uestla

uestla commented Jul 4, 2014

Copy link
Copy Markdown
Contributor Author

@mishak87 Right ... Not to mention multiple namespaces and all that on one line...
Closing.

@uestla uestla closed this Jul 4, 2014
@mishak87

mishak87 commented Jul 4, 2014

Copy link
Copy Markdown

I didn't mean to discourage you from doing it. Such feature would be really useful ie. it could simplify significantly generation of certain proxies. Probably it would be better to lazy load it for performance reasons but it is possible to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants