Development

/branches/1.3/lib/plugins/sfPropelPlugin/lib/builder/SfMultiExtendObjectBuilder.php

You must first sign up to be able to contribute.

root/branches/1.3/lib/plugins/sfPropelPlugin/lib/builder/SfMultiExtendObjectBuilder.php

Revision 23357, 1.4 kB (checked in by Kris.Wallsmith, 5 years ago)

[1.3] tagged custom propel builders as deprecated

  • 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 require_once 'propel/engine/builder/om/php5/PHP5MultiExtendObjectBuilder.php';
4
5 /*
6  * This file is part of the symfony package.
7  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
8  *
9  * For the full copyright and license information, please view the LICENSE
10  * file that was distributed with this source code.
11  */
12
13 /**
14  * @package    symfony
15  * @subpackage propel
16  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
17  * @version    SVN: $Id$
18  *
19  * @deprecated since symfony 1.3
20  */
21 class SfMultiExtendObjectBuilder extends PHP5MultiExtendObjectBuilder
22 {
23   public function build()
24   {
25     $code = parent::build();
26     if (!$this->getBuildProperty('builderAddComments'))
27     {
28       $code = sfToolkit::stripComments($code);
29     }
30
31     return $code;
32   }
33
34   protected function addClassOpen(&$script)
35   {
36     parent::addClassOpen($script);
37
38     // remove comments and fix coding standards
39     $script = str_replace(array(" {\n", "\n\n\n"), array("\n{", "\n"), sfToolkit::stripComments($script));
40   }
41
42   protected function addClassBody(&$script)
43   {
44     parent::addClassBody($script);
45
46     // remove comments and fix coding standards
47     $script = str_replace(array("\t", "{\n  \n"), array('  ', "{\n"), sfToolkit::stripComments($script));
48   }
49
50   protected function addClassClose(&$script)
51   {
52     parent::addClassClose($script);
53
54     // fix coding standards
55     $script = preg_replace('#\n} // .+$#m', '}', $script);
56   }
57 }
58
Note: See TracBrowser for help on using the browser.