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