UnionOfRAD/lithium — Issue #348: `lithium\net\http\Response` uses inconsistent `$type` var
Author: rmarscher
Created: 2012-02-21 22:05:09+00:00
State: open

I found that `lithium\net\http\Response` uses a public `$type` instance var. All of the related classes - `lithium\net\http\Message` and `lithium\net\http\Request`, for example - use a protected `$_type` var.

I found myself accessing `$request->type` when I really wanted to get the `$_type` value via `$request->type()`. I think the public var should be removed to avoid confusion.

`Response::_init()` and `Response::toString()` are the methods that interact with `$type`. IMHO, they should be changed to use `type()` as defined in the parent `Message` class.

I would be pretty concerned about breaking things which is why I'm submitting this as an issue rather than working on a pull request. But I would be happy to do so if you want me to.

Thanks,
Rob