PHPackages                             lightsuner/stack-codeigniter - 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. [Framework](/categories/framework)
4. /
5. lightsuner/stack-codeigniter

ActiveLibrary[Framework](/categories/framework)

lightsuner/stack-codeigniter
============================

This is a wrapper for codeigniter to use it in conjunction with stackphp.com

41.3kPHP

Since Jun 16Pushed 11y ago1 watchersCompare

[ Source](https://github.com/lightsuner/StackCI)[ Packagist](https://packagist.org/packages/lightsuner/stack-codeigniter)[ RSS](/packages/lightsuner-stack-codeigniter/feed)WikiDiscussions develop Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Codeigniter stackPHP(HttpKernelInterface) Implementation
========================================================

[](#codeigniter-stackphphttpkernelinterface-implementation)

[![Latest Stable Version](https://camo.githubusercontent.com/ebe43ec4d4a8913522d037342e1efe5eadf9a82ffdfdc4b164878da8172352a0/68747470733a2f2f706f7365722e707567782e6f72672f6c6967687473756e65722f737461636b2d636f646569676e697465722f762f737461626c652e706e67)](https://packagist.org/packages/lightsuner/stack-codeigniter)[![Total Downloads](https://camo.githubusercontent.com/756bd8692dcb07cf174e431c435de9a71b65d501916570ebb3608033e741c074/68747470733a2f2f706f7365722e707567782e6f72672f6c6967687473756e65722f737461636b2d636f646569676e697465722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/lightsuner/stack-codeigniter)

[StackPHP](http://stackphp.com)

\##About This is a wrapper for Codeigniter. It implements [HttpKernelInterface](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpKernelInterface.php)that allows you to use Codeigniter with other frameworks using StackPHP.

This implementation has got much dirty code. I would be glad if you help clean it.

\##Install

Add stack-codeigniter in your composer.json:

```
{
    "require": {
        "lightsuner/stack-codeigniter": "dev-develop"
    }
}
```

Now tell composer to download the component by running the command:

```
$ php composer.phar update lightsuner/stack-codeigniter
```

Composer will install the component to your project's `vendor/lightsuner` directory.

\##Usage

Replace index.php with this:

```
use StackCI\Application as CIApplication;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;

require_once __DIR__.'/vendor/autoload.php';

$session = new Session();
$session->start();

$request = Request::createFromGlobals();
$request->setSession($session);

$ciApp = (new CIApplication(__DIR__, 'development'))->init();

$app = (new Stack\Builder())
    ->resolve($ciApp);

$response = $app->handle($request);

$response->send();

$app->terminate($request, $response);
```

You can also execute some code before Codeigniter will initialized. Use `StackCI\Application::beforeKernelLoad()`:

```
$ciApp = (new \StackCI\Application(__DIR__, 'development'))
    ->beforeKernelLoad(function(){

        //... some code goes here

        define('PUBPATH', FCPATH."public");

        if( ! ini_get('date.timezone')) {
            date_default_timezone_set('GMT');
        }

        //... some other code
    })
    ->init();
```

Use with WanWizard's [datamapper](http://datamapper.wanwizard.eu/):

To make it work correctly you should add `STACKCIEXTPATH` to `third_party/datamapper/bootstrap.php`

```
....
if ( ! function_exists('load_class'))
{
	function &load_class($class, $directory = 'libraries', $prefix = 'CI_')

	......

	foreach (array(STACKCIEXTPATH, BASEPATH, APPPATH) as $path)
    		{
    			if (file_exists($path.$directory.'/'.$class.'.php'))
    			{
    				$name = $prefix.$class;

    				if (class_exists($name) === FALSE)
    				{
    					require($path.$directory.'/'.$class.'.php');
    				}

    				break;
    			}
    		}

    .....
```

and then load datamapper's bootstrap

```
$ciApp = (new CIApplication(__DIR__, 'development'))
    ->beforeKernelLoad(function(){
        //load Datamapper's bootstrap
        require_once APPPATH.'third_party/datamapper/bootstrap.php';
    })
    ->init();
```

\##Details

There is a `BaseApplication` and two folders - `Ext` and `Orig`.

1. `BaseApplication` do the same thing than default Codeigniters's index.php - load and run Kernel.
2. `Orig` contains original files of Codeigniter such as Router, Input, Output, Loader and etc.
3. `Ext` contains extended files

\####New functional: `Libraries/Session` - new method `migrate`:

```
    $this->session->migrate($destroy, $lifetime);
```

`Core/Input` - new method `getRequest`:

```
    $this->input->getRequest();
```

\##Advices

- Use [LazyHttpKernel](https://github.com/stackphp/LazyHttpKernel) to use `stack-codeigniter` in conjunction with other frameworks through `stackPHP`.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

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

---

Top Contributors

[![lightsuner](https://avatars.githubusercontent.com/u/3854165?v=4)](https://github.com/lightsuner "lightsuner (17 commits)")

### Embed Badge

![Health badge](/badges/lightsuner-stack-codeigniter/health.svg)

```
[![Health](https://phpackages.com/badges/lightsuner-stack-codeigniter/health.svg)](https://phpackages.com/packages/lightsuner-stack-codeigniter)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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