@@ -49,6 +49,9 @@ discard block |
||
| 49 | 49 | return $this->serializer->serialize($this->getEdmx(), "xml"); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | + /** |
|
| 53 | + * @param string $name |
|
| 54 | + */ |
|
| 52 | 55 | public function addEntityType($name, $accessType = "Public", $summary = null, $longDescription = null) |
| 53 | 56 | { |
| 54 | 57 | $NewEntity = new TEntityTypeType(); |
@@ -124,6 +127,11 @@ discard block |
||
| 124 | 127 | return $NewProperty; |
| 125 | 128 | } |
| 126 | 129 | |
| 130 | + /** |
|
| 131 | + * @param string $name |
|
| 132 | + * @param string $type |
|
| 133 | + * @param string $storeGeneratedPattern |
|
| 134 | + */ |
|
| 127 | 135 | public function addPropertyToEntityType( |
| 128 | 136 | $entityType, |
| 129 | 137 | $name, |
@@ -161,6 +169,11 @@ discard block |
||
| 161 | 169 | return $NewProperty; |
| 162 | 170 | } |
| 163 | 171 | |
| 172 | + /** |
|
| 173 | + * @param string $principalMultiplicity |
|
| 174 | + * @param string $principalProperty |
|
| 175 | + * @param string $dependentMultiplicity |
|
| 176 | + */ |
|
| 164 | 177 | public function addNavigationPropertyToEntityType( |
| 165 | 178 | TEntityTypeType $principalType, |
| 166 | 179 | $principalMultiplicity, |
@@ -337,6 +350,10 @@ discard block |
||
| 337 | 350 | return $association; |
| 338 | 351 | } |
| 339 | 352 | |
| 353 | + /** |
|
| 354 | + * @param string $principalEntitySetName |
|
| 355 | + * @param string $dependentEntitySetName |
|
| 356 | + */ |
|
| 340 | 357 | protected function createAssocationSetForAssocation( |
| 341 | 358 | TAssociationType $association, |
| 342 | 359 | $principalEntitySetName, |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | if (0 == strlen(trim($namespace))) { |
| 65 | 65 | $entityTypeName = $NewEntity->getName(); |
| 66 | 66 | } else { |
| 67 | - $entityTypeName = $namespace . "." . $NewEntity->getName(); |
|
| 67 | + $entityTypeName = $namespace.".".$NewEntity->getName(); |
|
| 68 | 68 | } |
| 69 | 69 | $entitySet->setEntityType($entityTypeName); |
| 70 | 70 | $entitySet->setGetterAccess($accessType); |
@@ -181,21 +181,21 @@ discard block |
||
| 181 | 181 | ) { |
| 182 | 182 | $principalEntitySetName = Str::plural($principalType->getName(), 2); |
| 183 | 183 | $dependentEntitySetName = Str::plural($dependentType->getName(), 2); |
| 184 | - $relationName = $principalType->getName() . "_" . $principalProperty . "_" |
|
| 185 | - . $dependentType->getName() . "_" . $dependentProperty; |
|
| 184 | + $relationName = $principalType->getName()."_".$principalProperty."_" |
|
| 185 | + . $dependentType->getName()."_".$dependentProperty; |
|
| 186 | 186 | $relationName = trim($relationName, "_"); |
| 187 | 187 | |
| 188 | 188 | $namespace = $this->V3Edmx->getDataServiceType()->getSchema()[0]->getNamespace(); |
| 189 | 189 | if (0 == strlen(trim($namespace))) { |
| 190 | 190 | $relationFQName = $relationName; |
| 191 | 191 | } else { |
| 192 | - $relationFQName = $namespace . "." . $relationName; |
|
| 192 | + $relationFQName = $namespace.".".$relationName; |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | $principalNavigationProperty = new TNavigationPropertyType(); |
| 196 | 196 | $principalNavigationProperty->setName($principalProperty); |
| 197 | - $principalNavigationProperty->setToRole(trim($dependentEntitySetName . "_" . $dependentProperty, "_")); |
|
| 198 | - $principalNavigationProperty->setFromRole($principalEntitySetName . "_" . $principalProperty); |
|
| 197 | + $principalNavigationProperty->setToRole(trim($dependentEntitySetName."_".$dependentProperty, "_")); |
|
| 198 | + $principalNavigationProperty->setFromRole($principalEntitySetName."_".$principalProperty); |
|
| 199 | 199 | $principalNavigationProperty->setRelationship($relationFQName); |
| 200 | 200 | $principalNavigationProperty->setGetterAccess($principalGetterAccess); |
| 201 | 201 | $principalNavigationProperty->setSetterAccess($principalSetterAccess); |
@@ -210,8 +210,8 @@ discard block |
||
| 210 | 210 | if (!empty($dependentProperty)) { |
| 211 | 211 | $dependentNavigationProperty = new TNavigationPropertyType(); |
| 212 | 212 | $dependentNavigationProperty->setName($dependentProperty); |
| 213 | - $dependentNavigationProperty->setToRole($principalEntitySetName . "_" . $principalProperty); |
|
| 214 | - $dependentNavigationProperty->setFromRole($dependentEntitySetName . "_" . $dependentProperty); |
|
| 213 | + $dependentNavigationProperty->setToRole($principalEntitySetName."_".$principalProperty); |
|
| 214 | + $dependentNavigationProperty->setFromRole($dependentEntitySetName."_".$dependentProperty); |
|
| 215 | 215 | $dependentNavigationProperty->setRelationship($relationFQName); |
| 216 | 216 | $dependentNavigationProperty->setGetterAccess($dependentGetterAccess); |
| 217 | 217 | $dependentNavigationProperty->setSetterAccess($dependentSetterAccess); |
@@ -280,8 +280,8 @@ discard block |
||
| 280 | 280 | $principalTypeFQName = $principalType->getName(); |
| 281 | 281 | $dependentTypeFQName = $dependentType->getName(); |
| 282 | 282 | } else { |
| 283 | - $principalTypeFQName = $namespace . "." . $principalType->getName(); |
|
| 284 | - $dependentTypeFQName = $namespace . "." . $dependentType->getName(); |
|
| 283 | + $principalTypeFQName = $namespace.".".$principalType->getName(); |
|
| 284 | + $dependentTypeFQName = $namespace.".".$dependentType->getName(); |
|
| 285 | 285 | } |
| 286 | 286 | $association = new TAssociationType(); |
| 287 | 287 | $relationship = $principalNavigationProperty->getRelationship(); |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | if (0 == strlen(trim($namespace))) { |
| 350 | 350 | $associationSetName = $association->getName(); |
| 351 | 351 | } else { |
| 352 | - $associationSetName = $namespace . "." . $association->getName(); |
|
| 352 | + $associationSetName = $namespace.".".$association->getName(); |
|
| 353 | 353 | } |
| 354 | 354 | $as->setAssociation($associationSetName); |
| 355 | 355 | $end1 = new EndAnonymousType(); |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | |
| 371 | 371 | private function initSerialiser() |
| 372 | 372 | { |
| 373 | - $ymlDir = __DIR__ . DIRECTORY_SEPARATOR . "MetadataV3" . DIRECTORY_SEPARATOR . "JMSmetadata"; |
|
| 373 | + $ymlDir = __DIR__.DIRECTORY_SEPARATOR."MetadataV3".DIRECTORY_SEPARATOR."JMSmetadata"; |
|
| 374 | 374 | $this->serializer = |
| 375 | 375 | SerializerBuilder::create() |
| 376 | 376 | ->addMetadataDir($ymlDir) |