2009年3月2日星期一

Re: [fw-mvc] Zend_Application based demo doesn't render anything

-- Cristian Bichis <contact@zftutorials.com> wrote
(on Monday, 02 March 2009, 10:49 PM +0200):
> I tested last couple of days Zend_Application, resources autoloading,
> aso. I tried to re-work the entire structure of app to be modular as
> much as possible.
>
> After i cleaned up all the bugs (mostly due to rewriting names of model)
> i found that nothing is rendered to browser. Before were of course errors
> :)

At this point, I'm going to ask you to stop testing Zend_Application
until we (a) get approval on the proposal, (b) finish the prototype,
including all unit testing, and (c) get some documentation and samples
out there.

I have things working, and working well, but to try and answer the
questions piecemeal on the lists isn't helping anyone; it's better at
this point to wait for it to be done. This should happen in the next 2-3
weeks.

Thanks for your valiant efforts attempting to test it thus far; I've
incorporated a number of items in feedback already. :)


> So i started to remove most of code to see why nothing is displayed. No,
> it's not an error, error displaying is enabled and no error into php
> errors log...
>
> Have no ideea what's left so code shuold work (aka: render views,
> layouts as supposed):
>
> //index.php
> if( getenv('APPLICATION_ENVIRONMENT') !== false)
> define('APPLICATION_ENVIRONMENT',
> getenv('APPLICATION_ENVIRONMENT'));
> else
> define('APPLICATION_ENVIRONMENT', 'production');
> define('PUBLIC_PATH', realpath(dirname(__FILE__)));
> define('BASE_PATH', realpath(dirname(dirname(__FILE__))));
> define('APPLICATION_PATH', BASE_PATH . '/application');
> define('MODULE_PATH', APPLICATION_PATH . '/modules');
> set_include_path(
> BASE_PATH . '/library/dasprid' . PATH_SEPARATOR
> .BASE_PATH . '/library/incubator' . PATH_SEPARATOR
> .BASE_PATH . '/library' . PATH_SEPARATOR
> . get_include_path()
> );
> require 'Zend/Application.php';
> $application = new Zend_Application(APPLICATION_ENVIRONMENT,
> APPLICATION_PATH . '/config/config.ini');
> $application->bootstrap();
> $application->run();
>
>
> //config.ini
> [development]
> bootstrap = APPLICATION_PATH "/Bootstrap.php"
> phpSettings.display_errors = true
> phpSettings.error_reporting = 8191
>
> [production : development]
> phpSettings.display_errors = false
> phpSettings.error_reporting = 771
>
> //bootstrap
>
> <?php
>
> require_once 'Zend/Application/Bootstrap/Base.php';
>
> class Bootstrap extends Zend_Application_Bootstrap_Base
> {
>
> public function _initFrontController()
> {
> $this->front = Zend_Controller_Front::getInstance();
> $this->front->throwExceptions(false);
> $this->front->returnResponse(true);
> $this->front->addModuleDirectory( MODULE_PATH );
> Zend_Layout::startMvc(
> array(
> 'layoutPath' => MODULE_PATH . '/default/layouts/scripts',
> 'layout' => 'layout'
> )
> );
> }
>
> public function run()
> {
> $this->front->dispatch();
> }
> }
>
> //controllers and views in place
>
> So i am not sure why nothing is rendered... I am missing something ?
>
> --
> Best regards,
> Cristian Bichis
> www.zftutorials.com | www.zfforums.com | www.zftalk.com | www.zflinks.com
>

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: