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

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

qkskima/qkskima-php
===================

Content structure field assignment tool

0.0.1(2y ago)06MITPHP

Since Mar 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/QkSkima/qkskima-php)[ Packagist](https://packagist.org/packages/qkskima/qkskima-php)[ Docs](https://www.qkskima.com)[ RSS](/packages/qkskima-qkskima-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

QkSkima - Quickly (re-)assign database columns to any field definition
======================================================================

[](#qkskima---quickly-re-assign-database-columns-to-any-field-definition)

QkSkima is a drop-in solution to connect database schemas of on-premise CMS with web application frameworks. The core library contains a DSL for writing up virtual field mappings. Fields are mappable to any database column with the correct data type. It also supports single table inheritance (STI) types to load different content types of one table.

QkSkima supports promises for database relations as well. The schema definition provided all information needed to load related contents of the database.

QkSkima is designed to be completely independent of any querying language. It is combined with adapters which are specific to databases and CMS like WordPress, Drupal or TYPO3. Thus, you can manage contents with a headful on-premise CMS while outputting contents with an web application framework like Symfony or Laravel.

A short rundown of its features:

- Specify a schema for a table with a short DSL.

```
\QkSkima\Base\Schema::define(function ($schema) {
    $schema->table(tablename: 'contents', closure: function ($table) {
        $table->type(typeName: 'header-with-count', closure: function ($type) {
            $type->column(
                field: 'headline',
                columnName: 'qks_string_1',
                fieldtype: \QkSkima\Base\Mapper\FieldTypes::VARCHAR
            );
            $type->column(
                field: 'intro',
                columnName: 'qks_string_2',
                fieldtype: \QkSkima\Base\Mapper\FieldTypes::VARCHAR
            );
            $type->column(
                field: 'count',
                columnName: 'qks_integer_1',
                fieldtype: \QkSkima\Base\Mapper\FieldTypes::INTEGER
            );
        });

        $table->primaryKeyColumn(primaryKeyColumn: 'id');
        $table->stiColumn(stiColumn: 'type');
    });
});
```

- Supports all the field types you need and even relations.

```
final class FieldTypes
{
    public const VARCHAR = 'string';
    public const TEXT = 'text';
    public const INTEGER = 'integer';
    public const FLOAT = 'float';
    public const DECIMAL = 'decimal';
    public const DATETIME = 'datetime';
    public const TIMESTAMP = 'timestamp';
    public const TIME = 'time';
    public const DATE = 'date';
    public const BOOLEAN = 'boolean';
    public const BELONGS_TO = 'belongs_to';
    public const HAS_MANY = 'has_many';
    public const HAS_ONE = 'has_one';
    public const PRIMARY_KEY = 'primary_key';
    public const INHERITANCE_COLUMN = 'inheritance_column';
}
```

- Schema registry for loading multiple schema definitions.

```
$schema = \QkSkima\Base\Schema\Registry::getInstance()->find('contents');
$schema->hasTable('contents'); # => true
```

- Easy loading of field mappings for system independent database retrieval.

```
$schema = \QkSkima\Base\Schema\Registry::getInstance()->find('contents');
$mapper = new \QkSkima\Base\Mapper(tablename: 'contents', schema: $schema);
$fieldPromise = $mapper->fieldPromiseFor('headline');
echo $fieldPromise->getColumnName(); # => qks_string_1
echo $fieldPromise->getFieldtype(); # => string
```

- Field to column normalizing and vice versa.

```
$schema = \QkSkima\Base\Schema\Registry::getInstance()->find('contents');
$mapper = new \QkSkima\Base\Mapper(tablename: 'contents', schema: $schema);
$fieldPromiseA = $mapper->fieldPromiseFor(fieldOrColumnName: 'headline');
$fieldPromiseB = $mapper->fieldPromiseFor(fieldOrColumnName: 'qks_string_1');

echo $fieldPromiseA === $fieldPromiseB; # => true
```

Principles of QkSkima
---------------------

[](#principles-of-qkskima)

QkSkima doesn't write your database migrations. Instead, you don't need migrations anymore. Just virtually assign any column to your field as long as the required datatype matches the data you want to save. This is especially handy if you have many content elements all stored in the same table with a STI column.

Simply add a generic set of columns to your table and write up the schema definition for it. A short example below.

```
CREATE TABLE contents (
  id INT NOT NULL,
  type VARCHAR(255) NOT NULL,
  qks_string_1 VARCHAR(255) NOT NULL,
  qks_string_2 VARCHAR(255) NOT NULL,
  qks_integer_1 INT NOT NULL,
  qks_integer_2 INT NOT NULL,
  qks_relation_1 INT NOT NULL,
  qks_relation_2 INT NOT NULL,

  PRIMARY KEY id
)
```

According to the principle mentioned above, your columns have generic names instead of specific ones. This makes it easier to map the contents of the columns to any field you like at any given time without worrying about migrations.

License
-------

[](#license)

QkSkima is Open Source and licensed under the MIT license:

Support
-------

[](#support)

You can file bug reports here:

Copyright
---------

[](#copyright)

Copyright 2024 - QkSkima by Colin Atkins

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

771d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fd0da54b69c15d4964484de604f904d9cd43f55a214a1d4bdc3e9f92cad4c37?d=identicon)[atkins](/maintainers/atkins)

---

Top Contributors

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

---

Tags

schemacontent elements

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/qkskima-qkskima-php/health.svg)

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

###  Alternatives

[league/config

Define configuration arrays with strict schemas and access values with dot notation

564302.2M24](/packages/league-config)[torann/json-ld

Extremely simple JSON-LD markup generator.

149620.7k1](/packages/torann-json-ld)[madeyourday/contao-rocksolid-custom-elements

Create your own, nestable content elements using a modular system. End the WYSIWYG chaos with your own content elements.

50341.9k12](/packages/madeyourday-contao-rocksolid-custom-elements)[ichhabrecht/mask-export

Export your mask elements as extension

45215.8k](/packages/ichhabrecht-mask-export)[brick/schema

Schema.org library for PHP

5163.7k1](/packages/brick-schema)[t3/dce

Best FlexForm based content elements since 2012. With TCA mapping feature, simple backend view and much more features which makes it super easy to create own content element types.

17440.2k1](/packages/t3-dce)

PHPackages © 2026

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