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

ActiveLibrary

vitexsoftware/multiflexi-core
=============================

1906↑600%1[1 PRs](https://github.com/VitexSoftware/php-vitexsoftware-multiflexi-core/pulls)PHPCI passing

Since Aug 10Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/VitexSoftware/php-vitexsoftware-multiflexi-core)[ Packagist](https://packagist.org/packages/vitexsoftware/multiflexi-core)[ RSS](/packages/vitexsoftware-multiflexi-core/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

php-vitexsoftware-multiflexi-core
=================================

[](#php-vitexsoftware-multiflexi-core)

MultiFlexi's Core classes

[![MultiFlexi-Chan](multiflexi-chan.png?raw=true)](multiflexi-chan.png?raw=true)

Core Classes Overview
---------------------

[](#core-classes-overview)

The MultiFlexi core provides a rich set of PHP classes for managing flexible, multi-tenant application environments. Below is a summary of the main classes organized by their functional areas:

### Core Base Classes

[](#core-base-classes)

- **Engine**: Base class for database-backed entities, providing common ORM and data management functionality
- **DBEngine**: Extended Engine with advanced database operations, DataTables integration, and web UI support
- **CommonAction**: Base class for all Action classes that perform automated tasks and integrations
- **CommonExecutor**: Base class for job execution environments

### Entity Management

[](#entity-management)

- **Company, CompanyApp, CompanyEnv, CompanyJob**: Manage company profiles, their assigned applications, environments, and job scheduling
- **Application**: Represents an application within the MultiFlexi platform, including configuration and metadata
- **User**: Manages user accounts, authentication, and permissions
- **Customer**: Handles customer relationship management

### Job Execution &amp; Scheduling

[](#job-execution--scheduling)

- **Job**: Core job entity with execution tracking and status management
- **Runner**: Executes jobs using various execution environments
- **RunTemplate**: Templates for job execution with parameter substitution
- **RunTplCreds**: Manages credential assignment for job templates
- **Scheduler**: Handles job scheduling and timing
- **ScheduleLister**: Lists and manages scheduled jobs

### Action System

[](#action-system)

Actions extend `CommonAction` and provide automated integrations and workflows:

- **ToDo**: Creates task items from job outputs with smart priority assignment
- **WebHook**: HTTP webhook notifications and integrations
- **Github**: GitHub repository interactions and automation
- **Zabbix**: Zabbix monitoring system integration
- **RedmineIssue**: Redmine issue tracking integration
- **TriggerJenkins**: Jenkins CI/CD pipeline triggering
- **LaunchJob**: Launches other MultiFlexi jobs
- **CustomCommand**: Executes custom shell commands
- **Sleep**: Introduces delays in job workflows
- **Stop**: Stops job execution
- **Reschedule**: Reschedules jobs with new timing

### Credential Management

[](#credential-management)

- **Credential**: Secure credential storage with encryption
- **CredentialType**: Base class for credential type definitions
- **CredentialConfigFields**: Dynamic configuration for credential types
- **CredentialProtoType**: Prototype pattern for credential implementations
- **Credata**: Manages credential data records

#### Debian Packaging Note

[](#debian-packaging-note)

On Debian-based systems, the autoloader explicitly includes classes only from directories where additional packages can add or remove classes (for example, Action, Env, Executor, and CredentialProtoType classes provided by add-on packages like `multiflexi-abraflexi`). This ensures those classes are present in `get_declared_classes()` even before they are referenced, while keeping the rest of the namespaces lazy-loaded.

#### Built-in Credential Types

[](#built-in-credential-types)

- **AbraFlexi**: Czech ERP system integration
- **Office365**: Microsoft Office 365 services
- **VaultWarden**: Bitwarden/VaultWarden password manager
- **SQLServer**: Microsoft SQL Server database
- **FioBank**: Fio Bank API integration
- **RaiffeisenBank**: Raiffeisen Bank services
- **Csas**: Česká spořitelna bank integration
- **EnvFile**: Environment file credential provider

### Execution Environments

[](#execution-environments)

- **Native**: Direct local execution
- **Docker**: Docker container execution
- **Podman**: Podman container execution
- **Kubernetes**: Kubernetes cluster execution
- **Azure**: Azure cloud execution

### Configuration System

[](#configuration-system)

- **ConfigField**: Individual configuration field definitions
- **ConfigFields**: Collections of configuration fields
- **ConfigFieldWithHelper**: Configuration fields with helper text and validation
- **Configuration**: Application configuration management
- **ModConfig**: Module-specific configuration
- **Environmentor**: Environment variable management

### Logging &amp; Monitoring

[](#logging--monitoring)

- **Logger**: Centralized logging with multiple backends
- **LogToSQL**: Database logging backend
- **LogToZabbix**: Zabbix monitoring integration
- **Zabbix**: Complete Zabbix monitoring namespace with metrics and alerting

### Event Processing

[](#event-processing)

- **EventSource**: Represents an external webhook adapter database connection to poll for changes
- **EventRule**: Maps incoming change events (evidence + operation) to MultiFlexi RunTemplates with env variable mapping

### Utility Classes

[](#utility-classes)

- **Token**: Authentication token management
- **Topic, Topics, TopicManager**: Topic-based messaging and categorization
- **FileStore**: File storage and retrieval operations
- **Requirement**: Dependency and requirement management
- **platformCompany, platformServer**: Platform-specific integrations

All classes follow PSR-12 coding standards, include comprehensive docblocks, and are well-tested with PHPUnit. Internationalization is supported via the i18n library, and all user-facing strings are translatable.

For more details, see the source code in the `src/MultiFlexi/` directory and the corresponding unit tests in `tests/src/MultiFlexi/`.

### MultiFlexi

[](#multiflexi)

multiflexi-core is heart of [MultiFlexi](https://multiflexi.eu) suite. See the full list of ready-to-run applications within the MultiFlexi platform on the [application list page](https://www.multiflexi.eu/apps.php).

[![MultiFlexi](https://github.com/VitexSoftware/MultiFlexi/raw/main/doc/multiflexi-app.svg)](https://www.multiflexi.eu/)

Architecture &amp; Usage
------------------------

[](#architecture--usage)

### Framework Architecture

[](#framework-architecture)

MultiFlexi follows a modular architecture with clear separation of concerns:

- **Engine-based ORM**: All database entities extend `Engine` or `DBEngine` for consistent data access patterns
- **Action-based Integrations**: Actions extend `CommonAction` to provide reusable automation components
- **Credential Management**: Secure, typed credential system with provider-specific implementations
- **Multi-tenant Design**: Complete isolation between companies with shared infrastructure
- **Extensible Execution**: Support for multiple execution environments (Docker, Kubernetes, Azure, etc.)

### Creating Custom Actions

[](#creating-custom-actions)

To create a custom action, extend the `CommonAction` base class:

```
