+ Reply to Thread
Results 1 to 3 of 3

Thread: setEncoding in the bootstrap

  1. #1
    inside is offline 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

  2. #2
    demi is offline Junior Member
    Join Date
    Mar 2008
    Posts
    7

    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.

  3. #3
    Davidoff is offline Junior Member
    Join Date
    Oct 2007
    Posts
    28

    Default

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

    // bootstrap

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

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

    $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelp er('viewRenderer');

    $viewRenderer->setView($view);;

    ?>
    [/PHP]

+ Reply to Thread

Similar Threads

  1. bootstrap zend_cache
    By wlp1979 in forum Core Infrastructure
    Replies: 3
    Last Post: 11-11-2009, 10:14 PM
  2. Redirect in the Bootstrap.php?
    By stconrad in forum Authentication & Authorization
    Replies: 1
    Last Post: 09-16-2009, 09:15 AM
  3. Getting module name in bootstrap
    By Juul in forum General Q&A on Zend Framework
    Replies: 0
    Last Post: 09-15-2008, 04:40 PM
  4. How do I set the Doctype in the Bootstrap?
    By notrub225 in forum General Q&A on Zend Framework
    Replies: 4
    Last Post: 04-29-2008, 04:55 PM
  5. Bootstrap in IIS
    By spectravp in forum Model-View-Controller (MVC)
    Replies: 0
    Last Post: 03-15-2008, 04:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts