di icon indicating copy to clipboard operation
di copied to clipboard

Change syntax for get services by tag to `#tag-name`

Open vjik opened this issue 3 years ago • 6 comments
trafficstars

Replace $container->get('tag@car'); to $container->get('#car');.

It will be more shortly and familiar.

vjik avatar Nov 05 '22 06:11 vjik

The original form was made for extending purposes. For example, the package may support any other custom things and simpler to use new short word with @ instead of thinking about another char because @ already means tags.

xepozz avatar Nov 05 '22 11:11 xepozz

The original form was made for extending purposes. For example, the package may support any other custom things and simpler to use new short word with @ instead of thinking about another char because @ already means tags.

Dou you mean #?

rustamwin avatar Nov 05 '22 17:11 rustamwin

I mean tag@ is ok to be able to add some new shortcuts like decorator@ or something else. This form allows you just add new word instead of add more and more characters.

xepozz avatar Nov 05 '22 17:11 xepozz

Hm. How can work $container->get('decorator@XXX');? Has ideas anything keywords for use in get() ?

vjik avatar Nov 06 '22 05:11 vjik

We can probably support both.

samdark avatar Nov 06 '22 07:11 samdark

Hm. How can work $container->get('decorator@XXX');?

It doesn't matter how it can work. That's a showcase.

Has ideas anything keywords for use in get() ?

Sorry, I don't understand you.

xepozz avatar Nov 06 '22 11:11 xepozz