예제 #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;
 }
예제 #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);
 }
예제 #3
0
 public function getFormatters()
 {
     $serviceContainer = \Repel\Repel::getServiceContainer();
     return $serviceContainer->getFormatters();
 }