Without a DI container, you would normally do something like this:
$foo = (new FooBuilder)
->setA('a')
->setB('b')
->build();
// where $foo becomes an instance of Foo class
How do you register/containerize something like that in Aura.Di?
Without a DI container, you would normally do something like this:
$foo = (new FooBuilder)
->setA('a')
->setB('b')
->build();
// where $foo becomes an instance of Foo class
How do you register/containerize something like that in Aura.Di?
Copyright © 2021 Jogjafile Inc.
Found it. For those who care, it's lazyGetCall()
E.g., If you have something like this:
You can containerize it like this:
You can then call it elsewhere like this:
$fooInstance = $di->get('Foo');