[pLog-general] get request from view?

Oscar Renalias oscar at renalias.net
Sun Mar 6 10:24:29 GMT 2005


added in rev r1330 :)

Oscar

On 6 Mar 2005, at 02:38, Su Baochen wrote:

> hi,
>
> Request object is usually used to get url parameters, and I noticed 
> that
> I Action.class.php, there is a _request member variable to help to get
> url parameters.
>
> But sometimes we need to get url parmeters from view, not from action.
> At this time, we can use the second parameter(an array) of view class 
> to
> transfer the needed parameters from action object to view object. For
> example:
>
> $view = new TestView("templateName",Array("param1"=>"value"));
>
> But how about get url parameters from view directly? how about also add
> memeber value _request to base view class?
>
> class View{
>   ...
>   var $_request;
>   function View(){
>     ...
>     $this->_request = new Request(HttpVars::getRequest());
>   }
> }
>
> Best regards,
>
> Su Baochen
>
>
> _______________________________________________
> pLog-general mailing list
> pLog-general at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-general
>




More information about the pLog-general mailing list