Tobias Schlitt wrote: > Hi! > > On 06/24/2008 01:59 PM James Pic wrote: > > We want protocol specific variables in the protocol specific view-handler. > > That means, that the request parser should take some variables and put it > > somewhere for the view-manager later. > > > OPtions we could think of: > > - add protocol specific variables in the input object, > > - make two input objects, a raw input object and a protocol abstract input > > object > > I'd go for the first version. In case more information must be > transported, one can extend the input object. Other possibility::
<?php // 0) This request object has protocol specific stuff $request = $requestParser->createRequest(); // 1) Make the abstract input object $input = $request::createInput(); // 2) Get the controller // Note that the router has the input abstract object $controller = $router->createController( $input ); // 3) Run the controller // Again, with the abstract input object $output = $controller->run( $input ); // 4) Handle the view // The view-handler is protocol specific, thus has the complete request object $viewManager = new yourViewManager( $request ); $viewManager->handle(); ?> -- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
