I've got an object injected into the DI:
$di->setShared('myobject', function(){
return new \NS\Object('whatever');
});
Now I can access object methods/variables in volt no problem:
{{ myobject.doSomething('somevar') }}
// results in php code:
$this->myobject->doSomething('somevar');
However, if I want to pass that entire object to another function using volt, it doesn't work:
{{ anotherobject.doSomethingWithObject(myobject) }}
// results in php code -- note lack of $this
$this->anotherobject->doSomethingWithObject($myobject);
Is there another volt function I need to use to ensure the DI injected object is used? And not just a local $object instead?
Thanks.