PHPackages                             onecthree/zpheur - 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. onecthree/zpheur

ActiveProject[Framework](/categories/framework)

onecthree/zpheur
================

Web framework for PHP

v0.105(1y ago)121PHPPHP ^8.2

Since Oct 19Pushed 1y ago2 watchersCompare

[ Source](https://github.com/onecthree/zpheur)[ Packagist](https://packagist.org/packages/onecthree/zpheur)[ RSS](/packages/onecthree-zpheur/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (5)Used By (0)

Zpheur Skeleton Application
===========================

[](#zpheur-skeleton-application)

> ⚠️ Used only for non-production (untested and non-stable release)

Zpheur skeleton application for a new project.

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

[](#installation)

> Remember, you must install the [czpheur](https://github.com/onecthree/czpheur) extension before using this template.

To create new project via Composer:

```
$ composer create-project onecthree/zpheur new-project
```

Basic Usage
-----------

[](#basic-usage)

As a personal project, the framework itself doesn't have many features yet. But for the first try, you can see the sample code on the controller `app/Http/Action/IndexAction.php`:

```
class IndexAction extends BaseAction
{
    public function __construct( Request $request, Response $response )
    {
        parent::__construct($request, $response);
    }

    #[Route\GET(dest: '/')]
    public function getIndex( Response $response ): Response
    {
        return $response->send('Hello World');
    }
}
```

### Class autoloader

[](#class-autoloader)

Zpheur using `spl_autoloader` for the class/function autoloader in the framework, for the example how namespacing model work, see bottom example:

```
// In your project, all application things are located under "app" directory.
// Namespacing in path always begin with lower alphabet, like "app" and "system"
// but namespacing in PHP code always begin with upper alphabet, see "app/Http/Action/IndexAction.php":
