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
<?php | |
namespace tests\codeception\common\Lib\Connector; | |
use Yii; | |
/** | |
* Extended Codeception Yii2 Client: | |
* | |
* This custom class extends the original Codeception\Lib\Connector\Yii2 to |
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
<?php | |
namespace tests\codeception\common\Module; | |
use Codeception\Lib\Interfaces\ActiveRecord; | |
/** | |
* Extended Codeception Yii2 Module: | |
* | |
* This module provides integration with [Yii framework](http://www.yiiframework.com/) (2.0). | |
* This custom module extends the original Codeception\Module\Yii2 class to support Multiple DBs and Shared Transactions. |
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
<?php | |
namespace common\models\db; | |
/** | |
* AppActiveRecord: Extension of ActiveRecord class to override the static populateRecord function for performance. | |
*/ | |
class AppActiveRecord extends \yii\db\ActiveRecord | |
{ | |
/** | |
* Override private BaseActiveRecord->_attributes for use by overridden populateRecord function below. |
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
<?php | |
namespace common\models\db; | |
class AppActiveRecord extends \yii\db\ActiveRecord | |
{ | |
/** | |
* Override the \yii\db\ActiveRecord::find() static function to allow passing in an array of configuration properties. | |
* Also, return a custom AppActiveQuery object that overrides functionality of ActiveQuery and allows Caching. | |
* | |
* @param Array|null $config The array of key value pairs to set the ActiveQuery properties on construction. |
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
<?php | |
namespace common\models\db; | |
class AppActiveQuery extends \yii\db\ActiveQuery | |
{ | |
private $cacheDuration = null; | |
private $functionName = ''; | |
private $q = null; | |
/** |