forked fromRodinVasily/spryker-autowiring
- Notifications
You must be signed in to change notification settings - Fork0
This package enables autowiring for Spryker
License
NotificationsYou must be signed in to change notification settings
spryker-community/spryker-autowiring
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
#Hackweekender2023
Install it with composer
composer require hackweekender-aw/spryker-autowiring
Add a namespace to your config
$config[KernelConstants::CORE_NAMESPACES] = [ [...] 'AW'];
- Include
\AW\Yves\Kernel\ClassResolverAwareTrait
in the controller - Call
$this->resolveClass(AmazingYvesClass::class)->yourAmazingMethod()
- Include
\AW\Client\Kernel\ClassResolverAwareTrait
in the client - Call
$this->resolveClass(AmazingClientClass::class)->yourAmazingMethod()
- Include
\AW\Zed\Kernel\ClassResolverAwareTrait
in the facade - Call
$this->resolveClass(AmazingZedClass::class)->yourAmazingMethod()
- Make the dependency provider of your module to implement the interface
\AW\Shared\Kernel\DependencyInjection\ConfigurableDependencyInjectionInterface
- Define the custom definitions usinghttps://php-di.org/doc/php-definitions.html#definition-types
public function getDependencyInjectionConfig(): array{ return [ AmazingCartOperationInterface::class => DI\autowire(AmazingCartOperation::class) ->constructorParameter('postOperationPlugins', $this->getPostOperationPlugins()) ];}
About
This package enables autowiring for Spryker
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Languages
- PHP100.0%