當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DatabaseManager::getDoctrineSchemaManager方法代碼示例

本文整理匯總了PHP中Illuminate\Database\DatabaseManager::getDoctrineSchemaManager方法的典型用法代碼示例。如果您正苦於以下問題:PHP DatabaseManager::getDoctrineSchemaManager方法的具體用法?PHP DatabaseManager::getDoctrineSchemaManager怎麽用?PHP DatabaseManager::getDoctrineSchemaManager使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Database\DatabaseManager的用法示例。


在下文中一共展示了DatabaseManager::getDoctrineSchemaManager方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setupTables

 private function setupTables()
 {
     if (!is_null($this->tables)) {
         $this->tables = explode(',', $this->tables);
     } else {
         $schema = $this->db->getDoctrineSchemaManager();
         $this->tables = $schema->listTableNames();
     }
 }
開發者ID:kreshnik,項目名稱:dbtruncate,代碼行數:9,代碼來源:DatabaseTruncateCommand.php

示例2: getColumns

 /**
  * Fetch the table fields for the class.
  *
  * @param  string $tableName
  * @return array
  */
 public function getColumns($tableName)
 {
     // We only want to fetch the table details
     // once. We'll store these fields with a
     // $columns property for future fetching.
     if (isset(static::$columns[$this->tableName])) {
         return static::$columns[$this->tableName];
     }
     // This will only run the first time the factory is created.
     return static::$columns[$this->tableName] = $this->db->getDoctrineSchemaManager()->listTableDetails($tableName)->getColumns();
 }
開發者ID:ngogiangthanh,項目名稱:code-nien-luan-ktpm-k36,代碼行數:17,代碼來源:Factory.php

示例3: getColumns

 /**
  * Fetch the table fields for the class.
  *
  * @param  string $tableName
  * @return array
  */
 public function getColumns($tableName)
 {
     // We only want to fetch the table details
     // once. We'll store these fields with a
     // $columns property for future fetching.
     if (isset(static::$columns[$this->tableName])) {
         return static::$columns[$this->tableName];
     }
     $schema_manager = $this->db->getDoctrineSchemaManager($tableName);
     // map enum and set to string, since they are not supported yet by doctrine
     $schema_manager->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
     $schema_manager->getDatabasePlatform()->registerDoctrineTypeMapping('set', 'string');
     // This will only run the first time the factory is created.
     return static::$columns[$this->tableName] = $schema_manager->listTableColumns($tableName);
 }
開發者ID:IevgenKachioni,項目名稱:Laravel-Test-Helpers,代碼行數:21,代碼來源:Factory.php

示例4: initializeTruncate

 private function initializeTruncate()
 {
     $schema = $this->db->getDoctrineSchemaManager();
     $tables = $schema->listTableNames();
     $this->truncateTables($tables);
 }
開發者ID:Kreshnik,項目名稱:ninjecture,代碼行數:6,代碼來源:DatabaseTruncateCommand.php


注:本文中的Illuminate\Database\DatabaseManager::getDoctrineSchemaManager方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。