jeyroik/extas-values

There is no license information available for the latest version (1.1.0) of this package.

Values for Extas

1.1.0 2020-06-04 14:29 UTC

This package is auto-updated.

Last update: 2024-11-05 00:38:42 UTC


README

tests codecov.io PHPStan Enabled

Описание

Базовый пакет для обработчиков значений.

Использование

extas.json

{
  "values": [
    {
      "name": "test",
      "title": "Test",
      "description": "Set value to test",
      "class": "tests\\TestValueDispatcher"
    }
  ]
}
use extas\components\Item;
use extas\components\THasValue;
use extas\components\THasComplexValue;

$item = new class extends Item {
    use THasValue;
    use THasComplexValue;
    protected function getSubjectForExtension(): string
    {
        return 'test';
    }
};

echo $item->buildValue(); // test