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


PHP ClassMetadataInfo::setIdGeneratorType方法代碼示例

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


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

示例1: testPrefixAddedToSequence

 public function testPrefixAddedToSequence()
 {
     $this->metadata->setSequenceGeneratorDefinition(['sequenceName' => 'bar']);
     $this->metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE);
     $tablePrefix = new TablePrefixListener('someprefix_');
     $tablePrefix->loadClassMetadata($this->args);
     $this->assertEquals('someprefix_foo', $this->metadata->getTableName());
 }
開發者ID:jee7,項目名稱:orm,代碼行數:8,代碼來源:TablePrefixTest.php

示例2: execute

 /**
  * @throws \InvalidArgumentException When the bundle doesn't end with Bundle (Example: "Bundle\MySampleBundle")
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $bundle = $this->getApplication()->getKernel()->getBundle($input->getArgument('bundle'));
     $entity = str_replace('/', '\\', $input->getArgument('entity'));
     $fullEntityClassName = $bundle->getNamespace() . '\\Entity\\' . $entity;
     $mappingType = $input->getOption('mapping-type');
     $class = new ClassMetadataInfo($fullEntityClassName);
     $class->mapField(array('fieldName' => 'id', 'type' => 'integer', 'id' => true));
     $class->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO);
     // Map the specified fields
     $fields = $input->getOption('fields');
     if ($fields) {
         $e = explode(' ', $fields);
         foreach ($e as $value) {
             $e = explode(':', $value);
             $name = $e[0];
             if (strlen($name)) {
                 $type = isset($e[1]) ? $e[1] : 'string';
                 preg_match_all('/(.*)\\((.*)\\)/', $type, $matches);
                 $type = isset($matches[1][0]) ? $matches[1][0] : $type;
                 $length = isset($matches[2][0]) ? $matches[2][0] : null;
                 $class->mapField(array('fieldName' => $name, 'type' => $type, 'length' => $length));
             }
         }
     }
     // Setup a new exporter for the mapping type specified
     $cme = new ClassMetadataExporter();
     $exporter = $cme->getExporter($mappingType);
     $entityPath = $bundle->getPath() . '/Entity/' . str_replace('\\', '/', $entity) . '.php';
     if (file_exists($entityPath)) {
         throw new \RuntimeException(sprintf("Entity %s already exists.", $class->name));
     }
     if ('annotation' === $mappingType) {
         $exporter->setEntityGenerator($this->getEntityGenerator());
         $entityCode = $exporter->exportClassMetadata($class);
         $mappingPath = $mappingCode = false;
     } else {
         $mappingType = 'yaml' == $mappingType ? 'yml' : $mappingType;
         $mappingPath = $bundle->getPath() . '/Resources/config/doctrine/' . str_replace('\\', '.', $fullEntityClassName) . '.orm.' . $mappingType;
         $mappingCode = $exporter->exportClassMetadata($class);
         $entityGenerator = $this->getEntityGenerator();
         $entityCode = $entityGenerator->generateEntityClass($class);
         if (file_exists($mappingPath)) {
             throw new \RuntimeException(sprintf("Cannot generate entity when mapping <info>%s</info> already exists", $mappingPath));
         }
     }
     $output->writeln(sprintf('Generating entity for "<info>%s</info>"', $bundle->getName()));
     $output->writeln(sprintf('  > entity <comment>%s</comment> into <info>%s</info>', $fullEntityClassName, $entityPath));
     if (!is_dir($dir = dirname($entityPath))) {
         mkdir($dir, 0777, true);
     }
     file_put_contents($entityPath, $entityCode);
     if ($mappingPath) {
         $output->writeln(sprintf('  > mapping into <info>%s</info>', $mappingPath));
         if (!is_dir($dir = dirname($mappingPath))) {
             mkdir($dir, 0777, true);
         }
         file_put_contents($mappingPath, $mappingCode);
     }
 }
開發者ID:rfc1483,項目名稱:blog,代碼行數:63,代碼來源:GenerateEntityDoctrineCommand.php

示例3: loadMetadata

 public static function loadMetadata(ClassMetadataInfo $metadata)
 {
     $metadata->mapField(array('id' => true, 'fieldName' => 'id', 'type' => 'string'));
     $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_CUSTOM);
     $metadata->setCustomGeneratorDefinition(array('class' => 'Doctrine\\Tests\\ORM\\Functional\\Ticket\\DDC2415Generator'));
     $metadata->isMappedSuperclass = true;
 }
開發者ID:selimcr,項目名稱:servigases,代碼行數:7,代碼來源:DDC2415Test.php

示例4: loadMetadata

 /**
  * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata
  */
 public static function loadMetadata(ORM\ClassMetadataInfo $metadata)
 {
     $metadata->setTableName('page');
     $metadata->setIdGeneratorType(ORM\ClassMetadataInfo::GENERATOR_TYPE_NONE);
     $metadata->setCustomRepositoryClass('Orm\\Repository\\PageRepository');
     $metadata->addLifecycleCallback('setTemplatecontentChecksumOnUpdate', 'prePersist');
     $metadata->addLifecycleCallback('setTemplatecontentChecksumOnUpdate', 'preUpdate');
     $metadata->addLifecycleCallback('setLastupdateToNow', 'prePersist');
     $metadata->addLifecycleCallback('setLastupdateToNow', 'preUpdate');
     $metadata->mapField(array('id' => true, 'fieldName' => 'id', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('id' => true, 'fieldName' => 'websiteid', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'templateid', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'mediaid', 'type' => 'string', 'length' => 255, 'nullable' => true));
     $metadata->mapField(array('fieldName' => 'name', 'type' => 'string', 'length' => 255));
     $metadata->mapField(array('fieldName' => 'description', 'type' => 'text'));
     $metadata->mapField(array('fieldName' => 'date', 'type' => 'bigint', 'length' => 20));
     $metadata->mapField(array('fieldName' => 'innavigation', 'type' => 'smallint', 'length' => 1));
     $metadata->mapField(array('fieldName' => 'navigationtitle', 'type' => 'string', 'length' => 255));
     $metadata->mapField(array('fieldName' => 'content', 'type' => 'text'));
     $metadata->mapField(array('fieldName' => 'templatecontent', 'type' => 'text'));
     $metadata->mapField(array('fieldName' => 'templatecontentchecksum', 'type' => 'string', 'length' => 255));
     $metadata->mapField(array('fieldName' => 'globalcontent', 'type' => 'text', 'nullable' => true));
     $metadata->mapField(array('fieldName' => 'pagetype', 'type' => 'string', 'length' => 255, 'nullable' => true));
     $metadata->mapField(array('fieldName' => 'pageattributes', 'type' => 'text', 'nullable' => true));
     $metadata->mapField(array('fieldName' => 'lastupdate', 'type' => 'bigint', 'default' => 0));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:29,代碼來源:Page.php

示例5: loadMetadata

 public static function loadMetadata(\Doctrine\ORM\Mapping\ClassMetadataInfo $metadata)
 {
     $metadata->mapField(array('id' => true, 'fieldName' => 'id', 'type' => 'integer', 'columnName' => 'id'));
     $metadata->mapField(array('fieldName' => 'value', 'type' => 'float'));
     $metadata->isMappedSuperclass = true;
     $metadata->setCustomRepositoryClass("Doctrine\\Tests\\Models\\DDC869\\DDC869PaymentRepository");
     $metadata->setIdGeneratorType(\Doctrine\ORM\Mapping\ClassMetadataInfo::GENERATOR_TYPE_AUTO);
 }
開發者ID:Herriniaina,項目名稱:iVarotra,代碼行數:8,代碼來源:DDC869Payment.php

示例6: loadMetadata

 /**
  * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata
  */
 public static function loadMetadata(ORM\ClassMetadataInfo $metadata)
 {
     $metadata->setTableName('user_status');
     $metadata->setIdGeneratorType(ORM\ClassMetadataInfo::GENERATOR_TYPE_NONE);
     $metadata->setCustomRepositoryClass('Orm\\Repository\\UserStatusRepository');
     $metadata->mapField(array('id' => true, 'fieldName' => 'userid', 'type' => 'string', 'length' => 255));
     $metadata->mapField(array('id' => true, 'fieldName' => 'authbackend', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'lastlogin', 'type' => 'datetime'));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:12,代碼來源:UserStatus.php

示例7: loadMetadata

 /**
  * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata
  */
 public static function loadMetadata(ORM\ClassMetadataInfo $metadata)
 {
     $metadata->setTableName('user_opt_in');
     $metadata->setIdGeneratorType(ORM\ClassMetadataInfo::GENERATOR_TYPE_NONE);
     $metadata->setCustomRepositoryClass('Orm\\Repository\\OptInRepository');
     $metadata->mapField(array('id' => true, 'fieldName' => 'userid', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('id' => true, 'unique' => true, 'fieldName' => 'code', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'timestamp', 'type' => 'datetime'));
     $metadata->mapField(array('fieldName' => 'mode', 'type' => 'string', 'length' => 100));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:13,代碼來源:OptIn.php

示例8: execute

 /**
  * @throws \InvalidArgumentException When the bundle doesn't end with Bundle (Example: "Bundle\MySampleBundle")
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if (!preg_match('/Bundle$/', $bundle = $input->getArgument('bundle'))) {
         throw new \InvalidArgumentException('The bundle name must end with Bundle. Example: "Bundle\\MySampleBundle".');
     }
     $dirs = $this->container->get('kernel')->getBundleDirs();
     $tmp = str_replace('\\', '/', $bundle);
     $namespace = str_replace('/', '\\', dirname($tmp));
     $bundle = basename($tmp);
     if (!isset($dirs[$namespace])) {
         throw new \InvalidArgumentException(sprintf('Unable to initialize the bundle entity (%s not defined).', $namespace));
     }
     $entity = $input->getArgument('entity');
     $entityNamespace = $namespace . '\\' . $bundle . '\\Entity';
     $fullEntityClassName = $entityNamespace . '\\' . $entity;
     $tmp = str_replace('\\', '/', $fullEntityClassName);
     $tmp = str_replace('/', '\\', dirname($tmp));
     $className = basename($tmp);
     $mappingType = $input->getOption('mapping-type');
     $mappingType = $mappingType ? $mappingType : 'xml';
     $class = new ClassMetadataInfo($fullEntityClassName);
     $class->mapField(array('fieldName' => 'id', 'type' => 'integer', 'id' => true));
     $class->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO);
     // Map the specified fields
     $fields = $input->getOption('fields');
     if ($fields) {
         $e = explode(' ', $fields);
         foreach ($e as $value) {
             $e = explode(':', $value);
             $name = $e[0];
             $type = isset($e[1]) ? $e[1] : 'string';
             preg_match_all('/(.*)\\((.*)\\)/', $type, $matches);
             $type = isset($matches[1][0]) ? $matches[1][0] : $type;
             $length = isset($matches[2][0]) ? $matches[2][0] : null;
             $class->mapField(array('fieldName' => $name, 'type' => $type, 'length' => $length));
         }
     }
     // Setup a new exporter for the mapping type specified
     $cme = new ClassMetadataExporter();
     $exporter = $cme->getExporter($mappingType);
     if ('annotation' === $mappingType) {
         $path = $dirs[$namespace] . '/' . $bundle . '/Entity/' . str_replace($entityNamespace . '\\', null, $fullEntityClassName) . '.php';
         $exporter->setEntityGenerator($this->getEntityGenerator());
     } else {
         $mappingType = 'yaml' == $mappingType ? 'yml' : $mappingType;
         $path = $dirs[$namespace] . '/' . $bundle . '/Resources/config/doctrine/metadata/orm/' . str_replace('\\', '.', $fullEntityClassName) . '.dcm.' . $mappingType;
     }
     $code = $exporter->exportClassMetadata($class);
     if (!is_dir($dir = dirname($path))) {
         mkdir($dir, 0777, true);
     }
     $output->writeln(sprintf('Generating entity for "<info>%s</info>"', $bundle));
     $output->writeln(sprintf('  > generating <comment>%s</comment>', $fullEntityClassName));
     file_put_contents($path, $code);
 }
開發者ID:notbrain,項目名稱:symfony,代碼行數:58,代碼來源:GenerateEntityDoctrineCommand.php

示例9: loadMetadata

 /**
  * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata
  */
 public static function loadMetadata(ORM\ClassMetadataInfo $metadata)
 {
     $metadata->setTableName('album');
     $metadata->setIdGeneratorType(ORM\ClassMetadataInfo::GENERATOR_TYPE_NONE);
     $metadata->setCustomRepositoryClass('Orm\\Repository\\AlbumRepository');
     $metadata->addLifecycleCallback('setLastupdateToNow', 'prePersist');
     $metadata->addLifecycleCallback('setLastupdateToNow', 'preUpdate');
     $metadata->mapField(array('id' => true, 'fieldName' => 'id', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('id' => true, 'fieldName' => 'websiteid', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'name', 'type' => 'string', 'length' => 255));
     $metadata->mapField(array('fieldName' => 'lastupdate', 'type' => 'bigint', 'default' => 0));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:15,代碼來源:Album.php

示例10: generateTranslatableEntity

 public function generateTranslatableEntity(BundleInterface $bundle, $translatableEntity, $translationEntity, $format, array $fields, array $translatableFields, $withRepository)
 {
     // configure the bundle (needed if the bundle does not contain any Entities yet)
     $config = $this->registry->getManager(null)->getConfiguration();
     $config->setEntityNamespaces(array_merge(array($bundle->getName() => $bundle->getNamespace() . '\\Entity'), $config->getEntityNamespaces()));
     $translatableEntityClass = $this->registry->getAliasNamespace($bundle->getName()) . '\\' . $translatableEntity;
     $translationEntityClass = $this->registry->getAliasNamespace($bundle->getName()) . '\\' . $translationEntity;
     $translatableEntityPath = $bundle->getPath() . '/Entity/' . str_replace('\\', '/', $translatableEntity) . '.php';
     if (file_exists($translatableEntityPath)) {
         throw new \RuntimeException(sprintf('Entity "%s" already exists.', $translatableEntityClass));
     }
     $translatableClass = new ClassMetadataInfo($translatableEntityClass);
     $translationClass = new ClassMetadataInfo($translationEntityClass);
     if ($withRepository) {
         $translatableClass->customRepositoryClassName = $translatableEntityClass . 'Repository';
     }
     $translatableClass->mapField(array('fieldName' => 'id', 'type' => 'integer', 'id' => true));
     $translatableClass->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO);
     foreach ($fields as $field) {
         $translatableClass->mapField($field);
     }
     foreach ($translatableFields as $translatableField) {
         $translationClass->mapField($translatableField);
     }
     $entityGenerator = $this->getEntityGenerator();
     $entityGenerator->setClassToExtend('Prezent\\Doctrine\\Translatable\\Entity\\AbstractTranslatable');
     if ('annotation' === $format) {
         $entityGenerator->setGenerateAnnotations(true);
         $entityCode = $entityGenerator->generateTranslatableEntityClass($translatableClass, $translationClass);
         $mappingPath = $mappingCode = false;
     } else {
         $cme = new ClassMetadataExporter();
         $exporter = $cme->getExporter('yml' == $format ? 'yaml' : $format);
         $mappingPath = $bundle->getPath() . '/Resources/config/doctrine/' . str_replace('\\', '.', $translatableEntity) . '.orm.' . $format;
         if (file_exists($mappingPath)) {
             throw new \RuntimeException(sprintf('Cannot generate entity when mapping "%s" already exists.', $mappingPath));
         }
         $mappingCode = $exporter->exportClassMetadata($translatableClass);
         $entityGenerator->setGenerateAnnotations(false);
         $entityCode = $entityGenerator->generateTranslatableEntityClass($translatableClass, $translationClass);
     }
     $this->filesystem->mkdir(dirname($translatableEntityPath));
     file_put_contents($translatableEntityPath, $entityCode);
     if ($mappingPath) {
         $this->filesystem->mkdir(dirname($mappingPath));
         file_put_contents($mappingPath, $mappingCode);
     }
     if ($withRepository) {
         $path = $bundle->getPath() . str_repeat('/..', substr_count(get_class($bundle), '\\'));
         $this->getRepositoryGenerator()->writeEntityRepositoryClass($translatableClass->customRepositoryClassName, $path);
     }
 }
開發者ID:orkestro,項目名稱:orkestro,代碼行數:52,代碼來源:OrkestroEntityGenerator.php

示例11: loadMetadata

 /**
  * @param Doctrine\ORM\Mapping\ClassMetadataInfo $metadata
  */
 public static function loadMetadata(ORM\ClassMetadataInfo $metadata)
 {
     $metadata->setTableName('locks');
     $metadata->setIdGeneratorType(ORM\ClassMetadataInfo::GENERATOR_TYPE_NONE);
     $metadata->setCustomRepositoryClass('Orm\\Repository\\LockRepository');
     $metadata->mapField(array('fieldName' => 'userid', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'runid', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('id' => true, 'fieldName' => 'itemid', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('id' => true, 'fieldName' => 'websiteid', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('id' => true, 'fieldName' => 'type', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'starttime', 'type' => 'string', 'length' => 20));
     $metadata->mapField(array('fieldName' => 'lastactivity', 'type' => 'string', 'length' => 20));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:16,代碼來源:Lock.php

示例12: create

 /**
  * Creates an entity.
  *
  * @static
  */
 public static function create($name, $path, array $fields, $annotationPrefix = 'ORM\\')
 {
     self::$annotationPrefix = $annotationPrefix;
     self::$name = $name;
     self::$path = $path;
     self::$fields = $fields;
     $class = new ClassMetadataInfo(self::$name);
     $class->mapField(array('fieldName' => 'id', 'type' => 'integer', 'id' => true));
     $class->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO);
     foreach (self::$fields as $field) {
         $class->mapField($field);
     }
     file_put_contents(self::$path, self::getEntityGenerator()->generateEntityClass($class));
 }
開發者ID:chalasr,項目名稱:doctrine-test-util,代碼行數:19,代碼來源:EntityCreator.php

示例13: loadMetadata

 /**
  * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata
  */
 public static function loadMetadata(\Doctrine\ORM\Mapping\ClassMetadataInfo $metadata)
 {
     $metadata->setTableName('user_group');
     $metadata->setIdGeneratorType(\Doctrine\ORM\Mapping\ClassMetadataInfo::GENERATOR_TYPE_NONE);
     $metadata->setCustomRepositoryClass('Orm\\Repository\\GroupRepository');
     $metadata->addLifecycleCallback('setLastupdateToNow', 'prePersist');
     $metadata->addLifecycleCallback('setLastupdateToNow', 'preUpdate');
     $metadata->mapField(array('id' => true, 'fieldName' => 'id', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('id' => true, 'fieldName' => 'websiteid', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'name', 'type' => 'string', 'length' => 255));
     $metadata->mapField(array('fieldName' => 'rights', 'type' => 'text', 'nullable' => true));
     $metadata->mapField(array('fieldName' => 'users', 'type' => 'text'));
     $metadata->mapField(array('fieldName' => 'lastupdate', 'type' => 'bigint', 'default' => 0));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:17,代碼來源:Group.php

示例14: loadMetadata

 /**
  * @param Doctrine\ORM\Mapping\ClassMetadataInfo $metadata
  */
 public static function loadMetadata(ORM\ClassMetadataInfo $metadata)
 {
     $metadata->setTableName('action_log');
     $metadata->setIdGeneratorType(ORM\ClassMetadataInfo::GENERATOR_TYPE_IDENTITY);
     $metadata->setCustomRepositoryClass('Orm\\Repository\\ActionLogRepository');
     $metadata->mapField(array('id' => true, 'fieldName' => 'logid', 'type' => 'integer', 'generatedValue' => true));
     $metadata->mapField(array('fieldName' => 'websiteid', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'id', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'name', 'type' => 'string', 'length' => 255));
     $metadata->mapField(array('fieldName' => 'timestamp', 'type' => 'string', 'length' => 20));
     $metadata->mapField(array('fieldName' => 'userlogin', 'type' => 'string', 'length' => 255));
     $metadata->mapField(array('fieldName' => 'action', 'type' => 'string', 'length' => 255));
     $metadata->mapField(array('fieldName' => 'additionalinfo', 'type' => 'text', 'nullable' => true));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:17,代碼來源:ActionLog.php

示例15: loadMetadata

 /**
  * @param Doctrine\ORM\Mapping\ClassMetadataInfo $metadata
  */
 public static function loadMetadata(ORM\ClassMetadataInfo $metadata)
 {
     $metadata->setTableName('ticket');
     $metadata->setIdGeneratorType(ORM\ClassMetadataInfo::GENERATOR_TYPE_NONE);
     $metadata->setCustomRepositoryClass('Orm\\Repository\\TicketRepository');
     $metadata->mapField(array('id' => true, 'fieldName' => 'id', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'timestamp', 'type' => 'integer', 'length' => 11));
     $metadata->mapField(array('fieldName' => 'websiteid', 'type' => 'string', 'length' => 100));
     $metadata->mapField(array('fieldName' => 'isredirect', 'type' => 'boolean'));
     $metadata->mapField(array('fieldName' => 'isget', 'type' => 'boolean'));
     $metadata->mapField(array('fieldName' => 'requestconfig', 'type' => 'text'));
     $metadata->mapField(array('fieldName' => 'ticketlifetime', 'type' => 'integer'));
     $metadata->mapField(array('fieldName' => 'remainingcalls', 'type' => 'integer'));
     $metadata->mapField(array('fieldName' => 'sessionlifetime', 'type' => 'integer', 'nullable' => true));
     $metadata->mapField(array('fieldName' => 'credentials', 'type' => 'text', 'nullable' => true));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:19,代碼來源:Ticket.php


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