Ver Mensaje Individual
  #4 (permalink)  
Antiguo 28/03/2011, 18:19
Avatar de masterpuppet
masterpuppet
Software Craftsman
 
Fecha de Ingreso: enero-2008
Ubicación: Montevideo, Uruguay
Mensajes: 3.550
Antigüedad: 16 años, 4 meses
Puntos: 845
Respuesta: Como Hago Para Usar El View En Distintos Métodos Del Bootstrap?

View es un resource, configuralo en el application.ini y luego en el Bootstrap:

Código PHP:
Ver original
  1. protected function _initFoo()
  2. {
  3.     $this->bootstrap('view');
  4.     $view = $this->getResource('view');
  5.     ...
  6. }

o sino accede a través del resource layout:

Código PHP:
Ver original
  1. protected function _initFoo()
  2. {
  3.     $this->bootstrap('layout');
  4.     $layout = $this->getResource('layout');
  5.     $view   = $layout->getView();
  6.     ...
  7. }

tambien podes acceder a través de ViewRenderer, elegi la que mas te guste :)

Saludos.
__________________
http://es.phptherightway.com/
thats us riders :)