2009年2月28日星期六

[fw-mvc] Where to initialize Zend_Translate

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmpRJ0ACgkQsxtAFVfnNCQh+QCglDss65Znr+ICOM2zLyrwN1hM
6RcAnRj9DNQj8w6IPVL5wEAiC7m0WhFA
=+UwX
-----END PGP SIGNATURE-----
Hi,

I want to ask you, where should I initialize Zend_Translate, on manual
pages isn't any recommendation

I have craete one Init plugin like this:
[code]
<?php
class InitPlugin extends Zend_Controller_Plugin_Abstract
{
public function routeStartup(Zend_Controller_Request_Abstract $request)
{
while (true) {
;
};
}

public function routeShutdown(Zend_Controller_Request_Abstract $request)
{}

public function dispatchLoopStartup(Zend_Controller_Request_Abstract
$request)
{
Zend_Controller_Action_HelperBroker::addHelper(new
Flox_Controller_Action_Helper_Init());
}

public function preDispatch(Zend_Controller_Request_Abstract $request)
{
}

public function postDispatch(Zend_Controller_Request_Abstract $request)
{
}

public function dispatchLoopShutdown()
{}
}
[/code]

Is the event dispatchLoopStartup the right place where should I init
Zend_Translate ?


Thank you for any suggestions and advices

--
-------------------------------------------------------------------
--== Silver Zachara ==--
- pgp - http://radeonvmod.ic.cz/keys/silver.zachara@gmail.com.asc -

没有评论: