当前位置: 首页>>代码示例>>PHP>>正文


PHP AbstractPlatform::getMaxIdentifierLength方法代码示例

本文整理汇总了PHP中Doctrine\DBAL\Platforms\AbstractPlatform::getMaxIdentifierLength方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractPlatform::getMaxIdentifierLength方法的具体用法?PHP AbstractPlatform::getMaxIdentifierLength怎么用?PHP AbstractPlatform::getMaxIdentifierLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doctrine\DBAL\Platforms\AbstractPlatform的用法示例。


在下文中一共展示了AbstractPlatform::getMaxIdentifierLength方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createSchemaConfig

 /**
  * Create the configuration for this schema.
  *
  * @return SchemaConfig
  */
 public function createSchemaConfig()
 {
     $schemaConfig = new SchemaConfig();
     $schemaConfig->setExplicitForeignKeyIndexes($this->_platform->createsExplicitIndexForForeignKeys());
     $schemaConfig->setMaxIdentifierLength($this->_platform->getMaxIdentifierLength());
     return $schemaConfig;
 }
开发者ID:jacques-sounvi,项目名称:addressbook,代码行数:12,代码来源:AbstractSchemaManager.php

示例2: createSchemaConfig

 /**
  * Create the configuration for this schema.
  *
  * @return SchemaConfig
  */
 public function createSchemaConfig()
 {
     $schemaConfig = new SchemaConfig();
     $schemaConfig->setMaxIdentifierLength($this->_platform->getMaxIdentifierLength());
     $searchPaths = $this->getSchemaSearchPaths();
     if (isset($searchPaths[0])) {
         $schemaConfig->setName($searchPaths[0]);
     }
     return $schemaConfig;
 }
开发者ID:pollux1er,项目名称:dlawebdev2,代码行数:15,代码来源:AbstractSchemaManager.php

示例3: getColumnAlias

 public function getColumnAlias($columnName, $counter, AbstractPlatform $platform, ClassMetadata $class = null)
 {
     // 1 ) Concatenate column name and counter
     // 2 ) Trim the column alias to the maximum identifier length of the platform.
     //     If the alias is to long, characters are cut off from the beginning.
     // 3 ) Strip non alphanumeric characters
     // 4 ) Prefix with "_" if the result its numeric
     $columnName = $columnName . '_' . $counter;
     $columnName = substr($columnName, -$platform->getMaxIdentifierLength());
     $columnName = preg_replace('/[^A-Za-z0-9_]/', '', $columnName);
     $columnName = is_numeric($columnName) ? '_' . $columnName : $columnName;
     return $platform->getSQLResultCasing($columnName);
 }
开发者ID:luxifer,项目名称:doctrine-functions,代码行数:13,代码来源:QuotingStrategy.php

示例4: createSchemaConfig

 /**
  * Creates the configuration for this schema.
  *
  * @return \Doctrine\DBAL\Schema\SchemaConfig
  */
 public function createSchemaConfig()
 {
     $schemaConfig = new SchemaConfig();
     $schemaConfig->setMaxIdentifierLength($this->_platform->getMaxIdentifierLength());
     $searchPaths = $this->getSchemaSearchPaths();
     if (isset($searchPaths[0])) {
         $schemaConfig->setName($searchPaths[0]);
     }
     $params = $this->_conn->getParams();
     if (isset($params['defaultTableOptions'])) {
         $schemaConfig->setDefaultTableOptions($params['defaultTableOptions']);
     }
     return $schemaConfig;
 }
开发者ID:tamboer,项目名称:LaravelOctober,代码行数:19,代码来源:AbstractSchemaManager.php

示例5: createSchemaConfig

 /**
  * Create the configuration for this schema.
  *
  * @return SchemaConfig
  */
 public function createSchemaConfig()
 {
     $schemaConfig = new SchemaConfig();
     $schemaConfig->setMaxIdentifierLength($this->_platform->getMaxIdentifierLength());
     return $schemaConfig;
 }
开发者ID:jff15,项目名称:travelbot,代码行数:11,代码来源:AbstractSchemaManager.php

示例6: getColumnAlias

 /**
  * {@inheritdoc}
  */
 public function getColumnAlias($columnName, $counter, AbstractPlatform $platform, ClassMetadata $class = null)
 {
     // Trim the column alias to the maximum identifier length of the platform.
     // If the alias is to long, characters are cut off from the beginning.
     // And strip non alphanumeric characters
     $columnName = $columnName . $counter;
     $columnName = substr($columnName, -$platform->getMaxIdentifierLength());
     $columnName = preg_replace('/[^A-Za-z0-9_]/', '', $columnName);
     return $platform->getSQLResultCasing($columnName);
 }
开发者ID:laiello,项目名称:masfletes,代码行数:13,代码来源:DefaultQuoteStrategy.php

示例7: getSQLColumnAlias

 /**
  * Gets an SQL column alias for a column name.
  *
  * @param string $columnName
  * @return string
  */
 public function getSQLColumnAlias($columnName)
 {
     // Trim the column alias to the maximum identifier length of the platform.
     // If the alias is to long, characters are cut off from the beginning.
     return $this->_platform->getSQLResultCasing(substr($columnName . $this->_sqlAliasCounter++, -$this->_platform->getMaxIdentifierLength()));
 }
开发者ID:pabloasc,项目名称:test_social,代码行数:12,代码来源:BasicEntityPersister.php


注:本文中的Doctrine\DBAL\Platforms\AbstractPlatform::getMaxIdentifierLength方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。