PHPackages                             ocs/spklib - 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. ocs/spklib

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

ocs/spklib
==========

Library for DSS system

v2.0.2(1y ago)053[1 PRs](https://github.com/kristt26/spklib/pulls)MITPHP

Since May 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/kristt26/spklib)[ Packagist](https://packagist.org/packages/ocs/spklib)[ RSS](/packages/ocs-spklib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)DependenciesVersions (10)Used By (0)

wplib
=====

[](#wplib)

Installation
------------

[](#installation)

Anda dapat melakukan instalasi melalui Composer di

Requirements
------------

[](#requirements)

1. PHP 5.4 or greater
2. CodeIgniter 3.0+

Documentation
-------------

[](#documentation)

1. WP Method

```
require "vendor/autoload.php";

use ocs\wplib\Wplibs as wp;
$kriteria = [
    [
        'nama' => 'Kecepatan',
        'kode' => 'C1',
        'bobot' => 4,
        'type' => 'Benefits'
    ],
    [
        'nama' => 'Tahun Aktif',
        'kode' => 'C2',
        'bobot' => 3,
        'type' => 'Benefits'
    ],
    [
        'nama' => 'Tanggal Bayar',
        'kode' => 'C3',
        'bobot' => 2,
        'type' => 'Benefits'
    ]
];
$alternatif = [
    [
        "nama" => "Nama1",
        "nilai" => [
            [
                "kode" => "C1",
                "bobot" => 5
            ],
            [
                "kode" => "C2",
                "bobot" => 3
            ],
            [
                "kode" => "C3",
                "bobot" => 1
            ]
        ]
    ],
    [
        "nama" => "Nama2",
        "nilai" => [
            [
                "kode" => "C1",
                "bobot" => 4
            ],
            [
                "kode" => "C2",
                "bobot" => 2
            ],
            [
                "kode" => "C3",
                "bobot" => 2
            ]
        ]
    ],
    [
        "nama" => "Nama3",
        "nilai" => [
            [
                "kode" => "C1",
                "bobot" => 3
            ],
            [
                "kode" => "C2",
                "bobot" => 3
            ],
            [
                "kode" => "C3",
                "bobot" => 4
            ]
        ]
    ]
];

$a = new wp($kriteria, $alternatif, 0);
echo json_encode($a->ranking);
```

---

1. Profile Matching Method

```
require "vendor/autoload.php";

use ocs\spklib\ProfileMatching as PM;

$kriteria = [
    [
        'nama' => 'Kriteria 1',
        'code' => 'C1',
        'profileKriteria' => 5,
        'bobot' => 0.4,
        'sub' => [
            [
                'nama' => 'Sub 11',
                'code' => 'C11',
                'bobot' => 0.7
            ],
            [
                'nama' => 'Sub 12',
                'code' => 'C12',
                'bobot' => 0.3
            ]
        ]
    ],
    [
        'nama' => 'Kriteria 2',
        'code' => 'C2',
        'profileKriteria' => 4,
        'bobot' => 0.3,
        'sub' => [
            [
                'nama' => 'Sub 21',
                'code' => 'C21',
                'bobot' => 0.5
            ],
            [
                'nama' => 'Sub 22',
                'code' => 'C22',
                'bobot' => 0.4
            ],
            [
                'nama' => 'Sub 23',
                'code' => 'C23',
                'bobot' => 0.1
            ],
        ]
    ],
    [
        'nama' => 'Kriteria 3',
        'code' => 'C3',
        'profileKriteria' => 4,
        'bobot' => 0.3,
        'sub' => [
            [
                'nama' => 'Sub 31',
                'code' => 'C31',
                'bobot' => 0.25
            ],
            [
                'nama' => 'Sub 32',
                'code' => 'C32',
                'bobot' => 0.25
            ],
            [
                'nama' => 'Sub 33',
                'code' => 'C33',
                'bobot' => 0.25
            ],
            [
                'nama' => 'Sub 34',
                'code' => 'C34',
                'bobot' => 0.25
            ],
        ]
    ],
];
$alternatif = [
    [
        "nama" => "Nama1",
        "nilai" => [
            [
                "code" => "C1",
                "sub" => [
                    [
                        'code'=>'C11',
                        'nilai'=> 5
                    ],
                    [
                        'code'=>'C12',
                        'nilai'=> 4
                    ],
                ]
            ],
            [
                "code" => "C2",
                "sub" => [
                    [
                        'code'=>'C21',
                        'nilai'=> 5
                    ],
                    [
                        'code'=>'C22',
                        'nilai'=> 5
                    ],
                    [
                        'code'=>'C23',
                        'nilai'=> 4
                    ],
                ]
            ],
            [
                "code" => "C3",
                "sub" => [
                    [
                        'code'=>'C31',
                        'nilai'=> 5
                    ],
                    [
                        'code'=>'C32',
                        'nilai'=> 5
                    ],
                    [
                        'code'=>'C33',
                        'nilai'=> 4
                    ],
                    [
                        'code'=>'C34',
                        'nilai'=> 4
                    ],
                ]
            ]
        ]
    ],
    [
        "nama" => "Nama2",
        "nilai" => [
            [
                "code" => "C1",
                "sub" => [
                    [
                        'code'=>'C11',
                        'nilai'=> 4
                    ],
                    [
                        'code'=>'C12',
                        'nilai'=> 4
                    ],
                ]
            ],
            [
                "code" => "C2",
                "sub" => [
                    [
                        'code'=>'C21',
                        'nilai'=> 4
                    ],
                    [
                        'code'=>'C22',
                        'nilai'=> 4
                    ],
                    [
                        'code'=>'C23',
                        'nilai'=> 4
                    ],
                ]
            ],
            [
                "code" => "C3",
                "sub" => [
                    [
                        'code'=>'C31',
                        'nilai'=> 4
                    ],
                    [
                        'code'=>'C32',
                        'nilai'=> 4
                    ],
                    [
                        'code'=>'C33',
                        'nilai'=> 4
                    ],
                    [
                        'code'=>'C34',
                        'nilai'=> 4
                    ],
                ]
            ]
        ]
    ],
    [
        "nama" => "Nama3",
        "nilai" => [
            [
                "code" => "C1",
                "sub" => [
                    [
                        'code'=>'C11',
                        'nilai'=> 5
                    ],
                    [
                        'code'=>'C12',
                        'nilai'=> 4
                    ],
                ]
            ],
            [
                "code" => "C2",
                "sub" => [
                    [
                        'code'=>'C21',
                        'nilai'=> 4
                    ],
                    [
                        'code'=>'C22',
                        'nilai'=> 5
                    ],
                    [
                        'code'=>'C23',
                        'nilai'=> 5
                    ],
                ]
            ],
            [
                "code" => "C3",
                "sub" => [
                    [
                        'code'=>'C31',
                        'nilai'=> 4
                    ],
                    [
                        'code'=>'C32',
                        'nilai'=> 5
                    ],
                    [
                        'code'=>'C33',
                        'nilai'=> 5
                    ],
                    [
                        'code'=>'C34',
                        'nilai'=> 4
                    ],
                ]
            ]
        ]
    ]
];

$a = new PM($kriteria, $alternatif, 0, true);
echo json_encode($a->rank);
```

---

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance48

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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 ~43 days

Recently: every ~82 days

Total

9

Last Release

383d ago

Major Versions

v1.2.3 → v2.0.12025-04-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b92bb370b34d3c57debdd50d0aedf6fee696f0db7c41552455778c26d761118?d=identicon)[kristt26](/maintainers/kristt26)

---

Top Contributors

[![kristt26](https://avatars.githubusercontent.com/u/28567198?v=4)](https://github.com/kristt26 "kristt26 (37 commits)")

### Embed Badge

![Health badge](/badges/ocs-spklib/health.svg)

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

PHPackages © 2026

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