Custom Doctrine 2 Adapter for Zend\Paginator
PHP CSS
Latest commit cdc9a62 Jun 4, 2014 Rodrigo dos Santos Update Instructions
Permalink
Failed to load latest commit information.
config First commit Jun 2, 2014
data/cache First commit Jun 2, 2014
module/Application First commit Jun 2, 2014
public First commit Jun 2, 2014
.gitignore First commit Jun 2, 2014
LICENSE.txt First commit Jun 2, 2014
README.md Update Instructions Jun 4, 2014
composer.json First commit Jun 2, 2014
composer.phar First commit Jun 2, 2014
init_autoloader.php First commit Jun 2, 2014

README.md

Zend Framework 2 Paginator + Doctrine 2

This project is an example on how to use ZF2 Paginator and Doctrine 2 together.

Installation

  • Clone this project by typing https://github.com/rosantoz/zf2-paginator-doctrine on your terminal;
  • Enter the project directory: cd zf2-paginator-doctrine
  • Update composer (optional): php composer.phar self-update
  • Run composer: php composer.phar install
  • Create a local.php file on config/autoload folder and insert your database credentials
<?php
return array(
    'doctrine' => array(
        'connection' => array(
            'orm_default' => array(
                'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
                'params'      => array(
                    'host'     => 'localhost',
                    'port'     => '3306',
                    'user'     => 'root',
                    'password' => '1234',
                    'dbname'   => 'zf2_doc_paginator',
                    'encoding' => 'utf8',
                )
            )
        )
    )
);
  • Use doctrine command line tool to create the database table php public/index.php orm:schema-tool:create
  • Use doctrine command line tool to create data fixtures php public/index.php data-fixture:import

Read more

For a more detailed explanation go to http://blog.dossantos.com.au/using-zf2-paginator-plus-doctrine-2