jeyroik/extas-repositories-get

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

Get extas repositories package

0.4.0 2020-06-11 08:26 UTC

This package is auto-updated.

Last update: 2024-10-24 13:32:15 UTC


README

tests codecov.io PHPStan Enabled Extas Installer v3 Latest Stable Version Total Downloads Dependents

Описание

DEPRECATED

Расширение для получения репозитория.

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

В extas.json:

{
  "extensions": [
    {
      "class": "extas\\components\\extensions\\ExtensionRepositoryGet",
      "interface": "extas\\components\\interfaces\\IExtensionRepositoryGet",
      "subject": "*",
      "methods": ["myRepository"]
    } 
  ]
}

В конфиге контейнера:

return [
    'myRepository' => my\repos\Repository::class
];

В коде

/**
 * @var extas\interfaces\IItem $someItem
 */
echo get_class($someItem->myRepository()); // my\repos\Repository