Hello Martynas,
i had the same idea some months ago to implement that in PHP. All you
need is described in the JAX-RS Spec
http://jax-rs-spec.java.net/.
But IMHO it is a stupid idea to implement that in PHP, because you have
to do heavy reflection on the class and method docblock. You have to
cache that and invalidate the cache properly on changing resources. Also
you have no support for method arguments annotations (for @PathParam or
@FormParam etc.). so first we would need native anotation support in PHP
to implement JAX-RS in PHP. My conclusion: Shit on fucking PHP and use
Java for that purpose!
Regards
Sven