-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da0baa1
commit 3b27549
Showing
8 changed files
with
59 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,43 @@ | ||
<?php | ||
|
||
namespace ZfcBase\Db\Adapter; | ||
|
||
use Zend\Db\Adapter\Adapter; | ||
use Zend\Db\Adapter\Platform; | ||
use Zend\Db\ResultSet; | ||
|
||
class MasterSlaveAdapter extends Adapter implements MasterSlaveAdapterInterface | ||
{ | ||
/** | ||
* slave adapter | ||
* | ||
* @var Adapter | ||
*/ | ||
protected $slaveAdapter; | ||
|
||
/** | ||
* @param Adapter $slaveAdapter | ||
* @param Driver\DriverInterface|array $driver | ||
* @param Platform\PlatformInterface $platform | ||
* @param ResultSet\ResultSet $queryResultPrototype | ||
*/ | ||
public function __construct(Adapter $slaveAdapter, $driver, | ||
Platform\PlatformInterface $platform = null, | ||
ResultSet\ResultSetInterface $queryResultPrototype = null) | ||
{ | ||
$this->slaveAdapter = $slaveAdapter; | ||
parent::__construct($driver, $platform, $queryResultPrototype); | ||
} | ||
|
||
/** | ||
* get slave adapter | ||
* | ||
* @return Adapter | ||
*/ | ||
public function getSlaveAdapter() | ||
{ | ||
return $this->slaveAdapter; | ||
} | ||
} | ||
<?php | ||
|
||
namespace ZfcBase\Db\Adapter; | ||
|
||
use Zend\Db\Adapter\Adapter; | ||
use Zend\Db\Adapter\Platform; | ||
use Zend\Db\ResultSet; | ||
|
||
class MasterSlaveAdapter extends Adapter implements MasterSlaveAdapterInterface | ||
{ | ||
/** | ||
* slave adapter | ||
* | ||
* @var Adapter | ||
*/ | ||
protected $slaveAdapter; | ||
|
||
/** | ||
* @param Adapter $slaveAdapter | ||
* @param Driver\DriverInterface|array $driver | ||
* @param Platform\PlatformInterface $platform | ||
* @param ResultSet\ResultSet $queryResultPrototype | ||
*/ | ||
public function __construct( | ||
Adapter $slaveAdapter, | ||
$driver, | ||
Platform\PlatformInterface $platform = null, | ||
ResultSet\ResultSetInterface $queryResultPrototype = null | ||
) { | ||
$this->slaveAdapter = $slaveAdapter; | ||
parent::__construct($driver, $platform, $queryResultPrototype); | ||
} | ||
|
||
/** | ||
* get slave adapter | ||
* | ||
* @return Adapter | ||
*/ | ||
public function getSlaveAdapter() | ||
{ | ||
return $this->slaveAdapter; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
namespace ZfcBase\Mapper\Exception; | ||
|
||
interface ExceptionInterface | ||
{} | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,3 @@ public function testSetEventManagerWorks() | |
$this->assertSame($this->form->getEventManager(), $em); | ||
} | ||
} | ||
|