My bootstrap file:

error_reporting(E_ERROR|E_WARNING);
define('HREF_BASE','localhost');
date_default_timezone_set('America/New_York');

set_include_path('../phplib'.'.'. PATH_SEPARATOR . '../library/' .
PATH_SEPARATOR . './application/models/' . PATH_SEPARATOR .
get_include_path());


function bootstrap(){

                include "Zend.php";
                // STAGE 1. Prepare the front ( primary ) controller
                Zend::loadClass('Zend_Controller_Front');
                $frontController = Zend_Controller_Front::getInstance();
                
$frontController->setControllerDirectory('../application/controllers');
                
                //dispatch actions of the selected controllers  
                
                $frontController->returnResponse(true);
                
                //initialize views
                Zend::loadClass('Zend_View');
                $view = new Zend_View();
                $view->setScriptPath('../application/views');
                Zend::register('view',$view);   
                
                //STAGE 2. Load configuration options   
                Zend::loadClass('Zend_Config_Ini');     
                $config = new
Zend_Config_InI('../application/config/config.ini','general');
                Zend::register('config',$config);       
                
                //STAGE 3. Load POST / GET
                Zend::loadClass('Zend_Filter_Input');   
                Zend::register('post', new Zend_Filter_Input($_POST,false));
                Zend::register('get', new Zend_Filter_Input($_GET,false));
                
                //STAGE 4. Set up LOGGING
                require_once 'Zend/Log.php'; 
                require_once 'Zend/Log/Adapter/File.php';                       
// File log adapter
                Zend_Log::registerLogger(new 
Zend_Log_Adapter_File('../logs/errors.txt'));              
                
                //STAGE 3. Find the right action and execute it
                $response = $frontController->dispatch();       // dunning the 
configured MVC
program         
                

                
                //STAGE 7. Render the results in response to request.
                $response->renderExceptions(true);
                $response->sendResponse();              
}
bootstrap();


and here is my indexcontroller :

 public function indexAction() {


    $view = Zend::registry('view');
    $post=Zend::registry('post');
        
    $view->title='Find a personal trainer and a gym today!';
        $loginid=trim($post->noTags('loginid'));
        $view->pageid='home';
        $view->loginid=$loginid;

        $view->header='main_header.tpl.php';
        $view->footer='main_footer.tpl.php';
        $view->actiontemplate ='index.tpl.php';
        $view->htmlbase='http://www.zegee.net';
        

        $view->index_headline='index_headline.tpl.php';
        $view->index_news='index_news.tpl.php';
        $view->index_packages='index_packages.tpl.php';
        $view->index_analysis='index_analysis.tpl.php';
        $view->index_client_trainer_gym='index_client_trainer_gym.tpl.php';

        $this->_response->setBody($view->render('index_template.tpl.php'));
  }


The above works, but how do I convert it  to 0.9 ?

Thank you





Rob Marscher wrote:
> 
>> ZegeeDotCom schreef:
>>> I was so happy with the 0.7 and 0.8 versions but now I am seeing  
>>> that the more you do the less I will be able to learn!!!
> 
> Unless you really need something in the latest version, it's probably  
> better to stick with what you have working and wait until 1.0 to  
> update/rewrite your code.  I'm sure when 1.0 comes around there will  
> a lot more updated documentation (then again, it won't if none of us  
> help).  But it's hard to keep up with all of the documentation (or  
> decide to take the time to improve it) with the API changing and  
> subject to change.
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Clear-example-of-full-working-bootstrap-please-tf3427918s16154.html#a9559151
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to