Add service for drive hub. #722
This commit is contained in:
parent
524d99db08
commit
ae8b7be04b
2 changed files with 28 additions and 0 deletions
|
|
@ -328,3 +328,9 @@ services:
|
|||
App\Service\WarrantySerialLoadLogger:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
|
||||
# drive hub manager
|
||||
App\Service\DriveHubManager:
|
||||
arguments:
|
||||
$em: "@doctrine.orm.entity_manager"
|
||||
$callback_url: "%env(DRIVEHUB_CALLBACK_URL)%"
|
||||
|
|
|
|||
22
src/Service/DriveHubManager.php
Normal file
22
src/Service/DriveHubManager.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
class DriveHubManager
|
||||
{
|
||||
protected $em;
|
||||
protected $callback_url;
|
||||
|
||||
public function __construct(EntityManagerInterface $em, $callback_url)
|
||||
{
|
||||
$this->em = $em;
|
||||
$this->callback_url = $callback_url;
|
||||
}
|
||||
|
||||
public function sendJOStatusChange()
|
||||
{
|
||||
// send status back to callback url as POST in json format
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue