I have just "finished" coding up a relatively involved web service in PHP. The code base is now a bit of a mess due to last minute requests, changes, add-ons, the usual.

I tried to code it as lightly as possible and in a manner that would maximise performance.

Therefore, I didn't use any frameworks like Zend or any ORMs like Doctrine.

I was wondering if there are any frameworks or design patterns that exist for the sole purpose of building APIs/web services in PHP?

I'm thinking of a refactor and I want to make sure now I know exactly what's involved I can build this thing properly.