Skip to content

Instantly share code, notes, and snippets.

@FabianWesner
Last active March 17, 2017 08:52
Show Gist options
  • Select an option

  • Save FabianWesner/afd7fbefbd05f154fc15ad31fde4fae2 to your computer and use it in GitHub Desktop.

Select an option

Save FabianWesner/afd7fbefbd05f154fc15ad31fde4fae2 to your computer and use it in GitHub Desktop.
Spryker DI example
<?php
class ProductManager implements ProductManagerInterface
{
/**
* @var \Spryker\Zed\Product\Persistence\ProductQueryContainerInterface
*/
protected $productQueryContainer;
/**
* @var \Spryker\Zed\Product\Business\Product\ProductAbstractManagerInterface
*/
protected $productAbstractManager;
/**
* @var \Spryker\Zed\Product\Business\Product\ProductConcreteManagerInterface
*/
protected $productConcreteManager;
/**
* @param \Spryker\Zed\Product\Business\Product\ProductAbstractManagerInterface $productAbstractManager
* @param \Spryker\Zed\Product\Business\Product\ProductConcreteManagerInterface $productConcreteManager
* @param \Spryker\Zed\Product\Persistence\ProductQueryContainerInterface $productQueryContainer
*/
public function __construct(
ProductAbstractManagerInterface $productAbstractManager,
ProductConcreteManagerInterface $productConcreteManager,
ProductQueryContainerInterface $productQueryContainer
) {
$this->productAbstractManager = $productAbstractManager;
$this->productConcreteManager = $productConcreteManager;
$this->productQueryContainer = $productQueryContainer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment