mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-17 04:40:08 -07:00
Setup collection service
This commit is contained in:
parent
1a0d1d6b2a
commit
2d57bc8ed3
@ -5,3 +5,6 @@ services:
|
||||
client.rebrickable:
|
||||
class: AppBundle\Client\Rebrickable\Rebrickable
|
||||
arguments: ['%rebrickable_apikey%']
|
||||
service.collection:
|
||||
class: AppBundle\Service\CollectionService
|
||||
arguments: ['@client.brickset','@client.rebrickable']
|
32
src/AppBundle/Service/CollectionService.php
Normal file
32
src/AppBundle/Service/CollectionService.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace AppBundle\Service;
|
||||
|
||||
use AppBundle\Client\Brickset\Brickset;
|
||||
use AppBundle\Client\Rebrickable\Rebrickable;
|
||||
|
||||
class CollectionService
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Brickset
|
||||
*/
|
||||
private $bricksetClient;
|
||||
|
||||
/**
|
||||
* @var Rebrickable
|
||||
*/
|
||||
private $rebrickableClient;
|
||||
|
||||
/**
|
||||
* CollectionService constructor.
|
||||
*
|
||||
* @param $bricksetClient
|
||||
* @param $rebrickableClient
|
||||
*/
|
||||
public function __construct($bricksetClient, $rebrickableClient)
|
||||
{
|
||||
$this->bricksetClient = $bricksetClient;
|
||||
$this->rebrickableClient = $rebrickableClient;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user