|
Revision 23357, 1.6 kB
(checked in by Kris.Wallsmith, 4 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/PHP5ExtensionObjectBuilder.php'; |
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
class SfExtensionObjectBuilder extends PHP5ExtensionObjectBuilder |
|---|
| 22 |
{ |
|---|
| 23 |
|
|---|
| 24 |
public function build() |
|---|
| 25 |
{ |
|---|
| 26 |
$code = parent::build(); |
|---|
| 27 |
if (!$this->getBuildProperty('builderAddComments')) |
|---|
| 28 |
{ |
|---|
| 29 |
$code = sfToolkit::stripComments($code); |
|---|
| 30 |
} |
|---|
| 31 |
|
|---|
| 32 |
return $code; |
|---|
| 33 |
} |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
* Adds class phpdoc comment and openning of class. |
|---|
| 37 |
* |
|---|
| 38 |
* @param string &$script The script will be modified in this method |
|---|
| 39 |
*/ |
|---|
| 40 |
protected function addClassOpen(&$script) |
|---|
| 41 |
{ |
|---|
| 42 |
parent::addClassOpen($script); |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
$script = str_replace(array(" {\n", "\n\n\n"), array("\n{", "\n"), sfToolkit::stripComments($script)); |
|---|
| 46 |
} |
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
* Adds the applyDefaults() method, which is called from the constructor. |
|---|
| 50 |
* |
|---|
| 51 |
* @param string &$script The script will be modified in this method. |
|---|
| 52 |
*/ |
|---|
| 53 |
protected function addConstructor(&$script) |
|---|
| 54 |
{ |
|---|
| 55 |
} |
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
* Closes class. |
|---|
| 59 |
* |
|---|
| 60 |
* @param string &$script The script will be modified in this method |
|---|
| 61 |
*/ |
|---|
| 62 |
protected function addClassClose(&$script) |
|---|
| 63 |
{ |
|---|
| 64 |
parent::addClassClose($script); |
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
$script = preg_replace('#} // .+$#m', '}', $script); |
|---|
| 68 |
} |
|---|
| 69 |
} |
|---|
| 70 |
|
|---|