A Gentile Introduction to Symfony
The Definitive Guid to Symfony
The Symfony 1.4 Reference Book
Customizing the Web Debug Toolbar
The Definitive Guide to Symfony
// From an action
$this->debugMessage($message, 'err');
// From a view
<?php use_helper('Debug'); debug_message($message) ?>
// or
<?php use_helper('Debug'); log_message($message, 'err') ?>
// From a controller
$this->getLogger()->alert($message);
// From anywhere
echo("<pre>".$message."</pre>\n"); exit();
sfContext::getInstance()->getRouting()->getCurrentRouteName(); #=> 'default_index'
// From controller
$this->getRequest()->getPathInfo(); #=> '/home'
sfConfig::get('sf_environment') #=> 'test'
$task = new nameOfMyTask($configuration->getEventDispatcher(), new sfFormatter());
$arguments = array();
$options = array('env' => 'test');
$task->run($arguments, $options); // run the task