當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。