| @@ 49-61 (lines=13) @@ | ||
| 46 | * @param string $prefix Prefix for the table name in DB |
|
| 47 | * @param ZohoChangeListener[] $listeners The list of listeners called when a record is inserted or updated. |
|
| 48 | */ |
|
| 49 | public function __construct(Connection $connection, ZohoUserService $zohoUserService, $prefix = 'zoho_', array $listeners = [], LoggerInterface $logger = null) |
|
| 50 | { |
|
| 51 | $this->connection = $connection; |
|
| 52 | $this->prefix = $prefix; |
|
| 53 | $this->listeners = $listeners; |
|
| 54 | if ($logger === null) { |
|
| 55 | $this->logger = new NullLogger(); |
|
| 56 | } else { |
|
| 57 | $this->logger = $logger; |
|
| 58 | } |
|
| 59 | $this->localChangesTracker = new LocalChangesTracker($connection, $this->logger); |
|
| 60 | $this->zohoUserService = $zohoUserService; |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * @throws \Doctrine\DBAL\DBALException |
|
| @@ 44-55 (lines=12) @@ | ||
| 41 | * @param Connection $connection |
|
| 42 | * @param string $prefix Prefix for the table name in DB |
|
| 43 | */ |
|
| 44 | public function __construct(Connection $connection, ZohoUserService $zohoUserService, $prefix = 'zoho_', LoggerInterface $logger = null) |
|
| 45 | { |
|
| 46 | $this->connection = $connection; |
|
| 47 | $this->prefix = $prefix; |
|
| 48 | if ($logger === null) { |
|
| 49 | $this->logger = new NullLogger(); |
|
| 50 | } else { |
|
| 51 | $this->logger = $logger; |
|
| 52 | } |
|
| 53 | $this->localChangesTracker = new LocalChangesTracker($connection, $this->logger); |
|
| 54 | $this->zohoUserService = $zohoUserService; |
|
| 55 | } |
|
| 56 | ||
| 57 | /** |
|
| 58 | * @param LoggerInterface $logger |
|