Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/02/2012, 12:24
Avatar de andresdzphp
andresdzphp
Colaborador
 
Fecha de Ingreso: julio-2011
Ubicación: $this->Colombia;
Mensajes: 2.749
Antigüedad: 12 años, 9 meses
Puntos: 793
Respuesta: Paginator Zend Framework 2.0 beta

Pues he probado con todas las rutas y no da que rico que estuviera listo.

Esta es mi configuración, que faltaría en el di?

Código PHP:
Ver original
  1. <?php
  2.  
  3. return array (
  4.  
  5.     'home' => array(
  6.         'type' => 'Zend\Mvc\Router\Http\Literal',
  7.         'options' => array(
  8.             'route' => '/',
  9.             'defaults' => array(
  10.                 'controller' => 'album',
  11.                 'action' => 'index',
  12.             ),
  13.          ),
  14.       ),
  15.  
  16.     'di' => array (
  17.         'instance' => array (
  18.             'alias' => array (
  19.                 'album' => 'Album\Controller\AlbumController',
  20.             ),
  21.        
  22.             'Album\Controller\AlbumController' => array (
  23.                 'parameters' => array (
  24.                    'albumTable' => 'Album\Model\AlbumTable'      
  25.                 )
  26.             ),
  27.            'Album\Model\AlbumTable' => array (
  28.                'parameters' => array (
  29.                     'config' => 'Zend\Db\Adapter\PdoMysql'
  30.                
  31.                )),
  32.        
  33.         'Zend\Db\Adapter\PdoMysql' => array (
  34.             'parameters' => array (
  35.                 'config' => array (
  36.                     'host' => 'localhost',
  37.                     'username' => 'root',
  38.                     'password' => '12345',
  39.                     'dbname' => 'test'
  40.                 )
  41.             )
  42.         ),
  43.        
  44.             'Zend\View\PhpRenderer' => array (
  45.                 'parameters' => array (
  46.                      'options' => array (
  47.                          'script_paths' => array (
  48.                              'album' => __DIR__ . '/../views'
  49.                          )
  50.                      )  
  51.                 )
  52.             )
  53.         )    
  54.     )
  55.  
  56. );
__________________
Si sabemos como leer e interpretar el manual será mucho más fácil aprender PHP. En lugar de confiar en ejemplos o copiar y pegar - PHP