You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm re-posting this here because it is the type of solution that I think can work for everyone and would work with existing code.
What I would like the ADR pattern to provide is a traversable set of callable types. During its traversal the ADR handler will determine what the next callable to use is and will return it so that the generator can either call it or create it and then call it. This would also allow callables to be skipped or jump to a different point in the queue depending on its state?
'controller' => newControllerAction([
function(array$args = []) {
returnnewModel(null, ['args' => $args]); //$args are the named args
},
function(Model$model) {
$model['__CONTROLLER__'] = __FUNCTION__; //demo check that is called..return$model;
},
function(Model$model, Response$response) {
$model[$model::TEMPLATE] = 'home';
return$model;
//or$response->setContent($response);
return$response;
},
]),
If one of the functions returns a Response the traversal is stopped
I'm re-posting this here because it is the type of solution that I think can work for everyone and would work with existing code.
What I would like the ADR pattern to provide is a traversable set of callable types. During its traversal the ADR handler will determine what the next callable to use is and will return it so that the generator can either call it or create it and then call it. This would also allow callables to be skipped or jump to a different point in the queue depending on its state?
If one of the functions returns a
Response
the traversal is stoppedReferences:
Matthias' CQRS/event sourcing
Traversable Event
The text was updated successfully, but these errors were encountered: