1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Changed commands to use command.name in the help

This commit is contained in:
Christophe Coevoet 2012-07-17 00:55:09 +02:00
parent 34ac207b3c
commit a723b73929
5 changed files with 18 additions and 22 deletions

View File

@ -27,7 +27,7 @@ use Symfony\Component\Console\Input\InputArgument,
/** /**
* Command to clear the metadata cache of the various cache drivers. * Command to clear the metadata cache of the various cache drivers.
* *
* *
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
@ -52,20 +52,19 @@ class MetadataCommand extends Console\Command\Command
) )
)); ));
$fullName = $this->getName();
$this->setHelp(<<<EOT $this->setHelp(<<<EOT
The <info>$fullName</info> command is meant to clear the metadata cache of associated Entity Manager. The <info>%command.name%</info> command is meant to clear the metadata cache of associated Entity Manager.
It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider
instance completely. instance completely.
The execution type differ on how you execute the command. The execution type differ on how you execute the command.
If you want to invalidate the entries (and not delete from cache instance), this command would do the work: If you want to invalidate the entries (and not delete from cache instance), this command would do the work:
<info>$fullName</info> <info>%command.name%</info>
Alternatively, if you want to flush the cache provider using this command: Alternatively, if you want to flush the cache provider using this command:
<info>$fullName --flush</info> <info>%command.name% --flush</info>
Finally, be aware that if <info>--flush</info> option is passed, not all cache providers are able to flush entries, Finally, be aware that if <info>--flush</info> option is passed, not all cache providers are able to flush entries,
because of a limitation of its execution nature. because of a limitation of its execution nature.

View File

@ -27,7 +27,7 @@ use Symfony\Component\Console\Input\InputArgument,
/** /**
* Command to clear the query cache of the various cache drivers. * Command to clear the query cache of the various cache drivers.
* *
* *
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
@ -52,20 +52,19 @@ class QueryCommand extends Console\Command\Command
) )
)); ));
$fullName = $this->getName();
$this->setHelp(<<<EOT $this->setHelp(<<<EOT
The <info>$fullName</info> command is meant to clear the query cache of associated Entity Manager. The <info>%command.name%</info> command is meant to clear the query cache of associated Entity Manager.
It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider
instance completely. instance completely.
The execution type differ on how you execute the command. The execution type differ on how you execute the command.
If you want to invalidate the entries (and not delete from cache instance), this command would do the work: If you want to invalidate the entries (and not delete from cache instance), this command would do the work:
<info>$fullName</info> <info>%command.name%</info>
Alternatively, if you want to flush the cache provider using this command: Alternatively, if you want to flush the cache provider using this command:
<info>$fullName --flush</info> <info>%command.name% --flush</info>
Finally, be aware that if <info>--flush</info> option is passed, not all cache providers are able to flush entries, Finally, be aware that if <info>--flush</info> option is passed, not all cache providers are able to flush entries,
because of a limitation of its execution nature. because of a limitation of its execution nature.

View File

@ -27,7 +27,7 @@ use Symfony\Component\Console\Input\InputArgument,
/** /**
* Command to clear the result cache of the various cache drivers. * Command to clear the result cache of the various cache drivers.
* *
* *
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
@ -52,20 +52,19 @@ class ResultCommand extends Console\Command\Command
) )
)); ));
$fullName = $this->getName();
$this->setHelp(<<<EOT $this->setHelp(<<<EOT
The <info>$fullName</info> command is meant to clear the result cache of associated Entity Manager. The <info>%command.name%</info> command is meant to clear the result cache of associated Entity Manager.
It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider
instance completely. instance completely.
The execution type differ on how you execute the command. The execution type differ on how you execute the command.
If you want to invalidate the entries (and not delete from cache instance), this command would do the work: If you want to invalidate the entries (and not delete from cache instance), this command would do the work:
<info>$fullName</info> <info>%command.name%</info>
Alternatively, if you want to flush the cache provider using this command: Alternatively, if you want to flush the cache provider using this command:
<info>$fullName --flush</info> <info>%command.name% --flush</info>
Finally, be aware that if <info>--flush</info> option is passed, not all cache providers are able to flush entries, Finally, be aware that if <info>--flush</info> option is passed, not all cache providers are able to flush entries,
because of a limitation of its execution nature. because of a limitation of its execution nature.

View File

@ -27,7 +27,7 @@ use Symfony\Component\Console\Command\Command;
/** /**
* Show information about mapped entities * Show information about mapped entities
* *
* *
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.1 * @since 2.1
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
@ -40,7 +40,7 @@ class InfoCommand extends Command
->setName('orm:info') ->setName('orm:info')
->setDescription('Show basic information about all mapped entities') ->setDescription('Show basic information about all mapped entities')
->setHelp(<<<EOT ->setHelp(<<<EOT
The <info>doctrine:mapping:info</info> shows basic information about which The <info>%command.name%</info> shows basic information about which
entities exist and possibly if their mapping information contains errors or entities exist and possibly if their mapping information contains errors or
not. not.
EOT EOT

View File

@ -29,7 +29,7 @@ use Symfony\Component\Console\Input\InputArgument,
* Command to generate the SQL needed to update the database schema to match * Command to generate the SQL needed to update the database schema to match
* the current mapping information. * the current mapping information.
* *
* *
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
@ -68,20 +68,19 @@ class UpdateCommand extends AbstractCommand
), ),
)); ));
$fullName = $this->getName();
$this->setHelp(<<<EOT $this->setHelp(<<<EOT
The <info>$fullName</info> command generates the SQL needed to The <info>%command.name%</info> command generates the SQL needed to
synchronize the database schema with the current mapping metadata of the synchronize the database schema with the current mapping metadata of the
default entity manager. default entity manager.
For example, if you add metadata for a new column to an entity, this command For example, if you add metadata for a new column to an entity, this command
would generate and output the SQL needed to add the new column to the database: would generate and output the SQL needed to add the new column to the database:
<info>$fullName --dump-sql</info> <info>%command.name% --dump-sql</info>
Alternatively, you can execute the generated queries: Alternatively, you can execute the generated queries:
<info>$fullName --force</info> <info>%command.name% --force</info>
Finally, be aware that if the <info>--complete</info> option is passed, this Finally, be aware that if the <info>--complete</info> option is passed, this
task will drop all database assets (e.g. tables, etc) that are *not* described task will drop all database assets (e.g. tables, etc) that are *not* described