diff --git a/template/web/wp-content/themes/<%= slug %>/app/Repositories/Repository.php b/template/web/wp-content/themes/<%= slug %>/app/Repositories/Repository.php index 2cb59d8..92e78b0 100644 --- a/template/web/wp-content/themes/<%= slug %>/app/Repositories/Repository.php +++ b/template/web/wp-content/themes/<%= slug %>/app/Repositories/Repository.php @@ -1,28 +1,26 @@ result_set; @@ -39,28 +37,6 @@ public function first() { return isset( $local_array[0] ) ? $local_array[0] : null; } - /** - * Returns a slice of the collection starting at the given index. - * Similar to Laravel's slice(). - * - * @param int $start Start index. - * - * @return array - */ - public function slice( $start ) { - $local_array = $this->get(); - - if ( count( $local_array ) < 1 ) { - return array(); - } - - if ( is_object( $local_array ) && $local_array instanceof PostCollection ) { - $local_array = $local_array->getArrayCopy(); - } - - return array_slice( $local_array, (int) $start ); - } - /** * Runs a query. * @@ -97,6 +73,8 @@ protected function query( array $params ) { * * @param array $params Query params. * @return mixed + * + * @example ./app/Repositories/PostRepository.php How to implement do_query(). */ abstract protected function do_query( $params ); @@ -113,7 +91,7 @@ protected function reset() { /** * Returns current result set * - * @param array|PostCollection $result_set Result set. + * @param array $result_set Result set. * * @return Repository */