소스 검색

added text filter in getAll

tags/0.1.0
Robin Thoni 10 년 전
부모
커밋
0688568fb4
2개의 변경된 파일13개의 추가작업 그리고 4개의 파일을 삭제
  1. 2
    2
      src/Utils/LuBusiness.php
  2. 11
    2
      src/Utils/LuDataAccess.php

+ 2
- 2
src/Utils/LuBusiness.php 파일 보기

134
         return null;
134
         return null;
135
     }
135
     }
136
 
136
 
137
-    public static function getAll($page = 0, $perPage = PHP_INT_MAX)
137
+    public static function getAll($page = 0, $perPage = PHP_INT_MAX, $query = "")
138
     {
138
     {
139
-        return static::getDataAccess()->getAll($page, $perPage);
139
+        return static::getDataAccess()->getAll($page, $perPage, $query);
140
     }
140
     }
141
 
141
 
142
     public static function getResourceName()
142
     public static function getResourceName()

+ 11
- 2
src/Utils/LuDataAccess.php 파일 보기

122
         return array();
122
         return array();
123
     }
123
     }
124
 
124
 
125
-    public static function getAll($page = 0, $perPage = PHP_INT_MAX)
125
+    /**
126
+     * @param $query
127
+     * @return array
128
+     */
129
+    protected static function getQueryPredicate($query)
130
+    {
131
+        return array();
132
+    }
133
+
134
+    public static function getAll($page = 0, $perPage = PHP_INT_MAX, $query = "")
126
     {
135
     {
127
-        return self::getMultiple(array(), static::getOrderBy(), $page, $perPage);
136
+        return self::getMultiple(static::getQueryPredicate($query), static::getOrderBy(), $page, $perPage);
128
     }
137
     }
129
 }
138
 }

Loading…
취소
저장