PHPackages                             redgoose/paginate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. redgoose/paginate

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

redgoose/paginate
=================

paginate navigation class

1.0.4(4y ago)171MITPHPPHP &gt;=7.2.0

Since Dec 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/redgoose-dev/php-paginate)[ Packagist](https://packagist.org/packages/redgoose/paginate)[ Docs](https://github.com/redgoose-dev/paginate)[ RSS](/packages/redgoose-paginate/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (6)Used By (0)

paginate
========

[](#paginate)

`[1][2][3]...` 형식으로 된 페이지 네비게이션을 만들어주는 도구입니다.
한번 실행으로 쉽게 페이지네이션 엘리먼트를 만들거나 객체를 만들어서 사용할 수 있습니다.

Install
-------

[](#install)

다음과 같이 `composer`를 통하여 패키지를 설치합니다.

```
composer require redgoose/paginate
```

`composer`를 사용하지 않는다면 `github`에서 소스를 다운로드 후에 `/src/Paginate.php`로 사용합니다.

Usage
-----

[](#usage)

### with composer

[](#with-composer)

```
require 'vendor/autoload.php';
use redgoose\Paginate;

$paginate = new Paginate();
```

### without composer

[](#without-composer)

소스를 다운로드하고 직접 연결할때 사용하는 방법입니다.

```
require 'src/Paginate.php';
use redgoose\Paginate;

$paginate = new Paginate();
```

### create instance

[](#create-instance)

`new` 키워드를 통하여 인스턴스 객체를 만들어서 사용할 수 있습니다.

```
$paginate = new Paginate($pref);
```

Options
-------

[](#options)

```
$paginate = new Paginate((object)[
  'total' => 300,
  'page' => 1,
  'size' => 10,
  'scale' => 10,
  'params' => [],
]);
```

인스턴스 객체를 만들때 사용하는 옵션들입니다.
객체를 만드는 예제소스와 같이 `object` 타입의 객체값은 다음과 같습니다.

NameTypeDefaultDescriptiontotalint0데이터의 총 갯수pageint1현재 페이지의 번호sizeint10한페이지에서 출력되는 데이터 갯수scaleint10총 페이지 갯수paramsarraynull파라메터로 만들어지는 주소 뒤에붙는 `&foo=bar`형식으로 된 urlMethods
-------

[](#methods)

`create instance` 섹션에서 만든 `$paginate` 객체를 통하여 메서드를 사용할 수 있습니다.

### update()

[](#update)

인스턴스 객체를 만들때의 설정값을 변경할 수 있습니다.

```
$paginate->update($pref);
```

`$pref`값은 `Options`섹션과 같은 값을 사용합니다.

### createElements()

[](#createelements)

네비게이션 엘리먼트를 만들어줍니다.

```
$element = $paginate->createElements($classNames, $path);

echo $element;
```

NameTypeDefaultDescription$classNamesarray\[\]엘리먼트 클래스 이름. 배열의 첫번째 값은 대표 이름으로 사용됩니다.$pathstringnull링크 prefix### createObject()

[](#createobject)

네비게이션 객체를 만들어줍니다.

```
$object = $paginate->createObject($path);

print_r($object);
```

NameTypeDefaultDescription$pathstringnull링크 prefix객체를 만들면 다음과 같은 모습으로 객체를 리턴합니다.

```
stdClass Object (
  [prev] =>
  [body] => Array (
    [0] => stdClass Object (
      [name] => 1
      [no] => 1
      [url] => ./
    )
    [1] => stdClass Object (
      [name] => 2
      [no] => 2
      [url] => ./?page=2
    )
  )
  [next] => stdClass Object (
    [name] => next
    [no] => 11
    [url] => ./?page=11
  )
)

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~176 days

Total

5

Last Release

1638d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b056f5d7e80cecd7149229171e7540930f972703098e313681b6b64ae6177206?d=identicon)[redgoose](/maintainers/redgoose)

---

Top Contributors

[![redgoose-dev](https://avatars.githubusercontent.com/u/1978100?v=4)](https://github.com/redgoose-dev "redgoose-dev (18 commits)")

---

Tags

navigationpaginatephpnavigationpaginate

### Embed Badge

![Health badge](/badges/redgoose-paginate/health.svg)

```
[![Health](https://phpackages.com/badges/redgoose-paginate/health.svg)](https://phpackages.com/packages/redgoose-paginate)
```

###  Alternatives

[spatie/menu

Html menu generator

7592.9M6](/packages/spatie-menu)[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[kartik-v/yii2-widget-sidenav

An enhanced side navigation menu styled for bootstrap (sub repo split from yii2-widgets)

364.0M8](/packages/kartik-v-yii2-widget-sidenav)[nwidart/laravel-menus

Laravel Menu management

168180.3k10](/packages/nwidart-laravel-menus)[kartik-v/yii2-widget-affix

A scrollspy and affixed enhanced navigation to highlight page sections (sub repo split from yii2-widgets)

153.8M3](/packages/kartik-v-yii2-widget-affix)[akaunting/laravel-menu

Menu and sidebar management package for Laravel

38233.8k](/packages/akaunting-laravel-menu)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
