PHPackages                             shadowz/core - 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. shadowz/core

ActiveLibrary

shadowz/core
============

02PHP

Since Nov 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/arturpttp/shadowz-core)[ Packagist](https://packagist.org/packages/shadowz/core)[ RSS](/packages/shadowz-core/feed)WikiDiscussions main Synced today

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

**Shadowz initializing example**:

```
include_once __DIR__ . '/../vendor/autoload.php';

use Core\Application;
use Core\System\Config;
use Core\System\Request;
use Core\System\Router;
use Core\Utils\Session;

include_once __DIR__."/functions.php";
include_once __DIR__."/config.php";

#Starting Configs
$config = Config::load();
#Starting Sessions
$session = Session::start();
#Starting Request
$request = Request::start();

#Starting Application
$application = new Application();
$application->init();

#Routing
$routes = require_once __DIR__ . '/../app/routes.php'; #Your app folder app/routes.php
$router = new Router($routes, $application);
$router->load();
```

**Creating a config**

In your app folder create a folder called `configs` inside it, you should create a `.php` file witch should return an array

```
return [
    'driver' => 'mysql',
    'options' => [
        \PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
        \PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
        \PDO::ATTR_CASE => PDO::CASE_NATURAL,
        \PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
        \PDO::ATTR_STRINGIFY_FETCHES => false,
        \PDO::ATTR_EMULATE_PREPARES => false,
    ],
    'mysql' => [
        'host' => 'localhost',
        'database' => 'framework',
        'user' => 'root',
        'password' => ''
    ],

    'sqlite' => [
        'host' => 'database.db',
        'database' => 'storage/database/database.db'
    ]
];
```

**Routing**

This is how your `app/routes.php` should look like

```
# ['Controller@Method', 'url', ['auth' => true, 'level' => 1]]

$routes[] = ['HomeController@index', '/'];
$routes[] = ['HomeController@contact', '/contact'];
$routes[] = ['UsersController@register', '/register'];
$routes[] = ['UsersController@login', '/login'];
$routes[] = ['UsersController@profile', '/profile', ['auth' => true, 'level' => 1]];
$routes[] = ['BlogController@show', '/posts/{id}/show'];

return $routes;
```

**Controllers**

This is how your controllers should be

```
use Core\Application;
use Core\Bases\Controller;
use Core\Bases\View;
use Core\Utils\Html;

class HomeController extends Controller
{

    public function index($request, $response)
    {
        $this->view->name = "Your name";
        $this->view->header = false;
        $this->view->footer = false;
        $this->setTitle("Home");
        $this->renderView('home/index');
    }

    public function contact()
    {
        $this->view->header = false;
        $this->view->footer = false;
        $this->setTitle("Contact us");
        $this->renderView('home/contact');
    }

    public function test($name, $request, $response) {
        echo $name;
    }

}
```

**Models**

This is how your models should be

```
use Core\Bases\Model;
use Core\System\User\User;

class UsersModel extends Model
{

    protected false|string $table = 'users';

    public function __construct()
    {
        parent::__construct();
    }

    public function getUser($where): User
    {
        return $this->findToObject($where, User::class);
    }

}
```

###  Health Score

15

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/shadowz-core/health.svg)

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

PHPackages © 2026

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