PHPackages                             vitexsoftware/multiflexi-api-server - 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. [API Development](/categories/api)
4. /
5. vitexsoftware/multiflexi-api-server

ActiveLibrary[API Development](/categories/api)

vitexsoftware/multiflexi-api-server
===================================

1505[2 PRs](https://github.com/VitexSoftware/multiflexi-server/pulls)PHPCI failing

Since Nov 24Pushed 1w ago2 watchersCompare

[ Source](https://github.com/VitexSoftware/multiflexi-server)[ Packagist](https://packagist.org/packages/vitexsoftware/multiflexi-api-server)[ RSS](/packages/vitexsoftware-multiflexi-api-server/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

MultiFlexi - PHP Slim 4 Server library for MultiFlexi API
=========================================================

[](#multiflexi---php-slim-4-server-library-for-multiflexi-api)

- [OpenAPI Generator](https://openapi-generator.tech)
- [Slim 4 Documentation](https://www.slimframework.com/docs/v4/)

This server has been generated with [Slim PSR-7](https://github.com/slimphp/Slim-Psr7) implementation. [PHP-DI](https://php-di.org/doc/frameworks/slim.html) package used as dependency container.

Requirements
------------

[](#requirements)

- Web server with URL rewriting
- PHP 8.1 or newer

This package contains `.htaccess` for Apache configuration. If you use another server(Nginx, HHVM, IIS, lighttpd) check out [Web Servers](https://www.slimframework.com/docs/v3/start/web-servers.html) doc.

Installation via [Composer](https://getcomposer.org/)
-----------------------------------------------------

[](#installation-via-composer)

Navigate into your project's root directory and execute the bash command shown below. This command downloads the Slim Framework and its third-party dependencies into your project's `vendor/` directory.

```
$ composer install
```

Add configs
-----------

[](#add-configs)

[PHP-DI package](https://php-di.org/doc/getting-started.html) helps to decouple configuration from implementation. App loads configuration files in straight order(`$env` can be `prod` or `dev`):

1. `config/$env/default.inc.php` (contains safe values, can be committed to vcs)
2. `config/$env/config.inc.php` (user config, excluded from vcs, can contain sensitive values, passwords etc.)
3. `lib/App/RegisterDependencies.php`

Start devserver
---------------

[](#start-devserver)

Run the following command in terminal to start localhost web server, assuming `./php-slim-server/public/` is public-accessible directory with `index.php` file:

```
$ php -S localhost:8888 -t php-slim-server/public
```

> **Warning** This web server was designed to aid application development. It may also be useful for testing purposes or for application demonstrations that are run in controlled environments. It is not intended to be a full-featured web server. It should not be used on a public network.

Tests
-----

[](#tests)

### PHPUnit

[](#phpunit)

This package uses PHPUnit 8 or 9(depends from your PHP version) for unit testing. [Test folder](tests) contains templates which you can fill with real test assertions. How to write tests read at [2. Writing Tests for PHPUnit - PHPUnit 8.5 Manual](https://phpunit.readthedocs.io/en/8.5/writing-tests-for-phpunit.html).

#### Run

[](#run)

CommandTarget`$ composer test`All tests`$ composer test-apis`Apis tests`$ composer test-models`Models tests#### Config

[](#config)

Package contains fully functional config `./phpunit.xml.dist` file. Create `./phpunit.xml` in root folder to override it.

Quote from [3. The Command-Line Test Runner — PHPUnit 8.5 Manual](https://phpunit.readthedocs.io/en/8.5/textui.html#command-line-options):

> If phpunit.xml or phpunit.xml.dist (in that order) exist in the current working directory and --configuration is not used, the configuration will be automatically read from that file.

### PHP CodeSniffer

[](#php-codesniffer)

[PHP CodeSniffer Documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki). This tool helps to follow coding style and avoid common PHP coding mistakes.

#### Run

[](#run-1)

```
$ composer phpcs
```

#### Config

[](#config-1)

Package contains fully functional config `./phpcs.xml.dist` file. It checks source code against PSR-1 and PSR-2 coding standards. Create `./phpcs.xml` in root folder to override it. More info at [Using a Default Configuration File](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file)

### PHPLint

[](#phplint)

[PHPLint Documentation](https://github.com/overtrue/phplint). Checks PHP syntax only.

#### Run

[](#run-2)

```
$ composer phplint
```

Show errors
-----------

[](#show-errors)

Switch your app environment to development

- When using with some webserver =&gt; in `public/.htaccess` file:

```
## .htaccess

    SetEnv APP_ENV 'development'

```

- Or when using whatever else, set `APP_ENV` environment variable like this:

```
export APP_ENV=development
```

or simply

```
export APP_ENV=dev
```

Mock Server
-----------

[](#mock-server)

Since this feature should be used for development only, change environment to `development` and send additional HTTP header `X-MultiFlexi\Api-Mock: ping` with any request to get mocked response. CURL example:

```
curl --request GET \
    --url 'http://localhost:8888/v2/pet/findByStatus?status=available' \
    --header 'accept: application/json' \
    --header 'X-MultiFlexi\Api-Mock: ping'
[{"id":-8738629417578509312,"category":{"id":-4162503862215270400,"name":"Lorem ipsum dol"},"name":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem i","photoUrls":["Lor"],"tags":[{"id":-3506202845849391104,"name":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectet"}],"status":"pending"}]
```

Used packages:

- [Openapi Data Mocker](https://github.com/ybelenko/openapi-data-mocker) - first implementation of OAS3 fake data generator.
- [Openapi Data Mocker Server Middleware](https://github.com/ybelenko/openapi-data-mocker-server-middleware) - PSR-15 HTTP server middleware.
- [Openapi Data Mocker Interfaces](https://github.com/ybelenko/openapi-data-mocker-interfaces) - package with mocking interfaces.

Logging
-------

[](#logging)

Build contains pre-configured [`monolog/monolog`](https://github.com/Seldaek/monolog) package. Make sure that `logs` folder is writable. Add required log handlers/processors/formatters in `lib/App/RegisterDependencies.php`.

API Endpoints
-------------

[](#api-endpoints)

All URIs are relative to **

> Important! Do not modify abstract API controllers directly! Instead extend them by implementation classes like:

```
// src/Api/PetApi.php

namespace MultiFlexi\Api\Server;

use MultiFlexi\Api\Server\AbstractPetApi;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;

class PetApi extends AbstractPetApi
{
    public function addPet(
        ServerRequestInterface $request,
        ResponseInterface $response
    ): ResponseInterface {
        // your implementation of addPet method here
    }
}
```

When you need to inject dependencies into API controller check [PHP-DI - Controllers as services](https://github.com/PHP-DI/Slim-Bridge#controllers-as-services) guide.

Place all your implementation classes in `./src` folder accordingly. For instance, when abstract class located at `./lib/Api/AbstractPetApi.php` you need to create implementation class at `./src/Api/PetApi.php`.

ClassMethodHTTP requestDescription*AbstractAppApi***setAppById****POST** /app/Create or Update Application*AbstractAppApi***getAppById****GET** /app/{appId}.{suffix}Get App by ID*AbstractAppApi***listApps****GET** /apps.{suffix}Show All Apps*AbstractCompanyApi***setCompanyById****POST** /company/Create or Update Company*AbstractCompanyApi***getCompanyById****GET** /company/{companyId}.{suffix}Get Company by ID*AbstractCompanyApi***listCompanies****GET** /companies.{suffix}Show All Companies*AbstractDefaultApi***logoutPost****POST** /logoutOdhlášení uživatele (invalidate token/session)*AbstractDefaultApi***rootGet****GET** /Redirect to index*AbstractDefaultApi***getAllCredentialTypes****GET** /credential\_types.{suffix}Get All Credential Types*AbstractDefaultApi***getAllTopics****GET** /topics.{suffix}Get All Topics*AbstractDefaultApi***getAllUserCredentials****GET** /credentials.{suffix}Get All User Credentials*AbstractDefaultApi***getApiIndex****GET** /index.{suffix}Endpoints listing*AbstractDefaultApi***getCredential****GET** /credential/{credentialId}.{suffix}Get User Credentials*AbstractDefaultApi***getCredentialType****GET** /credential\_type/{credentialTypeID}.{suffix}Get Credential Type by ID*AbstractDefaultApi***getJobsStatus****GET** /jobs/status.{suffix}Get Jobs Status*AbstractDefaultApi***getTopic****GET** /topic/{topicId}.{suffix}Get Topic by ID*AbstractDefaultApi***loginSuffixGet****GET** /login.{suffix}Return User's token*AbstractDefaultApi***loginSuffixPost****POST** /login.{suffix}Return User's token*AbstractDefaultApi***pingSuffixGet****GET** /ping.{suffix}job heartbeat operation*AbstractDefaultApi***statusSuffixGet****GET** /status.{suffix}Get API status*AbstractDefaultApi***updateCredentialType****POST** /credential\_type/{credentialTypeID}.{suffix}Update Credential Type*AbstractDefaultApi***updateCredentials****POST** /credential/{credentialId}.{suffix}Update Credentials*AbstractDefaultApi***updateTopic****POST** /topic/{topicId}.{suffix}Update Topic*AbstractEventruleApi***setEventRuleById****POST** /eventrule/Create or Update EventRule*AbstractEventruleApi***deleteEventRuleById****DELETE** /eventrule/{eventRuleId}.{suffix}Delete EventRule by ID*AbstractEventruleApi***getEventRuleById****GET** /eventrule/{eventRuleId}.{suffix}Get EventRule by ID*AbstractEventruleApi***listEventRules****GET** /eventrules.{suffix}Show All EventRules*AbstractEventsourceApi***setEventSourceById****POST** /eventsource/Create or Update EventSource*AbstractEventsourceApi***deleteEventSourceById****DELETE** /eventsource/{eventSourceId}.{suffix}Delete EventSource by ID*AbstractEventsourceApi***getEventSourceById****GET** /eventsource/{eventSourceId}.{suffix}Get EventSource by ID*AbstractEventsourceApi***listEventSources****GET** /eventsources.{suffix}Show All EventSources*AbstractEventsourceApi***testEventSourceConnection****POST** /eventsource/{eventSourceId}/test.{suffix}Test EventSource connection*AbstractGdprApi***downloadDataExport****GET** /data-export-downloadDownload personal data export file*AbstractGdprApi***requestDataExport****GET** /data-exportRequest personal data export (GDPR Article 15)*AbstractGdprApi***requestDataExportPost****POST** /data-exportRequest personal data export (GDPR Article 15)*AbstractJobApi***setjobById****POST** /job/Create or Update job record*AbstractJobApi***getjobById****GET** /job/{jobId}.{suffix}Get job by ID*AbstractJobApi***listjobs****GET** /jobs.{suffix}Show All jobs*AbstractRuntemplateApi***setRunTemplateById****POST** /runtemplateCreate or Update RunTemplate*AbstractRuntemplateApi***getRunTemplateById****GET** /runtemplate/{runTemplateId}.{suffix}Get RunTemplate by ID*AbstractRuntemplateApi***listRunTemplates****GET** /runtemplates.{suffix}Show All RunTemplates*AbstractRuntemplateApi***updateRunTemplateById****POST** /runtemplate/{runTemplateId}.{suffix}Update RunTemplate by ID*AbstractUserApi***setUserById****POST** /user/Create or Update User*AbstractUserApi***getUserById****GET** /user/{userId}.{suffix}Get User by ID*AbstractUserApi***listUsers****GET** /users.{suffix}Show All UsersModels
------

[](#models)

- MultiFlexi\\Api\\Model\\App
- MultiFlexi\\Api\\Model\\AppEnvironmentValue
- MultiFlexi\\Api\\Model\\AppExitCodesInner
- MultiFlexi\\Api\\Model\\Company
- MultiFlexi\\Api\\Model\\ConfField
- MultiFlexi\\Api\\Model\\Configuration
- MultiFlexi\\Api\\Model\\Credential
- MultiFlexi\\Api\\Model\\CredentialType
- MultiFlexi\\Api\\Model\\Customer
- MultiFlexi\\Api\\Model\\DataExportData
- MultiFlexi\\Api\\Model\\DataExportDataActivityLogsInner
- MultiFlexi\\Api\\Model\\DataExportDataAuditTrails
- MultiFlexi\\Api\\Model\\DataExportDataAuditTrailsDataExportRequestsInner
- MultiFlexi\\Api\\Model\\DataExportDataCompanyAssociationsInner
- MultiFlexi\\Api\\Model\\DataExportDataConsentRecords
- MultiFlexi\\Api\\Model\\DataExportDataConsentRecordsConsentAuditTrailInner
- MultiFlexi\\Api\\Model\\DataExportDataConsentRecordsConsentRecordsInner
- MultiFlexi\\Api\\Model\\DataExportDataCredentialsInner
- MultiFlexi\\Api\\Model\\DataExportDataExportMetadata
- MultiFlexi\\Api\\Model\\DataExportDataJobHistoryInner
- MultiFlexi\\Api\\Model\\DataExportDataSessionHistory
- MultiFlexi\\Api\\Model\\DataExportDataSessionHistoryCurrentSessionInfo
- MultiFlexi\\Api\\Model\\DataExportDataUserProfile
- MultiFlexi\\Api\\Model\\DataExportResponse
- MultiFlexi\\Api\\Model\\DataExportStatusResponse
- MultiFlexi\\Api\\Model\\DataExportStatusResponseExportsInner
- MultiFlexi\\Api\\Model\\ErrorResponse
- MultiFlexi\\Api\\Model\\EventRule
- MultiFlexi\\Api\\Model\\EventSource
- MultiFlexi\\Api\\Model\\GetCredentialType200Response
- MultiFlexi\\Api\\Model\\GetTopic200Response
- MultiFlexi\\Api\\Model\\Job
- MultiFlexi\\Api\\Model\\JobsStatus
- MultiFlexi\\Api\\Model\\LogoutPostRequest
- MultiFlexi\\Api\\Model\\RequestDataExport200Response
- MultiFlexi\\Api\\Model\\RequestDataExportPostRequest
- MultiFlexi\\Api\\Model\\RunTemplate
- MultiFlexi\\Api\\Model\\Status
- MultiFlexi\\Api\\Model\\Tag
- MultiFlexi\\Api\\Model\\TestEventSourceConnection200Response
- MultiFlexi\\Api\\Model\\Topic
- MultiFlexi\\Api\\Model\\UpdateCredentials201Response
- MultiFlexi\\Api\\Model\\UpdateRunTemplateById400Response
- MultiFlexi\\Api\\Model\\UpdateRunTemplateById404Response
- MultiFlexi\\Api\\Model\\UpdateRunTemplateById500Response
- MultiFlexi\\Api\\Model\\UpdateRunTemplateByIdRequest
- MultiFlexi\\Api\\Model\\User

Authentication
--------------

[](#authentication)

### Security schema `basicAuth`

[](#security-schema-basicauth)

> Important! To make Basic authentication work you need to extend [\\MultiFlexi\\Api\\Auth\\AbstractAuthenticator](./lib/Auth/AbstractAuthenticator.php) class by [\\MultiFlexi\\Api\\Auth\\BasicAuthenticator](./src/Auth/BasicAuthenticator.php) class.

### Advanced middleware configuration

[](#advanced-middleware-configuration)

Ref to used Slim Token Middleware [dyorg/slim-token-authentication](https://github.com/dyorg/slim-token-authentication/tree/1.x#readme)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance64

Regular maintenance activity

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85.1% 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/f24039b55245f141b108d0245b5821fe6cc4bb0585e36283f97301cd3aa792bc?d=identicon)[vitex](/maintainers/vitex)

---

Top Contributors

[![Vitexus](https://avatars.githubusercontent.com/u/2621130?v=4)](https://github.com/Vitexus "Vitexus (57 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")

### Embed Badge

![Health badge](/badges/vitexsoftware-multiflexi-api-server/health.svg)

```
[![Health](https://phpackages.com/badges/vitexsoftware-multiflexi-api-server/health.svg)](https://phpackages.com/packages/vitexsoftware-multiflexi-api-server)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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