当前位置: 首页>>代码示例>>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;未经允许,请勿转载。