Skip to content

Commit

Permalink
Merge pull request doctrine#81 from dator/fix-document-generator
Browse files Browse the repository at this point in the history
[DocumentGenerator] Switch visibility of fields from private to protected
  • Loading branch information
jwage committed Jul 27, 2011
2 parents f0cfc81 + 26d3342 commit f426b8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/ODM/MongoDB/Tools/DocumentGenerator.php
Expand Up @@ -656,7 +656,7 @@ private function generateDocumentAssociationMappingProperties(ClassMetadataInfo
}

$lines[] = $this->generateAssociationMappingPropertyDocBlock($fieldMapping, $metadata);
$lines[] = $this->spaces . 'private $' . $fieldMapping['fieldName']
$lines[] = $this->spaces . 'protected $' . $fieldMapping['fieldName']
. ($fieldMapping['type'] === ClassMetadataInfo::MANY ? ' = array()' : null) . ";\n";
}

Expand All @@ -677,7 +677,7 @@ private function generateDocumentFieldMappingProperties(ClassMetadataInfo $metad
}

$lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata);
$lines[] = $this->spaces . 'private $' . $fieldMapping['fieldName']
$lines[] = $this->spaces . 'protected $' . $fieldMapping['fieldName']
. (isset($fieldMapping['default']) ? ' = ' . var_export($fieldMapping['default'], true) : null) . ";\n";
}

Expand Down

0 comments on commit f426b8b

Please sign in to comment.