Pinq\Analysis\TypeId::getComposite PHP Метод

getComposite() публичный статический Метод

public static getComposite ( array $typeIds )
$typeIds array
    public static function getComposite(array $typeIds)
    {
        return 'composite<' . implode('|', $typeIds) . '>';
    }

Usage Example

Пример #1
0
 public function getCompositeType(array $types)
 {
     $types = $this->flattenComposedTypes($types);
     //Remove any redundant types: (\Iterator and \Traversable) becomes \Iterator
     /** @var $types IType[] */
     foreach ($types as $outer => $outerType) {
         foreach ($types as $inner => $innerType) {
             if ($outer !== $inner && $innerType->isParentTypeOf($outerType)) {
                 unset($types[$inner]);
             }
         }
     }
     if (count($types) === 0) {
         return $this->getNativeType(INativeType::TYPE_MIXED);
     } elseif (count($types) === 1) {
         return reset($types);
     }
     ksort($types, SORT_STRING);
     $typeId = TypeId::getComposite(array_keys($types));
     if (!isset($this->compositeTypes[$typeId])) {
         $this->compositeTypes[$typeId] = $this->buildCompositeType($typeId, $types);
     }
     return $this->compositeTypes[$typeId];
 }
All Usage Examples Of Pinq\Analysis\TypeId::getComposite