Hi,
Probably the only container that don't have a configuration option to
return shared / non shared instance will be Aura.Di I guess.
If you are not familiar with Aura.Di :
If you are calling get method, it will always give the same instance (
provided you set the service ) .
If you are calling newInstance method, it will always return new instances.
I was basically thinking of this Interface before.
interface ContainerInterface
{
public function get($id);
public function has($id);
public function make($id, $params = [], $setters = []); // may be
different name
}
But many of you think standardizing factory is a different PSR.
In that case why not have something like
interface ContainerInterface
{
public function get($id, $params = [], $setters = [], $shared = true);
public function has($id);
}
You may say this probably is a BC break for container or , but you could
get rid of this BC break via something like this .
https://3v4l.org/bB0Oj
The $params and $setters are for in case the container need to alter the
values passed on run time.
Thank you
*Hari K T*
You can ring me : +91 9388 75 8821
http://harikt.com , https://github.com/harikt ,
http://www.linkedin.com/in/harikt , http://www.xing.com/profile/Hari_KT
Skype : kthari85
Twitter : harikt
On Tue, Nov 8, 2016 at 7:02 PM, Matthieu Napoli <[email protected]> wrote:
> Hi Pedro,
>
> 1) These implementations are perfectly fine PSR-11 implementations, as
> it's phrased right now?
>
> Yes
>
> 2) These implementations are incompatible between themselves for pretty
> much every use case …
>
>
> Why? Having a concrete use case would help here I think.
>
> 3) The incompatibility between these two containers is not an
> application/configuration issue, but plain lack of interoperability between
> them?
>
>
> Is that a question? ;)
>
> Matthieu
>
> --
> You received this message because you are subscribed to the Google Groups
> "PHP Framework Interoperability Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/php-fig/1478611947.1809988.781078993.4D1D6D44%
> 40webmail.messagingengine.com
> <https://groups.google.com/d/msgid/php-fig/1478611947.1809988.781078993.4D1D6D44%40webmail.messagingengine.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups "PHP
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/CAESZFtKAd7Lu1ciO_5n6MXX7XPQZV_4xUZ6nVDzCvzOe_3sz%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.