You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Tomáš Procházka (Jira)" <ji...@apache.org> on 2020/07/11 05:55:00 UTC
[jira] [Commented] (NETBEANS-4506) Nette DI container type
inference
[ https://issues.apache.org/jira/browse/NETBEANS-4506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17155893#comment-17155893 ]
Tomáš Procházka commented on NETBEANS-4506:
-------------------------------------------
[~junichi11] [~tmysik] I'd like to implement this feature.
Can you give me hint, where to look, please.
From what I found it seems, that this feature must go somewhere to [VariousUtils|https://github.com/apache/netbeans/blob/master/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/VariousUtils.java] in PHP Editor, right?
> Nette DI container type inference
> ---------------------------------
>
> Key: NETBEANS-4506
> URL: https://issues.apache.org/jira/browse/NETBEANS-4506
> Project: NetBeans
> Issue Type: New Feature
> Components: php - Nette
> Affects Versions: 12.0
> Reporter: Tomáš Procházka
> Assignee: Tomáš Procházka
> Priority: Major
>
> It would be helpful for usage of Nette DI container (https://github.com/nette/di) to suppport type inference for {{\Nette\DI\Container::getByType()}} and {{\Nette\DI\Container::createInstance()}} methods.
> These methods return object with same instance as their first parameter.
> Following example demonstrates expected behavior.
> For both variables {{$builder}} and {{$builder2}} can NetBeans "know" from first parameter that their type is {{MyBuilder}} and offer method {{build()}}. Currently methods from {{\Nette\DI\Container}} are offered.
> {code:php}
> <?php
> class MyBuilder {
> public function build() { }
> }
>
> $container = new \Nette\DI\Container();
> $builder = $container->getByType( MyBuilder::class );
> $builder-> // Method build() is offered.
> $builder2 = $container->createInstance( MyBuilder::class );
> $builder2-> // Method build() is offered.
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists