Dibi\Connection::getDatabaseInfo PHP 메소드

getDatabaseInfo() 공개 메소드

Gets a information about the current database.
public getDatabaseInfo ( ) : Dibi\Reflection\Database
리턴 Dibi\Reflection\Database
    public function getDatabaseInfo()
    {
        $this->connected || $this->connect();
        return new Reflection\Database($this->driver->getReflector(), isset($this->config['database']) ? $this->config['database'] : NULL);
    }

Usage Example

예제 #1
0
파일: BaseMapper.php 프로젝트: svatekr/rsrs
 /**
  * @return mixed
  */
 private function getPrimaryKey()
 {
     $primaryKey = $this->db->getDatabaseInfo()->getTable($this->tableName)->getPrimaryKey()->getColumns();
     return $primaryKey[0]->name;
 }