Example #1
0
 public function __construct(RActiveRecord $record)
 {
     $this->_record = $record;
     $serviceContainer = \Repel\Repel::getServiceContainer();
     $connection = $serviceContainer->getConnectionManager($this->_record->_DATABASE)->getConnection();
     $this->PDO = $connection->PDOInstance;
     return $this;
 }
Example #2
0
 public function __construct($record = null)
 {
     $serviceContainer = \Repel\Repel::getServiceContainer();
     if ($record !== null) {
         $key = $record->_DATABASE;
     } else {
         $key = 'primary';
     }
     $connection = $serviceContainer->getConnectionManager($key)->getConnection();
     $this->PDO = $connection->PDOInstance;
     $serviceContainer->setTransaction($connection->getDriver(), $this);
 }
Example #3
0
 public function getFormatters()
 {
     $serviceContainer = \Repel\Repel::getServiceContainer();
     return $serviceContainer->getFormatters();
 }