Development

/branches/1.1/lib/plugins/sfPropelPlugin/lib/task/sfPropelBuildModelTask.class.php

You must first sign up to be able to contribute.

root/branches/1.1/lib/plugins/sfPropelPlugin/lib/task/sfPropelBuildModelTask.class.php

Revision 7398, 1.8 kB (checked in by fabien, 6 years ago)

fixed typo

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 require_once(dirname(__FILE__).'/sfPropelBaseTask.class.php');
12
13 /**
14  * Create classes for the current model.
15  *
16  * @package    symfony
17  * @subpackage command
18  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
19  * @version    SVN: $Id$
20  */
21 class sfPropelBuildModelTask extends sfPropelBaseTask
22 {
23   /**
24    * @see sfTask
25    */
26   protected function configure()
27   {
28     $this->aliases = array('propel-build-model');
29     $this->namespace = 'propel';
30     $this->name = 'build-model';
31     $this->briefDescription = 'Creates classes for the current model';
32
33     $this->detailedDescription = <<<EOF
34 The [propel:build-model|INFO] task creates model classes from the schema:
35
36   [./symfony propel:build-model|INFO]
37
38 The task read the schema information in [config/*schema.xml|COMMENT] and/or
39 [config/*schema.yml|COMMENT] from the project and all installed plugins.
40
41 You mix and match YML and XML schema files. The task will convert
42 YML ones to XML before calling the Propel task.
43
44 The model classes files are created in [lib/model|COMMENT].
45
46 This task never overrides custom classes in [lib/model|COMMENT].
47 It only replaces files in [lib/model/om|COMMENT] and [lib/model/map|COMMENT].
48 EOF;
49   }
50
51   /**
52    * @see sfTask
53    */
54   protected function execute($arguments = array(), $options = array())
55   {
56     $this->schemaToXML(self::DO_NOT_CHECK_SCHEMA, 'generated-');
57     $this->copyXmlSchemaFromPlugins('generated-');
58     $this->callPhing('om', self::CHECK_SCHEMA);
59     $this->cleanup();
60
61     $this->logSection('autoload', 'reloading autoloading');
62
63     sfSimpleAutoload::getInstance()->reload();
64   }
65 }
66
Note: See TracBrowser for help on using the browser.