[fw-general] Returning JSON for 404 and for exception

2013-06-05 Thread pobrejuanito
Hey Guys, I am currently in the process of building an API with ZF2 2.1 and I've downloaded the Skeleton Application and built my module named /API/. I am trying to figure out the best way to return 404 JSON response and routes don't match and catch fatal errors and exceptions and respond with

[fw-general] Help using predicate and nesting conditions

2013-04-18 Thread pobrejuanito
Hey Guys, I can't figure out how I can add parenthesis to generate a statement like one below in ZF2: *EXAMPLE1:* SELECT persons.* FROM persons WHERE *(*givenName LIKE '%john%' OR surname LIKE '%john%' OR givenName LIKE '%doe%' OR surname LIKE '%doe%'*)* AND active = 1 ORDER BY surname ASC LIMIT

[fw-general] Re: Help using predicate and nesting conditions

2013-04-18 Thread pobrejuanito
I see, Thank you so much for that explanation on how to use nest. It's just what I needed. I'll study those examples you gave. Thanks again. -- View this message in context:

[fw-general] What is the best way to I get base url on ZF2 from any class?

2013-03-27 Thread pobrejuanito
Hi, I am trying to figure out how I can make available the base URL in a class in ZF2, but I am having no luck. Anyone know a good approach on how I can have BaseURL in other class than the controller in ZF2? -- View this message in context:

[fw-general] How to handle Hierarchical Association in URI with ZF2 AbstractRestfulController

2013-03-21 Thread pobrejuanito
Hi Everyone, I am currently using ZF2 /AbstractRestfulController/ to build an API. I understand /GET /recording/ is mapped to /getList()/ method and /GET /recording[/:id]/ is mapped get($id) method in the controller that extends /AbstractRestfulController/. What is a good way to configure the

[fw-general] 4 whitespaces appended on Response Body

2013-03-06 Thread pobrejuanito
Hi I have a strange problem. I am examining the response payload and I have 4 white spaces appended before my content: curl -i http://localhost/ARestFul HTTP/1.1 200 OK Date: Wed, 06 Mar 2013 17:37:22 GMT Server: Apache/2.2.22 (Unix) PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r

[fw-general] [SOLVED] Re: 4 whitespaces appended on Response Body

2013-03-06 Thread pobrejuanito
Your guess was right. There was 4 spaces after the closing tag ? in the controller. I removed the tag and the spaces and its not there anymore. Thank you! -- View this message in context: