/**
  * Execute task
  * 
  * @param   array   $arguments  Task arguments [optional]
  * @param   array   $options    Task options [optional]
  * @return  void
  * @author  relo_san
  * @since   february 20, 2010
  */
 protected function execute($arguments = array(), $options = array())
 {
     $databaseManager = new sfDatabaseManager($this->configuration);
     $properties = parse_ini_file(sfConfig::get('sf_config_dir') . '/properties.ini', true);
     $this->constants = array('PROJECT_NAME' => dinGeneratorSigner::getProjectName(), 'APP_NAME' => $arguments['application'], 'MODULE_NAME' => $arguments['module'], 'UC_MODULE_NAME' => ucfirst($arguments['module']), 'MODEL_CLASS' => $arguments['model'], 'PLUGIN_NAME' => $options['plugin'], 'PHP' => '<?php', 'AUTHOR' => dinGeneratorSigner::getAuthor(), 'DATE' => strtolower(date('F d, Y')), 'AUTHOR_NAME' => dinGeneratorSigner::getAuthor());
     $method = $options['generate-in-cache'] ? 'executeInit' : 'executeGenerate';
     $this->{$method}($arguments, $options);
 }
 /**
  * Replace tokens in project model classes
  * 
  * @param   string  $libDir     Base directory for model classes
  * @param   string  $model      Model name
  * @param   string  $package    Package name
  * @param   string  $suffix     Suffix for class files
  * @param   boolean $isPlugin   Is plugin model classes pair [optional, default false]
  * @return  void
  */
 protected function replaceLibClasses($libDir, $model, $package, $suffix, $isPlugin = false)
 {
     // record class file
     $recFile = $libDir . ($isPlugin ? 'Plugin' : '') . $model . $suffix;
     $code = str_replace("\r\n", "\n", file_get_contents($recFile));
     $eol = "\n";
     $pt = '|/\\*\\*' . $eol . ' \\* ([\\w]+)' . $eol . ' \\* ' . $eol . ' \\* This class has been auto-generated by the Doctrine ORM Framework' . $eol . ' \\* ' . $eol . ' \\* @package    ##PACKAGE##.* \\*/|Uumsi';
     preg_match($pt, $code, $m);
     if ($m) {
         $header = ($isPlugin ? dinGeneratorSigner::getPluginHeader($package) : dinGeneratorSigner::getHeader()) . $eol . $eol . '/**' . $eol . ' * ' . ($isPlugin ? 'Plugin c' : 'C') . 'lass that represents a record of ' . $model . ' model' . $eol . ' * ' . $eol . ' * @package     ' . ($isPlugin ? $package : dinGeneratorSigner::getProjectName()) . $eol . ' * @subpackage  lib.model.doctrine' . (!$isPlugin && $package ? '.' . $package : '') . $eol . ' * @author      ' . dinGeneratorSigner::getAuthor() . $eol . ' */';
         $code = str_replace($m[0], $header, $code);
         $pt = '|class ([\\w]+) extends ([\\w]+)' . $eol . '{' . $eol . $eol . '}|Uumsi';
         preg_match($pt, $code, $m);
         if ($m) {
             $cont = 'class ' . ($isPlugin ? 'Plugin' : '') . $model . ' extends ' . ($isPlugin ? 'Base' : 'Plugin') . $model . $eol . '{' . $eol . '} // ' . ($isPlugin ? 'Plugin' : '') . $model . $eol . $eol . '//EOF';
             $code = str_replace($m[0], $cont, $code);
         }
         file_put_contents($recFile, $code);
     }
     // table class file
     $tblFile = $libDir . ($isPlugin ? 'Plugin' : '') . $model . 'Table' . $suffix;
     $code = str_replace("\r\n", "\n", file_get_contents($tblFile));
     $pt = '|/\\*\\*' . $eol . ' \\* ([\\w]+)' . $eol . ' \\* ' . $eol . ' \\* This class has been auto-generated by the Doctrine ORM Framework' . $eol . ' \\*/|Uumsi';
     preg_match($pt, $code, $m);
     if ($m) {
         $header = ($isPlugin ? dinGeneratorSigner::getPluginHeader($package) : dinGeneratorSigner::getHeader()) . $eol . $eol . '/**' . $eol . ' * ' . ($isPlugin ? 'Plugin c' : 'C') . 'lass for performing query and update operations for ' . $model . ' model table' . $eol . ' * ' . $eol . ' * @package     ' . ($isPlugin ? $package : dinGeneratorSigner::getProjectName()) . $eol . ' * @subpackage  lib.model.doctrine' . (!$isPlugin && $package ? '.' . $package : '') . $eol . ' * @author      ' . dinGeneratorSigner::getAuthor() . $eol . ' */';
         $code = str_replace($m[0], $header, $code);
         $pt = '|class ([\\w]+) extends ([\\w]+)' . $eol . '{' . $eol . '    /\\*\\*' . $eol . '     \\* Returns an instance of this class\\.' . $eol . '     \\*' . $eol . '     \\* @return object ([\\w]+)' . $eol . '.*    }' . $eol . '}|Uumsi';
         preg_match($pt, $code, $m);
         if ($m) {
             $cont = 'class ' . ($isPlugin ? 'Plugin' : '') . $model . 'Table extends ' . ($isPlugin ? $m[2] : 'Plugin' . $model . 'Table') . $eol . '{' . $eol . $eol . '    /**' . $eol . '     * Returns an instance of ' . ($isPlugin ? 'Plugin' : '') . $model . 'Table' . $eol . '     * ' . $eol . '     * @return  ' . ($isPlugin ? 'Plugin' : '') . $model . 'Table' . $eol . '     */' . $eol . '    public static function getInstance()' . $eol . '    {' . $eol . $eol . "        return Doctrine_Core::getTable( '" . ($isPlugin ? 'Plugin' : '') . $model . "' );" . $eol . $eol . '    } // ' . ($isPlugin ? 'Plugin' : '') . $model . 'Table::getInstance()' . $eol . $eol . '} // ' . ($isPlugin ? 'Plugin' : '') . $model . 'Table' . $eol . $eol . '//EOF';
             $code = str_replace($m[0], $cont, $code);
         }
         file_put_contents($tblFile, $code);
     }
 }
<?php 
echo dinGeneratorSigner::getHeader() . "\n";
?>

/**
 * Form class for <?php 
echo $this->table->getOption('name');
?>
 object
 * 
 * @package     <?php 
echo dinGeneratorSigner::getProjectName() . "\n";
?>
 * @subpackage  lib.form.doctrine
 * @author      <?php 
echo dinGeneratorSigner::getAuthor() . "\n";
?>
 */
class <?php 
echo $this->table->getOption('name');
?>
Form extends Base<?php 
echo $this->table->getOption('name');
?>
Form
{

    /**
     * Configure form
     * 
     * @return  void
 /**
  * Load sign configuration
  * 
  * @return  void
  */
 private static function loadConfig()
 {
     self::$info = sfYaml::load(sfConfig::get('sf_lib_dir') . '/config/sign.yml');
     self::$isLoaded = true;
 }