Cross posting, as this affects the MVC components.
-- Shahar Evron <
[hidden email]> wrote
(on Thursday, 26 October 2006, 10:20 AM +0200):
> We have been talking about sharing components between Zend_Http_Client
> and Zend_Http_Server, and creating a Zend_Http_Request class based on
> similar concepts of the Zend_Http_Response class.
>
> In the mean time, Matthew started writing another Zend_Http_Request for
> the MVC component.
>
> Since as far as I understand these are two different classes, I think we
> need to decide the correct naming for each one.
>
> In my opinion, since the MVC Zend_Http_Request is more about the request
> then the HTTP - I think it should be renamed Zend_Request_Http -
> especially as it inherits from Zend_Request_Interface.
The decisioning made regarding the requests was thus:
* Create a generic request interface (Zend_Request_Interface)
* Have request implementations be located with the
protocol/environment they support (Zend_Http_Request,
Zend_Cli_Request, Zend_Controller_Request_*)
Zend_Http_Request was chosen as a name for several reasons:
* It contains accessors for the various elements present in an HTTP
request as expected by PHP: _GET, _POST, and _COOKIE, as well as
_SESSION (which, while not strictly HTTP, in PHP typically only
makes sense in PHP).
* It contains accessors that deal with the request URI --
specifically, REQUEST_URI and PATH_INFO.
What it does *not* have is information on routing or any information
pertaining to the controller or action requested in a front controller
environment. It is for this reason that we (there were several of us
from the MVC team involved in its creation) originally named it
Zend_Http_Request; it has little to do with the controller and more to
do with the HTTP environment.
(In fact, Zend_Controller has it's own request interface, and
Zend_Controller_Request_Http extends that and proxies to
Zend_Http_Request to obtain the rest of its own environment.)
What I'm wondering is how the HTTP request class you need for the HTTP
client and server differs from the implementation we've done, and if
there's any overlap. If they serve very different purposes, I'd be happy
to rename or even incorporate our Zend_Http_Request into
Zend_Controller_Request_Http, but we'd need to do so in the next day or
so before the 0.2 code freeze.
--
Matthew Weier O'Phinney
PHP Developer |
[hidden email]
Zend - The PHP Company |
http://www.zend.com/