public static function fromTypeId()

in src/Apache/Ignite/Internal/Binary/BinaryTypeBuilder.php [43:65]


    public static function fromTypeId(BinaryCommunicator $communicator, int $typeId, ?int $schemaId): BinaryTypeBuilder
    {
        $result = new BinaryTypeBuilder();
        $type = $communicator->getTypeStorage()->getType($typeId, $schemaId);
        if ($type) {
            $result->type = $type;
            if ($schemaId !== null) {
                $result->schema = $type->getSchema($schemaId);
                if (!$result->schema) {
                    BinaryUtils::serializationError(
                        false,
                        sprintf('schema id "%d" specified for complex object of type "%s" not found', $schemaId, $type->getName()));
                }
                $result->fromStorage = true;
            } else {
                $result->schema = new BinarySchema();
            }
            return $result;
        }
        $result->init(null);
        $result->getType()->setId($typeId);
        return $result;
    }