Replace ObjectManager with EntityManagerInterface #335

This commit is contained in:
Kendrick Chan 2020-02-11 20:31:28 +08:00
parent d51a98a6a0
commit fb76cb0445
28 changed files with 55 additions and 57 deletions

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\JobOrder; use App\Entity\JobOrder;
@ -17,9 +17,9 @@ class AdjustLongLatCommand extends Command
{ {
protected $em; protected $em;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $em)
{ {
$this->em = $om; $this->em = $em;
parent::__construct(); parent::__construct();
} }

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Battery; use App\Entity\Battery;
@ -18,7 +18,7 @@ class ComputeWarrantyExpiryDateCommand extends Command
protected $em; protected $em;
protected $wh; protected $wh;
public function __construct(ObjectManager $em, WarrantyHandler $wh) public function __construct(EntityManagerInterface $em, WarrantyHandler $wh)
{ {
$this->em = $em; $this->em = $em;
$this->wh = $wh; $this->wh = $wh;

View file

@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Warranty; use App\Entity\Warranty;
use App\Entity\Customer; use App\Entity\Customer;
@ -33,7 +33,7 @@ class CreateCustomerFromWarrantyCommand extends Command
protected $cvu_mfg_id; protected $cvu_mfg_id;
protected $cvu_brand_id; protected $cvu_brand_id;
public function __construct(ObjectManager $em, $cvu_mfg_id, $cvu_brand_id) public function __construct(EntityManagerInterface $em, $cvu_mfg_id, $cvu_brand_id)
{ {
$this->em = $em; $this->em = $em;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\JobOrder; use App\Entity\JobOrder;
use App\Entity\JOEvent; use App\Entity\JOEvent;
@ -22,7 +22,7 @@ class FulfillOldJobOrderCommand extends Command
{ {
protected $em; protected $em;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\JobOrder; use App\Entity\JobOrder;
use App\Entity\JOEvent; use App\Entity\JOEvent;
@ -22,7 +22,7 @@ class FulfillPendingJobOrderCommand extends Command
{ {
protected $em; protected $em;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\VehicleManufacturer; use App\Entity\VehicleManufacturer;
use App\Entity\Vehicle; use App\Entity\Vehicle;
@ -21,7 +21,7 @@ class GenerateBatteryCompatibilityCommand extends Command
protected $em; protected $em;
protected $vmfg_index; protected $vmfg_index;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;

View file

@ -10,7 +10,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\JobOrder; use App\Entity\JobOrder;
use App\Entity\Warranty; use App\Entity\Warranty;
@ -25,7 +25,7 @@ class GenerateWarrantyFromJobOrderCommand extends Command
protected $sapbatt_hash; protected $sapbatt_hash;
protected $warranties_hash; protected $warranties_hash;
public function __construct(ObjectManager $em) public function __construct(EntityManagerInterface $em)
{ {
$this->em = $em; $this->em = $em;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use CrEOF\Spatial\PHP\Types\Geometry\Point; use CrEOF\Spatial\PHP\Types\Geometry\Point;
use DateTime; use DateTime;
@ -30,7 +30,7 @@ class ImportBatteryPriceCommand extends Command
protected $em; protected $em;
protected $size_index; protected $size_index;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;
$this->size_index = []; $this->size_index = [];

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Battery; use App\Entity\Battery;
use App\Entity\BatteryManufacturer; use App\Entity\BatteryManufacturer;
@ -27,7 +27,7 @@ class ImportCMBBatteryDataCommand extends Command
protected $bsize_hash; protected $bsize_hash;
protected $batt_hash; protected $batt_hash;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\BatterySize; use App\Entity\BatterySize;
@ -20,7 +20,7 @@ class ImportCMBBatteryTradeInPriceCommand extends Command
protected $bsize_hash; protected $bsize_hash;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\BatteryManufacturer; use App\Entity\BatteryManufacturer;
use App\Entity\BatteryModel; use App\Entity\BatteryModel;
@ -50,7 +50,7 @@ class ImportCMBVehicleCompatibilityCommand extends Command
protected $vmanu_hash; protected $vmanu_hash;
protected $vmake_hash; protected $vmake_hash;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use DateTime; use DateTime;
@ -49,7 +49,7 @@ class ImportCustomerCommand extends Command
protected $mfg_index; protected $mfg_index;
protected $vehicle_index; protected $vehicle_index;
public function __construct(ObjectManager $em) public function __construct(EntityManagerInterface $em)
{ {
$this->em = $em; $this->em = $em;
$this->populateMfgIndex(); $this->populateMfgIndex();

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Warranty; use App\Entity\Warranty;
use App\Entity\Battery; use App\Entity\Battery;
@ -44,7 +44,7 @@ class ImportLegacyJobOrderCommand extends Command
protected $row_max_field_size; protected $row_max_field_size;
protected $data_max_field_size; protected $data_max_field_size;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface; use Symfony\Component\Validator\Validator\ValidatorInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Outlet; use App\Entity\Outlet;
use App\Entity\Hub; use App\Entity\Hub;
@ -19,7 +19,7 @@ class ImportOutletsCommand extends Command
{ {
private $object_manager; private $object_manager;
public function __construct(ObjectManager $om, ValidatorInterface $validator) public function __construct(EntityManagerInterface $om, ValidatorInterface $validator)
{ {
$this->object_manager = $om; $this->object_manager = $om;
$this->validator = $validator; $this->validator = $validator;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use CrEOF\Spatial\PHP\Types\Geometry\Point; use CrEOF\Spatial\PHP\Types\Geometry\Point;
use DateTime; use DateTime;
@ -34,7 +34,7 @@ class ImportPartnersCommand extends Command
protected $em; protected $em;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface; use Symfony\Component\Validator\Validator\ValidatorInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\SAPBattery; use App\Entity\SAPBattery;
use App\Entity\SAPBatteryBrand; use App\Entity\SAPBatteryBrand;
@ -22,7 +22,7 @@ class ImportSAPBatteryCommand extends Command
private $batt_size_hash; private $batt_size_hash;
private $batt_brand_hash; private $batt_brand_hash;
public function __construct(ObjectManager $em) public function __construct(EntityManagerInterface $em)
{ {
$this->em = $em; $this->em = $em;
$this->initBatteryHash(); $this->initBatteryHash();

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use CrEOF\Spatial\PHP\Types\Geometry\Point; use CrEOF\Spatial\PHP\Types\Geometry\Point;
use DateTime; use DateTime;
@ -35,7 +35,7 @@ class ImportVehicleBatteryCommand extends Command
protected $batt_index; protected $batt_index;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;
$this->vmfg_index = []; $this->vmfg_index = [];

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use CrEOF\Spatial\PHP\Types\Geometry\Point; use CrEOF\Spatial\PHP\Types\Geometry\Point;
use DateTime; use DateTime;
@ -28,7 +28,7 @@ class ImportVehicleCompatibilityCommand extends Command
protected $bsize_index; protected $bsize_index;
protected $b_index; protected $b_index;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;
$this->vmfg_index = []; $this->vmfg_index = [];

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Vehicle; use App\Entity\Vehicle;
@ -15,7 +15,7 @@ class MergeDuplicateVehiclesCommand extends Command
{ {
protected $em; protected $em;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;

View file

@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\DBAL\Connection; use Doctrine\DBAL\Connection;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Service\JobOrderCache; use App\Service\JobOrderCache;
use App\Entity\JobOrder; use App\Entity\JobOrder;
use App\Ramcar\JOStatus; use App\Ramcar\JOStatus;
@ -21,7 +21,7 @@ class RefreshJobOrderCacheCommand extends Command
protected $em; protected $em;
protected $jo_cache; protected $jo_cache;
public function __construct(ObjectManager $om, JobOrderCache $jo_cache) public function __construct(EntityManagerInterface $om, JobOrderCache $jo_cache)
{ {
$this->em = $om; $this->em = $om;
$this->jo_cache = $jo_cache; $this->jo_cache = $jo_cache;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use DateTime; use DateTime;
@ -21,7 +21,7 @@ class ReportRiderTime extends Command
protected $jo_index; protected $jo_index;
protected $filtered_jo_index; protected $filtered_jo_index;
public function __construct(ObjectManager $em) public function __construct(EntityManagerInterface $em)
{ {
$this->em = $em; $this->em = $em;

View file

@ -6,7 +6,7 @@ use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Service\RedisClientProvider; use App\Service\RedisClientProvider;
@ -17,7 +17,7 @@ class SeedRiderSessionsCommand extends Command
protected $em; protected $em;
protected $redis; protected $redis;
public function __construct(ObjectManager $om, RedisClientProvider $redis) public function __construct(EntityManagerInterface $om, RedisClientProvider $redis)
{ {
$this->em = $om; $this->em = $om;
$this->redis = $redis->getRedisClient(); $this->redis = $redis->getRedisClient();

View file

@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Customer; use App\Entity\Customer;
use App\Entity\PrivacyPolicy; use App\Entity\PrivacyPolicy;
@ -22,7 +22,7 @@ class SetCustomerPrivacyPolicyCommand extends Command
private $policy_third_party_id; private $policy_third_party_id;
private $policy_mobile_id; private $policy_mobile_id;
public function __construct(ObjectManager $om, $policy_promo, public function __construct(EntityManagerInterface $om, $policy_promo,
$policy_third_party, $policy_mobile) $policy_third_party, $policy_mobile)
{ {
$this->em = $om; $this->em = $om;

View file

@ -7,8 +7,6 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager;
use App\Service\APNSClient; use App\Service\APNSClient;
use DateTime; use DateTime;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\JobOrder; use App\Entity\JobOrder;
@ -18,7 +18,7 @@ class UpdateCustomerVehicleBatteryCommand extends Command
protected $em; protected $em;
protected $custvehicle_hash; protected $custvehicle_hash;
public function __construct(ObjectManager $om) public function __construct(EntityManagerInterface $om)
{ {
$this->em = $om; $this->em = $om;
$this->custvehicle_hash = []; $this->custvehicle_hash = [];

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Warranty; use App\Entity\Warranty;
use App\Entity\CustomerVehicle; use App\Entity\CustomerVehicle;
@ -19,7 +19,7 @@ class UpdateCustomerVehicleWarrantyCommand extends Command
protected $em; protected $em;
protected $wh; protected $wh;
public function __construct(ObjectManager $em, WarrantyHandler $wh) public function __construct(EntityManagerInterface $em, WarrantyHandler $wh)
{ {
$this->em = $em; $this->em = $em;
$this->wh = $wh; $this->wh = $wh;

View file

@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Filesystem\Exception\IOExceptionInterface; use Symfony\Component\Filesystem\Exception\IOExceptionInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Rider; use App\Entity\Rider;
use App\Entity\Battery; use App\Entity\Battery;
@ -20,7 +20,7 @@ class UploadCleanupCommand extends Command
private $encoder_factory; private $encoder_factory;
private $object_manager; private $object_manager;
public function __construct(ObjectManager $om, Filesystem $fs, FileUploader $uploader) public function __construct(EntityManagerInterface $om, Filesystem $fs, FileUploader $uploader)
{ {
$this->object_manager = $om; $this->object_manager = $om;
$this->filesystem = $fs; $this->filesystem = $fs;

View file

@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\User; use App\Entity\User;
use App\Entity\Role; use App\Entity\Role;
@ -18,7 +18,7 @@ class UserCreateCommand extends Command
private $encoder_factory; private $encoder_factory;
private $object_manager; private $object_manager;
public function __construct(EncoderFactoryInterface $ef, ObjectManager $om) public function __construct(EncoderFactoryInterface $ef, EntityManagerInterface $om)
{ {
$this->encoder_factory = $ef; $this->encoder_factory = $ef;
$this->object_manager = $om; $this->object_manager = $om;