Recess Developer Forums: Chainablility - Recess Developer Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chainablility

#1 User is offline   Thomaz Icon

  • Group: Members
  • Posts: 39
  • Joined: 28-August 09
  • LocationHeemskerk, The Netherlands

Posted 08 March 2010 - 09:06 AM

I was tinkering around with a response to be send to a browser, and was doing something like this:

return $this->ok(..)->addHeader(..)->addHeader(..);


.. and then the script died.

After adding return $this; to every method of Response, this works right now. But is this a feature that will be supported by Recess or not? Will every method (that doesn't return anything) support chaining (or how its called)?
Hoppa
0

#2 User is offline   christiaan Icon

  • Group: Members
  • Posts: 35
  • Joined: 06-September 09
  • LocationNijkerk, Netherlands

Posted 13 March 2010 - 10:31 AM

Sounds like a good idea to me. Maybe not for every method but I can see the benefit in this usecase at least. (yes its called chaining)

If you want it in Recess you could fork the Git repository and create this feature and ask Kris to pull your changes.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users