|
Revision 23357, 1.4 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/PHP5ExtensionPeerBuilder.php'; |
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
class SfExtensionPeerBuilder extends PHP5ExtensionPeerBuilder |
|---|
| 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 |
|
|---|
| 35 |
* Adds class phpdoc comment and openning of class. |
|---|
| 36 |
* |
|---|
| 37 |
* @param string &$script The script will be modified in this method |
|---|
| 38 |
*/ |
|---|
| 39 |
protected function addClassOpen(&$script) |
|---|
| 40 |
{ |
|---|
| 41 |
parent::addClassOpen($script); |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
$script = str_replace(array(" {\n", "\n\n\n"), array("\n{", "\n"), sfToolkit::stripComments($script)); |
|---|
| 45 |
} |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
* Closes class. |
|---|
| 49 |
* |
|---|
| 50 |
* @param string &$script The script will be modified in this method |
|---|
| 51 |
*/ |
|---|
| 52 |
protected function addClassClose(&$script) |
|---|
| 53 |
{ |
|---|
| 54 |
parent::addClassClose($script); |
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
$script = preg_replace('#} // .+$#m', '}', $script); |
|---|
| 58 |
} |
|---|
| 59 |
} |
|---|
| 60 |
|
|---|