SitePoint Sponsor |
|
User Tag List
Results 101 to 106 of 106
-
Oct 16, 2006, 15:00 #101
- Join Date
- Jun 2004
- Location
- Copenhagen, Denmark
- Posts
- 6,157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by dan7
PHP Code:<?php
// file : json.tpl.php
return Array (
Array (
'href'=>'/1',
'title'=>'1',
'value'=>'1',
),
);
?>Originally Posted by dan7
Originally Posted by dan7
-
Oct 16, 2006, 15:16 #102
- Join Date
- Aug 2006
- Location
- Poland
- Posts
- 108
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for the answers. Yeah, I thought about those links in the model.
I think I didn't understand you about json and concatenation. You can concatenate json encoded strings, but they need to be sent as a one object. So I was talking about this issue (1 object/request) and thought you wanted to send more ('glued as html'). But that's a whole different story, not important in this topic.
Thanks a lot for help!
-
Oct 24, 2006, 07:53 #103
- Join Date
- Aug 2006
- Location
- Poland
- Posts
- 108
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
PHP Code:protected function render($template) {
ob_start();
include($template);
return ob_get_clean();
}
Originally Posted by kyberfabrikken
Thanks
-
Oct 24, 2006, 08:12 #104
- Join Date
- Jun 2004
- Location
- Copenhagen, Denmark
- Posts
- 6,157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Actually I believe it would. But I still think it would be better to stick with one response type (string).
-
Oct 24, 2006, 09:35 #105
- Join Date
- Aug 2006
- Location
- Poland
- Posts
- 108
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by kyberfabrikken
If I consider string as a response from each child controller, than I would have to concatenate those strings into 1 object and as they are already encoded, I would have to attach additional parent object, that would hold this concatenated string. That's because json data should be sent as 1 object. So, that's why I wanted to encode data once at the end and avoid any further manipulation of data. I will have to think about it a bit more.
-
Oct 25, 2006, 04:11 #106
- Join Date
- Aug 2006
- Location
- Poland
- Posts
- 108
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by kyberfabrikken
How do you handle grabbing the content from the childcontrollers after you threw the exception? You write, that you pass the content to k_http_Response, but if you throw this exception from childcontroller, how do you know anything about the rest of the content from already executed childcontrollers?
Bookmarks