<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # 擴展查詢規則 [TOC] ## 定義 擴展查詢規則是為 repository 模式中添加擴展查詢選項,比如設置查詢的記錄條數等。 在 system/repository/rule/user 目錄中定義查詢規則類文件如下: ``` namespace system\repository\rule\user; use houdunwang\model\repository\Repository; use houdunwang\model\repository\Rule; class UserLimitRule extends Rule { protected $limit; public function __construct($limit = 10) { $this->limit = $limit; } public function apply($model, Repository $repository) { return $model->limit($this->limit); } } ``` ## 默認方法 #### 重新使用規則 ``` public function resetRule(); ``` #### 不執行任何規則 ``` public function skipRule($status = true); ``` #### 獲取所有規則 ``` public function getRule(); ``` #### 獲取指定的規則 ``` public function getByRule(Rule $Rule); ``` #### 添加規則 ``` public function pushRule(Rule $Rule); ``` #### 使用集合中的所有規則 ``` public function applyRule(); ``` ## 控制器中使用 ``` $userRepository->pushRule(new UserLimitRule())->all(); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看