M-Contributions /
Persistency
| 1 | <?php |
||
| 2 | declare(strict_types=1); |
||
| 3 | |||
| 4 | /** |
||
| 5 | * Entity Resource Class |
||
| 6 | * @package Ticaje_Persistence |
||
| 7 | * @author Hector Luis Barrientos <[email protected]> |
||
| 8 | */ |
||
| 9 | |||
| 10 | namespace Ticaje\Persistence\Entity\Resource; |
||
| 11 | |||
| 12 | use Magento\Framework\Model\ResourceModel\Db\AbstractDb; |
||
| 13 | use Magento\Framework\Model\ResourceModel\Db\Context as ParentContext; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Class Base |
||
| 17 | * @package Ticaje\Persistence\Entity\Resource |
||
| 18 | */ |
||
| 19 | class Base extends AbstractDb |
||
| 20 | { |
||
| 21 | private $tableName; |
||
| 22 | |||
| 23 | private $referenceId; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Base constructor. |
||
| 27 | * @param ParentContext $context |
||
| 28 | * @param null $connectionName |
||
|
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
| 29 | * @param string $tableName |
||
| 30 | * @param string $referenceId |
||
| 31 | */ |
||
| 32 | public function __construct( |
||
| 33 | ParentContext $context, |
||
| 34 | $connectionName = null, |
||
| 35 | string $tableName, |
||
| 36 | string $referenceId |
||
| 37 | ) { |
||
| 38 | $this->tableName = $tableName; |
||
| 39 | $this->referenceId = $referenceId; |
||
| 40 | parent::__construct($context, $connectionName); |
||
| 41 | } |
||
| 42 | |||
| 43 | protected function _construct() |
||
| 44 | { |
||
| 45 | $this->_init($this->tableName, $this->referenceId); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |