Permalink
Browse files

Added creating a file to run the Application/Commands

  • Loading branch information...
1 parent 22c88f1 commit 929e54fb3b1b5c74cca66523c4b913c9d0c25fef @richardmiller richardmiller committed Feb 14, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 components/console.rst
View
@@ -68,6 +68,22 @@ add the following to it::
}
}
+You also need to create the file to run at the command line which creates
+an ``Application`` and adds commands to it:
+
+.. code-block::php
+
+ #!/usr/bin/env php
+ # app/console
+ <?php
+
+ use Acme\DemoBundle\Command\GreetCommand;
+ use Symfony\Component\Console\Application;
+
+ $application = new Application();
+ $application->add(new GreetCommand);
+ $application->run();
+
Test the new console command by running the following
.. code-block:: bash

0 comments on commit 929e54f

Please sign in to comment.