News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Symfony Blog:
Batches are dead, long life to tasks!
June 16, 2008 @ 12:05:36

On the Symfony blog today, Romain Dorgueil shows how to create tasks to help automate things in your application like database updates, console scripts or other "repetitive maintenance tasks".

Symfony 1.1 extends symfony 1.0 pake tasks to create a powerful and uniform command line utility for your projects, fully integrated with the symfony Command Line Interface (CLI).

This means that is has the abilities to automatically support a "help" parameter, to grab a current task list the app is using, correct handling of the input parameters, set up a good environment and make sure that the source is readable. The post shows how to create a new task for your application - their examples are a "doNothingTask" that, well, does a lot of nothing and the typical "doHelloWorldTask" that just echoes.

They show how to define the task (including a namespace for it) and how to run it, outputing the results of the execute() method ("I did nothing successfully!" in the first case and a string of passed in parameters in the second.

0 comments voice your opinion now!
task batch tutorial symfony framework helloworld


blog comments powered by Disqus

Similar Posts

Richard Thomas' Blog: Solar Framework Shorts - Top 10 reasons to use Solar

PHPMaster.com: Mapping with Geocoder PHP and Leaflet.js

Daniel Vecchiato's Blog: Using Zend Framework components in Code Igniter

Ralph Schindler's Blog: Compiling Gearman (or anything) for Zend Server CE on Snow Leopard

Komunitasweb.com: CodeIgniter Tutorial - ORM with DataMapper


Community Events





Don't see your event here?
Let us know!


release voicesoftheelephpant composer series opinion community configure symfony podcast framework tool version interview unittest conference introduction laravel list api language

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework