Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-01-2008, 02:10 PM
Junior Member
 
Join Date: Apr 2008
Posts: 2
Default setEncoding in the bootstrap

Hello,

I'm using MVC, Zend_Layout and I want to call the Zend_View::setEncoding method in the bootstrap. What's the best way to do it ?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-22-2008, 12:59 PM
Junior Member
 
Join Date: Mar 2008
Posts: 6
Default

Quote:
Originally Posted by inside View Post
Hello,

I'm using MVC, Zend_Layout and I want to call the Zend_View::setEncoding method in the bootstrap. What's the best way to do it ?

Thanks
Create BaseController. In method init() write your code ($this->view->set...). All created controllers should be extended from this BaseController.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-27-2008, 01:17 AM
Junior Member
 
Join Date: Oct 2007
Posts: 21
Default

If you're using ViewRenderer like I am, you can probably do the following:
PHP Code:
<?php

// bootstrap

//view setup
$view = new Zend_View();

//set encoding
$view->setEncoding('utf8');

$viewRenderer Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');

$viewRenderer->setView($view);;

?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:16 AM.