久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='OsiLG'><tr id='OsiLG'><dt id='OsiLG'><q id='OsiLG'><span id='OsiLG'><b id='OsiLG'><form id='OsiLG'><ins id='OsiLG'></ins><ul id='OsiLG'></ul><sub id='OsiLG'></sub></form><legend id='OsiLG'></legend><bdo id='OsiLG'><pre id='OsiLG'><center id='OsiLG'></center></pre></bdo></b><th id='OsiLG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='OsiLG'><tfoot id='OsiLG'></tfoot><dl id='OsiLG'><fieldset id='OsiLG'></fieldset></dl></div>
    <bdo id='OsiLG'></bdo><ul id='OsiLG'></ul>
    <legend id='OsiLG'><style id='OsiLG'><dir id='OsiLG'><q id='OsiLG'></q></dir></style></legend>

        <small id='OsiLG'></small><noframes id='OsiLG'>

        <tfoot id='OsiLG'></tfoot>
      1. 學(xué)說 2 和 Zend 分頁器

        doctrine 2 and zend paginator(學(xué)說 2 和 Zend 分頁器)
        <tfoot id='nHD9E'></tfoot>
        • <small id='nHD9E'></small><noframes id='nHD9E'>

            <tbody id='nHD9E'></tbody>

          • <bdo id='nHD9E'></bdo><ul id='nHD9E'></ul>

              <i id='nHD9E'><tr id='nHD9E'><dt id='nHD9E'><q id='nHD9E'><span id='nHD9E'><b id='nHD9E'><form id='nHD9E'><ins id='nHD9E'></ins><ul id='nHD9E'></ul><sub id='nHD9E'></sub></form><legend id='nHD9E'></legend><bdo id='nHD9E'><pre id='nHD9E'><center id='nHD9E'></center></pre></bdo></b><th id='nHD9E'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='nHD9E'><tfoot id='nHD9E'></tfoot><dl id='nHD9E'><fieldset id='nHD9E'></fieldset></dl></div>

                  <legend id='nHD9E'><style id='nHD9E'><dir id='nHD9E'><q id='nHD9E'></q></dir></style></legend>

                • 本文介紹了學(xué)說 2 和 Zend 分頁器的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我想在 zend_paginator 中使用學(xué)說

                  i want to use doctrine with zend_paginator

                  這里有一些示例查詢:

                  $allArticleObj =$this->_em->getRepository('文章');$qb = $this->_em->createQueryBuilder();

                  $allArticleObj = $this->_em->getRepository('Articles'); $qb = $this->_em->createQueryBuilder();

                      $qb->add('select', 'a')
                              ->add('from', 'Articles a')
                              ->setFirstResult(0)
                              ->setMaxResults(5);
                  

                  是否有任何示例代碼表明我們可以為 Dotct 2 查詢構(gòu)建器編寫 zend_paginator 適配器?

                  is there any example code to show we can write a zend_paginator adapter for doctrine 2 query builder?

                  推薦答案

                  結(jié)果當(dāng)然是你必須實(shí)現(xiàn)Zend_Paginator_Adapter_Interface,這實(shí)質(zhì)上意味著實(shí)現(xiàn)兩個方法:

                  The upshot, of course, is that you have to implement the Zend_Paginator_Adapter_Interface, which essentially means implementing the two methods:

                  count()

                  getItems($offset, $perPage)

                  您的適配器將接受 Doctrine 查詢作為構(gòu)造函數(shù)參數(shù).

                  Your adapter would accept the Doctrine query as a constructor argument.

                  原則上,getItems() 部分實(shí)際上很簡單.只需將 $offset$perPage 限制添加到查詢中 - 正如您在示例中所做的 - 并執(zhí)行查詢.

                  In principle, the getItems() part is actually straightforward. Simply, add the $offset and $perPage restrictions to the query - as you are doing in your sample - and execute the query.

                  在實(shí)踐中,count() 業(yè)務(wù)往往很棘手.我會遵循 Zend_Paginator_Adapter_DbSelect 的例子,用它們的 Doctrine 類似物替換 Zend_Db 操作.

                  In practice, it's the count() business that tends to be tricky. I'd follow the example of Zend_Paginator_Adapter_DbSelect, replacing the Zend_Db operations with their Doctrine analogues.

                  這篇關(guān)于學(xué)說 2 和 Zend 分頁器的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標(biāo)不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動程序)
                • <legend id='XvsWK'><style id='XvsWK'><dir id='XvsWK'><q id='XvsWK'></q></dir></style></legend>

                        • <small id='XvsWK'></small><noframes id='XvsWK'>

                            <tbody id='XvsWK'></tbody>
                            <bdo id='XvsWK'></bdo><ul id='XvsWK'></ul>

                          • <i id='XvsWK'><tr id='XvsWK'><dt id='XvsWK'><q id='XvsWK'><span id='XvsWK'><b id='XvsWK'><form id='XvsWK'><ins id='XvsWK'></ins><ul id='XvsWK'></ul><sub id='XvsWK'></sub></form><legend id='XvsWK'></legend><bdo id='XvsWK'><pre id='XvsWK'><center id='XvsWK'></center></pre></bdo></b><th id='XvsWK'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='XvsWK'><tfoot id='XvsWK'></tfoot><dl id='XvsWK'><fieldset id='XvsWK'></fieldset></dl></div>
                            <tfoot id='XvsWK'></tfoot>
                          • 主站蜘蛛池模板: 久久亚洲一区二区三区四区 | 国产精品无码久久久久 | 欧美日韩国产一区 | 天堂网中文| 欧美精品网站 | 国产福利资源 | 岛国午夜 | 亚洲色图综合 | 久久国产日韩 | 欧美成视频 | 国产日韩电影 | 欧美一级视频在线观看 | 精品国产乱码久久久 | 亚洲一区二区三区在线 | 中文av在线播放 | 久草视频在线播放 | 精品久久精品 | av男人的天堂av | 中文字幕专区 | 久久九七| 成人一区二 | 国产免费一级一级 | 精品国产一区探花在线观看 | 久久精品免费 | 激情在线视频网站 | 亚洲成人在线视频播放 | 中文字幕在线观看一区 | 欧美精品成人一区二区三区四区 | www.天天操.com | 99精品国产一区二区青青牛奶 | 国产精品亚洲片在线播放 | 久久国内 | 国产传媒在线观看 | 亚洲在线一区 | 激情综合五月 | www成人免费视频 | 日韩av啪啪网站大全免费观看 | 成人h视频在线 | 女女百合av大片一区二区三区九县 | 国产成人福利在线观看 | 精产嫩模国品一二三区 |