Problemas ao instanciar o ZendX

31 views
Skip to first unread message

igorhaf

unread,
Apr 24, 2012, 4:52:59 PM4/24/12
to Zend Framework Developers
Acho que estou esquecendo algo, mas a algumas horas que venho tentando
instanciar o ZendX e nao consigo.

bootstrap.php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initLayout(){
Zend_Layout::startMvc(array(
'layoutPath' => APPLICATION_PATH . '/layouts/scripts',
'layout' => 'layout'
));
}
protected function _initViewHelpers()
{
$view = new Zend_View();
$view->addHelperPath("ZendX/JQuery/View/Helper",
"ZendX_JQuery_View_Helper");

$viewRenderer = new
Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);

Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
}

protected function _initAutoload() {
$autoloader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'My',
'basePath' => dirname(__FILE__),
'resourceTypes'=>array(
'form'=>array(
'path'=>'forms/',
'namespace'=>'Forms_'
)
)
));
return $autoloader;
}
}


layout,phtml

<?php echo $this->jQuery()->enable(); ?>
<?php echo $this->partial("head.phtml"); ?>
<?php echo $this->layout()->content; ?>
<?php echo $this->partial("footer.phtml"); ?>


erro

Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception'
with message 'Plugin by name 'JQuery' was not found in the registry;
used paths: My_View_Helper_: /media/OS/wamp/www/peregrinus2/
application/views/helpers/ Zend_View_Helper_: Zend/View/Helper/:/media/
OS/wamp/www/peregrinus2/application/views/helpers/' in /media/OS/wamp/
www/peregrinus2/library/Zend/Loader/PluginLoader.php:412 Stack trace:
#0 /media/OS/wamp/www/peregrinus2/library/Zend/View/
Abstract.php(1182): Zend_Loader_PluginLoader->load('JQuery') #1 /media/
OS/wamp/www/peregrinus2/library/Zend/View/Abstract.php(618):
Zend_View_Abstract->_getPlugin('helper', 'jQuery') #2 /media/OS/wamp/
www/peregrinus2/library/Zend/View/Abstract.php(344):
Zend_View_Abstract->getHelper('jQuery') #3 /media/OS/wamp/www/
peregrinus2/application/layouts/scripts/layout.phtml(9):
Zend_View_Abstract->__call('jQuery', Array) #4 /media/OS/wamp/www/
peregrinus2/application/layouts/scripts/layout.phtml(9): Zend_View-
>jQuery() #5 /media/OS/wamp/www/peregrinus2/library/Zend/View.php(108)
in /media/OS/wamp/www/peregrinus2/library/Zend/Controller/Plugin/
Broker.php on line 336

Dennis Dobslaf

unread,
Apr 24, 2012, 5:09:28 PM4/24/12
to zfdeve...@googlegroups.com
Did you register the namespace ZendX to the autoloading mechanism (in Bootstrap or application.ini)? 

btw: It would be very helpful, if you write your questions in english ;-)


--
You received this message because you are subscribed to the Google Groups "Zend Framework Developers" group.
To post to this group, send email to zfdeve...@googlegroups.com.
To unsubscribe from this group, send email to zfdevelopers...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/zfdevelopers?hl=en.


Igor Herson

unread,
Apr 24, 2012, 9:44:30 PM4/24/12
to zfdeve...@googlegroups.com
sorry, yes, I want to write zendx path on the autoload of the bootstrap  , I think did everything right, put the zendx folder in the library folder, I made the above settings, but nothing works

2012/4/24 Dennis Dobslaf <dennis....@googlemail.com>



--
Regards,
Igor Herson

http://igorherson.com.br/

Igor Herson

unread,
Apr 24, 2012, 11:09:41 PM4/24/12
to zfdeve...@googlegroups.com
problem solved

2012/4/24 Igor Herson <igo...@gmail.com>
Reply all
Reply to author
Forward
0 new messages