Bind to the given application.
357114
def bind(cls, app, *paths, methods=None, name=None, router=None, view=None):
        """"""
        cls.app = app
        if cls.app is not None:
            for _, m in inspect.getmembers(cls, predicate=inspect.isfunction):
                if not hasattr(m, ROUTE_PARAMS_ATTR):
                    continue
                paths_, methods_, name_ = getattr(m, ROUTE_PARAMS_ATTR)
                name_ = name_ or ("%s.%s" % (cls.name, m.__name__))
                delattr(m, ROUTE_PARAMS_ATTR)
                cls.app.register(*paths_, methods=methods_, name=name_, handler=cls)(m)

        @coroutine
        @functools.wraps(cls)
        def handler(request):
            return cls().dispatch(request, view=view)

        if not paths:
            paths = ["/%s" % cls.__name__]

        return routes_register(
            app, handler, *paths, methods=methods, router=router, name=name or cls.name)
586476
public void bindTo(Object proxy) {
    if (handle != null) {
      throw new IllegalStateException(
          "Attempted to rebind a default method handler that was already bound");
    }
    handle = unboundHandle.bindTo(proxy);
  }
832248
def bind(self, fn: Callable[[Any], 'Cont']) -> 'Cont':
        
        """
        return Cont(lambda c: self.run(lambda a: fn(a).run(c)))
1214402
protected function bind()
    {
        if (!isset($this->di)) {
            return false;
        }
        foreach ($this->di as $contract => $object) {
            $this->app->bind($contract, $object);
        }
    }
960037
public static void bind(Class clazz, Class<? extends Extension> implementation) {
        bind.put(clazz, implementation);
    }
545428
def bind(self, server, net=None, address=None):
        """"""
        if _debug: NetworkServiceAccessPoint._debug("bind %r net=%r address=%r", server, net, address)

        # make sure this hasn't already been called with this network
        if net in self.adapters:
            raise RuntimeError("already bound")

        # create an adapter object, add it to our map
        adapter = NetworkAdapter(self, net)
        self.adapters[net] = adapter
        if _debug: NetworkServiceAccessPoint._debug("    - adapters[%r]: %r", net, adapter)

        # if the address was given, make it the "local" one
        if address and not self.local_address:
            self.local_adapter = adapter
            self.local_address = address

        # bind to the server
        bind(adapter, server)
702144
public void bindWithApplication( String externalExportPrefix, String applicationName ) {

		Set<String> bounds = this.applicationBindings.get( externalExportPrefix );
		if( bounds == null ) {
			bounds = new LinkedHashSet<> ();
			this.applicationBindings.put( externalExportPrefix, bounds );
		}

		bounds.add( applicationName );
	}
828277
public static void loadApplicationBindings( Application app ) {

		File descDir = new File( app.getDirectory(), Constants.PROJECT_DIR_DESC );
		File appBindingsFile = new File( descDir, APP_BINDINGS_FILE );

		Logger logger = Logger.getLogger( ConfigurationUtils.class.getName());
		Properties props = Utils.readPropertiesFileQuietly( appBindingsFile, logger );
		for( Map.Entry<?,?> entry : props.entrySet()) {
			for( String part : Utils.splitNicely((String) entry.getValue(), "," )) {
				if( ! Utils.isEmptyOrWhitespaces( part ))
					app.bindWithApplication((String) entry.getKey(), part );
			}
		}
	}
995093
def bind(self):
        """"""
        # This is called simply to deal with anything that might be currently bound (for example, Pyglet objects),
        gl.glBindTexture(gl.GL_TEXTURE_2D, 0)

        # Store current viewport size for later
        self._old_viewport = get_viewport()

        # Bind the FBO, and change the viewport to fit its texture.
        gl.glBindFramebufferEXT(gl.GL_FRAMEBUFFER_EXT, self.id)  # Rendering off-screen
        gl.glViewport(0, 0, self.texture.width, self.texture.height)
1001622
public void addApplication(Application app) {
        appNameApplicationMap.put(app.getName().toUpperCase(Locale.ROOT), app);
        addInstancesToVIPMaps(app, this.virtualHostNameAppMap, this.secureVirtualHostNameAppMap);
        applications.add(app);
    }
638708
public void bind(C data) {
        if (itemView == null || controller == null) {
            return;
        }
        this.controller.mountView(data, itemView);
        this.data = data;
    }
313579
function bind (obj, method) {
    var fn = obj[method];
    obj[method] = function () {
      fn.apply(obj, arguments);
    };
  }
855828
protected function registerBindings(): void
    {
        $this->app->bind('algolia.connection', function (Container $app) {
            $manager = $app['algolia'];

            return $manager->connection();
        });

        $this->app->alias('algolia.connection', SearchClient::class);
    }
177668
def _init_application(self, application=None):
        """"""
        if application:
            self.application = application
        else:
            self.application = self.make_application()
369282
public static void register(Application application, String apptentiveKey, String apptentiveSignature) {
		register(application, new ApptentiveConfiguration(apptentiveKey, apptentiveSignature));
	}
480292
protected function registerBindings(Application $app) {
        $app->bind('bitbucket.connection', function ($app) {
            $manager = $app['bitbucket'];
            return $manager->connection();
        });
        $app->alias('bitbucket.connection', Api::class);
    }
1155700
def bind(self, data):
        
        # Check
        if not isinstance(data, VertexBuffer):
            raise ValueError('Program.bind() requires a VertexBuffer.')
        # Apply
        for name in data.dtype.names:
            self[name] = data[name]