PHPackages                             get-stackable/stackable-php - 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. get-stackable/stackable-php

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

get-stackable/stackable-php
===========================

Official Stackable library for PHP

071PHP

Since Mar 21Pushed 10y ago1 watchersCompare

[ Source](https://github.com/get-stackable/stackable-php)[ Packagist](https://packagist.org/packages/get-stackable/stackable-php)[ RSS](/packages/get-stackable-stackable-php/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Stackable PHP Library
=====================

[](#stackable-php-library)

This is the Official Stackable API PHP library for getting data from stacks.

Getting started
---------------

[](#getting-started)

Install using Composer

```
$ composer install get-stackable/stackable-php
```

Or simple include `src/Stackable.php` file to your project.

Usage
-----

[](#usage)

Make sure to create an account at  and setup your Stack and Containers.

To initialize

```
$stackable = new Stackable('YOUR-STACK-PUBLIC-KEY-HERE');
```

To list all containers

```
$result = $stackable->getContainers();
print_r($result);
```

To get single containers

```
$result = $stackable->getContainer('CONTAINER-ID-HERE');
print_r($result);
```

To get all items within single container

```
$result = $stackable->getContainerItems('CONTAINER-ID-HERE');
print_r($result);
```

To get all items within stack

```
$result = $stackable->getAllItems();
print_r($result);
```

To get single item

```
$result = $stackable->getItem('ITEM-ID-HERE');
print_r($result);
```

To create new item

- First initialize, using PRIVATE KEY, (MAKE SURE YOU KEEP THIS KEY SAFE! MOSTLY ON SERVER SIDE)

```
$stackable = new Stackable('YOUR-STACK-PRIVATE-KEY-HERE');
```

```
var dataToPost = [
    name => 'John Doe',
    age => 29
];

$result = $stackable->createItem('CONTAINER-ID-HERE', dataToPost);
print_r($result);
```

To update an item

```
var dataToPost = [
    name => 'John Doe',
    age => 29
];

$result = $stackable->updateItem('ITEM-ID-HERE', dataToPost);
print_r($result);
```

To play with this library:

Todo
----

[](#todo)

- Write tests.
- Test create and update item methods

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2250456bf5832a1002fa223554aac2cd179f4a5f9ed5b661035238eaddc41be2?d=identicon)[perminder-klair](/maintainers/perminder-klair)

---

Top Contributors

[![perminder-klair](https://avatars.githubusercontent.com/u/3984412?v=4)](https://github.com/perminder-klair "perminder-klair (5 commits)")

### Embed Badge

![Health badge](/badges/get-stackable-stackable-php/health.svg)

```
[![Health](https://phpackages.com/badges/get-stackable-stackable-php/health.svg)](https://phpackages.com/packages/get-stackable-stackable-php)
```

PHPackages © 2026

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