示例#1
0
 private function resolveType(TableTypeInterface $type)
 {
     $parentType = $type->getParent();
     if ($parentType instanceof TableTypeInterface) {
         $parentType = $this->resolveType($parentType);
     } elseif (null !== $parentType) {
         $parentType = $this->registry->getType($parentType);
     }
     return $this->resolvedTypeFactory->createResolvedType($type, array(), $parentType);
 }
示例#2
0
 /**
  * Wraps a type into a ResolvedTableTypeInterface implementation and connects
  * it with its parent type.
  *
  * @param TableTypeInterface $type The type to resolve.
  *
  * @return ResolvedTableTypeInterface The resolved type.
  */
 private function resolveAndAddType(TableTypeInterface $type)
 {
     $parentType = $type->getParent();
     if ($parentType instanceof TableTypeInterface) {
         $this->resolveAndAddType($parentType);
         $parentType = $parentType->getName();
     }
     $typeExtensions = array();
     foreach ($this->extensions as $extension) {
         $typeExtensions = array_merge($typeExtensions, $extension->getTypeExtensions($type->getName()));
     }
     $this->types[$type->getName()] = $this->resolvedTypeFactory->createResolvedType($type, $typeExtensions, $parentType ? $this->getType($parentType) : null);
 }