Пример #1
0
 public function testConnectorInstanceFromConnectSingleton()
 {
     $dbo_conn = DboSource::connect(array_merge(array('connector' => 'oracle'), self::$dataSource));
     $connector = $dbo_conn->getConnector()->openConnection();
     $this->assertInstanceOf('ActiveOracle\\Connector\\OracleConnector', $connector);
     $this->assertTrue($connector->isConnected());
     $result = $dbo_conn->fetch('select * from hr.regions');
     $this->assertInternalType('array', $result);
     $result = $dbo_conn->fetch('select * from hr.regions', 'object');
     $this->assertInstanceOf('ItemIterator\\ItemIterator', $result);
 }
Пример #2
0
 public static function connect($dataSource = null)
 {
     return parent::connect($dataSource);
 }