PHPackages                             lopatar/php-sdkv2 - 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. lopatar/php-sdkv2

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

lopatar/php-sdkv2
=================

Second generation of my experimental PHP SDK!

v3.2.2(9mo ago)01511WTFPLPHPPHP &gt;=8.4

Since Oct 20Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/lopatar/PHP-SDKv2)[ Packagist](https://packagist.org/packages/lopatar/php-sdkv2)[ RSS](/packages/lopatar-php-sdkv2/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (37)Used By (1)

PHP-SDKv2
=========

[](#php-sdkv2)

Powerful PHP framework, written in PHP 8.4, modernised version of rather primitive [PHP SDK](https://github.com/lopatar/PHP-SDK) (which is now archived).

**Currently trying to stay in line with current PHP updates.**
--------------------------------------------------------------

[](#currently-trying-to-stay-in-line-with-current-php-updates)

Requirements
============

[](#requirements)

- PHP 8.4
- Composer
- Web server (routing all requests to public/index.php)

Installation
============

[](#installation)

To install the SDK, there are two ways.

Skeleton project
================

[](#skeleton-project)

To use the [skeleton project](https://github.com/lopatar/PHP-SDKv2-Skeleton) run the following composer command.

```
composer create-project lopatar/php-sdkv2-skeleton
```

Manual installation
===================

[](#manual-installation)

```
composer require "lopatar/php-sdkv2"
```

- Create following directory structure in the folder where the "vendor" folder resides

    - App
        - Controllers (where your controller files reside)
        - Views (where your view files reside)
        - Models (where your model files reside)
- Map the App namespace in composer.json like so

```
{
  "autoload": {
    "psr-4": {
      "App\\": "App/"
    }
  }
}
```

- Create your configuration class
- Done!

Routing requests to index.php
=============================

[](#routing-requests-to-indexphp)

- NGINX

```
    root /path/to/public;
    index index.php;

    location / {
        try_files $uri /index.php$is_args$args =404;
    }

```

Recommended plugins
===================

[](#recommended-plugins)

- [deep-assoc-completion](https://plugins.jetbrains.com/plugin/9927-deep-assoc-completion) for better PhpDoc annotations

Configuration class
===================

[](#configuration-class)

The App object expects an instance of IConfig passed to the constructor, please create your class such as:

```
