1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Fixing issue with 4 spaces being hardcoded and not replaced with the configured amount of spaces

This commit is contained in:
Jonathan H. Wage 2010-04-14 11:21:39 -04:00
parent d656566791
commit d150f8a6f7

View File

@ -98,7 +98,7 @@ class EntityGenerator
*/ */
public function <methodName>() public function <methodName>()
{ {
return $this-><fieldName>; <spaces>return $this-><fieldName>;
}'; }';
private static $_setMethodTemplate = private static $_setMethodTemplate =
@ -109,7 +109,7 @@ public function <methodName>()
*/ */
public function <methodName>(<methodTypeHint>$<variableName>) public function <methodName>(<methodTypeHint>$<variableName>)
{ {
$this-><fieldName> = $<variableName>; <spaces>$this-><fieldName> = $<variableName>;
}'; }';
private static $_addMethodTemplate = private static $_addMethodTemplate =
@ -120,7 +120,7 @@ public function <methodName>(<methodTypeHint>$<variableName>)
*/ */
public function <methodName>(<methodTypeHint>$<variableName>) public function <methodName>(<methodTypeHint>$<variableName>)
{ {
$this-><fieldName>[] = $<variableName>; <spaces>$this-><fieldName>[] = $<variableName>;
}'; }';
private static $_lifecycleCallbackMethodTemplate = private static $_lifecycleCallbackMethodTemplate =
@ -129,7 +129,7 @@ public function <methodName>(<methodTypeHint>$<variableName>)
*/ */
public function <methodName>() public function <methodName>()
{ {
// Add your code here <spaces>// Add your code here
}'; }';
/** /**
@ -192,7 +192,8 @@ public function <methodName>()
'<use>', '<use>',
'<entityAnnotation>', '<entityAnnotation>',
'<entityClassName>', '<entityClassName>',
'<entityBody>' '<entityBody>',
'<spaces>'
); );
$replacements = array( $replacements = array(
@ -200,7 +201,8 @@ public function <methodName>()
$this->_generateEntityUse($metadata), $this->_generateEntityUse($metadata),
$this->_generateEntityDocBlock($metadata), $this->_generateEntityDocBlock($metadata),
$this->_generateEntityClassName($metadata), $this->_generateEntityClassName($metadata),
$this->_generateEntityBody($metadata) $this->_generateEntityBody($metadata),
$this->_spaces
); );
return str_replace($placeHolders, $replacements, self::$_classTemplate); return str_replace($placeHolders, $replacements, self::$_classTemplate);