vendor/doctrine/doctrine-bundle/Command/GenerateEntitiesDoctrineCommand.php
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/*
* This file is part of the Doctrine Bundle
*
* The code was originally distributed inside the Symfony framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
* (c) Doctrine Project, Benjamin Eberlei <kontakt@beberlei.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Doctrine\Bundle\DoctrineBundle\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\ORM\Tools\EntityRepositoryGenerator;
use Doctrine\Bundle\DoctrineBundle\Mapping\DisconnectedMetadataFactory;
/**
* Generate entity classes from mapping information
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jonathan H. Wage <jonwage@gmail.com>
*/
class GenerateEntitiesDoctrineCommand extends DoctrineCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
{
$this
->setName('doctrine:generate:entities')
->setAliases(array('generate:doctrine:entities'))
->setDescription('Generates entity classes and method stubs from your mapping information')
->addArgument('name', InputArgument::REQUIRED, 'A bundle name, a namespace, or a class name')
->addOption('path', null, InputOption::VALUE_REQUIRED, 'The path where to generate entities when it cannot be guessed')
->addOption('no-backup', null, InputOption::VALUE_NONE, 'Do not backup existing entities files.')
->setHelp(<<<EOT
The <info>%command.name%</info> command generates entity classes
and method stubs from your mapping information:
You have to limit generation of entities:
* To a bundle:
<info>php %command.full_name% MyCustomBundle</info>
* To a single entity:
<info>php %command.full_name% MyCustomBundle:User</info>
<info>php %command.full_name% MyCustomBundle/Entity/User</info>
* To a namespace
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。