PHPackages                             topsitemakers/superglue - 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. topsitemakers/superglue

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

topsitemakers/superglue
=======================

05[1 issues](https://github.com/topsitemakers/superglue/issues)PHP

Since Nov 10Pushed 12y ago1 watchersCompare

[ Source](https://github.com/topsitemakers/superglue)[ Packagist](https://packagist.org/packages/topsitemakers/superglue)[ RSS](/packages/topsitemakers-superglue/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Superglue
=========

[](#superglue)

### Legacy PHP "microframework" for quick prototyping

[](#legacy-php-microframework-for-quick-prototyping)

This is basically a modified version of the existing Glue class for mapping URLs to classes. Its purpose is mainly for quick and dead-simple prototyping, with as little overhead as possible.
It does not use any of the PHP 5.3+ features, and should work everywhere with PHP 5.x+ installed.

Differences between this and the original class are:

- Matching classes and methods instead of direct functions. This allows better app organization.
- Using regex tokens for arguments (e.g. , , &lt;alpha|case-insensitive&gt;, , &lt;alphanumeric|case-insensitive&gt;).
- Removed protocol functions (`GET()` and `POST()`).

Shipped with a very simple `.htaccess` for readable URLs.

### Usage:

[](#usage)

You first need to define URLs that will be accessible:

```
require 'superglue.php';

// Define URLs
$urls = array(

  // This will be binded to class "sample" and method "index"
  '/' => 'sample',
  // This will be binded to class "sample" and method "page"
  '/sample' => array('sample', 'page'),

  // RESTful example
  // If we do not pass an array here, superglue will check if the class has
  // method named as the request method (GET, POST, DELETE, PUSH)
  '/restful' => 'restful',

);

```

Define classes that will be called on appropriate routes:

```
// Our sample class
// Classes are better than direct functions for code organization and for
// avoiding name clashes.
class sample {
  function index() {
    print 'home page';
  }
  function page() {
    print 'sample page';
  }
}

// Example RESTful class
// Each method corresponds with the request method.
class restful {
  function GET() {
    print 'GET method.';
  }
  function POST() {
    print 'POST method.';
  }
  function PUSH() {
    print 'PUSH method.';
  }
  function DELETE() {
    print 'DELETE method.';
  }
}

```

That's it - start the app!

```
superglue::stick($urls);

```

### Credits

[](#credits)

[Glue](http://github.com/jtopjian/gluephp)

---

By: [topsitemakers.com](http://www.topsitemakers.com).

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

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/f9b3aba8ec42fa0899a954096dbe2bbf6bdaad331a7de9fb8da6fde36096d3c1?d=identicon)[topsitemakers](/maintainers/topsitemakers)

---

Top Contributors

[![topsitemakers](https://avatars.githubusercontent.com/u/2714932?v=4)](https://github.com/topsitemakers "topsitemakers (9 commits)")

### Embed Badge

![Health badge](/badges/topsitemakers-superglue/health.svg)

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

###  Alternatives

[danielme85/laravel-cconverter

Laravel 5 plug-in for currency conversion

42102.4k](/packages/danielme85-laravel-cconverter)

PHPackages © 2026

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