Skip to content

AbExperimentsTableName ​

Rasuvaeff\Yii3AbTestingDb\AbExperimentsTableName

Class · rasuvaeff/yii3-ab-testing-db · Source

The table's name, as a type.

A plain string $table constructor argument cannot be configured: yiisoft/db-migration builds migrations through Injector::make(), which resolves arguments by name or by type from the container and never reads a container definition keyed by the migration's own class. A scalar has no type to resolve, so the documented M...::class => ['__construct()' => ...] recipe silently did nothing. A typed value object does resolve — and when the container has no binding, Injector falls back to this parameter's default, so the package still works unconfigured.

Constructor ​

php
new AbExperimentsTableName(string $value = 'ab_experiments')

Properties ​

PropertyTypeReadonlyDescription
valuestringyes

Methods ​

__toString() ​

php
__toString(): string

forIndexName() ​

php
forIndexName(): string

Base for index names: a schema-qualified table cannot appear verbatim in an index name, so schema.table becomes schema_table.