san/san-album-pagination-with-ajax

使用 ViewJsonStrategy 的 Ajax 示例的 ZF2 模块。

dev-master 2014-02-11 16:59 UTC

This package is auto-updated.

Last update: 2024-09-05 18:31:10 UTC


README

~ 将 SQL 转储导入您的数据库

--
-- Table structure for table `album`
--

DROP TABLE IF EXISTS `album`;
CREATE TABLE IF NOT EXISTS `album` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `artist` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `album`
--

INSERT INTO `album` (`id`, `artist`, `title`) VALUES
(1, 'Bruno Mars', 'Gotex'),
(2, 'Syahrini', 'Membahana'),
(3, 'Justin Timberlake', 'Love');

~ 通过 composer 命令引用它

composer require san/san-album-pagination-with-ajax

~ 在 config/application.config.php 中注册它

return array(
    'modules' => array(
        'AssetManager',
        'Application',
        'SanAlbumPaginationWithAjax'
        ),
    'module_listener_options' => array(
        'module_paths' => array(
            './module',
            './vendor',
            ),
        'config_glob_paths' => array('config/autoload/{,*.}{global,local}.php')
        )
    );

它将自动安装 ZF2 AssetManager 模块,无需手动安装,也不需要将 js 文件移动到 public 文件夹。

访问

http://yourzf2app/albumajax