<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected function _initAutoload()
    {
        $moduleLoader = new Zend_application_Module_Autoloader(
            array(
            'namespace' => 'Todojsc',
            'basePath' => APPLICATION_PATH.'/modules/Todojsc',
            'resourceTypes' => array
            (
                'form' => array
                (
                    'path' => 'forms',
                    'namespace' => 'Form',
                ),
                'resource' => array
                (
                    'path' => 'resources',
                    'namespace' => 'Resource',
                ),
                'model' => array
                (
                    'path' => 'models',
                    'namespace' => 'Model',
                ),
                'acl' => array
                (
                    'path' => 'acl',
                    'namespace' => 'Acl',
                )
            )
            )
        );
        return $moduleLoader;
    }

    protected function _initViewHelpers()
    {
        $this->bootstrap('layout');
        $layout = $this->getResource('layout');
        $view = $layout->getView();
        $view->doctype('XHTML1_STRICT');
        $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
        $view->headTitle()->setSeparator(' - ');
        $view->headTitle(' Todojsc');
    }

    protected function _initLogging()
    {
        $this->bootstrap('frontcontroller');
        $logger = new Zend_Log();
        $writer = new Zend_Log_Writer_Firebug();
        $logger->addWriter($writer);
        $this->_logger = $logger;
        Zend_Registry::set('log', $logger);
    }
}

