Binds to template and controllers.
5142
@Override
	public void initUpstream()
	{
		NucleicAcid nuc = tempReac.getTemplate();
		if (nuc != null)
		addToUpstream(nuc, getGraph());

		for (Control cont : tempReac.getControlledOf())
		{
			addToUpstream(cont, graph);
		}
	}
1351303
public function makeBinding()
    {
        $this->sortByConditionPriority();

        foreach ($this->routes as $route) {
            /** @var RouteConditionInterface $condition */
            $condition = $route['condition'];

            /** @var Action $action */
            $action = $route['action'];

            $condition->bindWithAction($action);
        }
    }
782456
protected function registerViewBindings()
    {
        $this->singleton('view', function ()
        {
            $this->configure('view');

            $this['config']['view.paths'] = [
                realpath(base_path('views')),
            ];
            
            return $this->loadComponent('view', 'Illuminate\View\ViewServiceProvider');
        });
    }
707900
private void registerTemplates(Iterable<TemplateType> templates, @Nullable Node scopeRoot) {
    if (!Iterables.isEmpty(templates)) {
      // Add any templates from JSDoc into our template scope.
      this.templateScope = typeRegistry.createScopeWithTemplates(templateScope, templates);
      // Register the template types on the scope root node, if there is one.
      if (scopeRoot != null) {
        typeRegistry.registerTemplateTypeNamesInScope(templates, scopeRoot);
      }
    }
  }
836627
private void bind() {
		EXTFramebufferObject.glBindFramebufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, FBO);
		GL11.glReadBuffer(EXTFramebufferObject.GL_COLOR_ATTACHMENT0_EXT);
	}
912509
public void bind() throws Throwable
   {
      if (name == null)
         throw new IllegalArgumentException("Name is null");

      if (obj == null)
         throw new IllegalArgumentException("Obj is null");

      if (trace)
         log.trace("Binding " + obj.getClass().getName() + " under " + name);

      Properties properties = new Properties();
      properties.setProperty(Context.PROVIDER_URL, jndiProtocol + "://" + jndiHost + ":" + jndiPort);
      Context context = new InitialContext(properties);

      try
      {
         String className = obj.getClass().getName();
         Reference ref = new Reference(className,
                                       new StringRefAddr("class", className),
                                       JndiBinder.class.getName(),
                                       null);
         ref.add(new StringRefAddr("name", name));

         objs.put(name, obj);

         Util.bind(context, name, ref);

         if (log.isDebugEnabled())
            log.debug("Bound " + obj.getClass().getName() + " under " + name);
      }
      finally
      {
         if (context != null)
         {
            try
            {
               context.close();
            }
            catch (NamingException ne)
            {
               // Ignore
            }
         }
      }
   }
1065461
protected function registerBindings()
    {
        $this->app->singleton(PageHeaderDirective::class, PageHeaderDirective::class);
        $this->app->singleton(TooltipDirective::class, TooltipDirective::class);
        $this->app->singleton(SearchEngine::class, LocalSearch::class);
    }
450331
function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) {
      var removeWatchCollection = [];
      var changes;
      forEach(bindings, function initializeBinding(definition, scopeName) {
        var attrName = definition.attrName,
        optional = definition.optional,
        mode = definition.mode, // @, =, or &
        lastValue,
        parentGet, parentSet, compare, removeWatch;

        switch (mode) {

          case '@':
            if (!optional && !hasOwnProperty.call(attrs, attrName)) {
              destination[scopeName] = attrs[attrName] = void 0;
            }
            attrs.$observe(attrName, function(value) {
              if (isString(value)) {
                var oldValue = destination[scopeName];
                recordChanges(scopeName, value, oldValue);
                destination[scopeName] = value;
              }
            });
            attrs.$$observers[attrName].$$scope = scope;
            lastValue = attrs[attrName];
            if (isString(lastValue)) {
              // If the attribute has been provided then we trigger an interpolation to ensure
              // the value is there for use in the link fn
              destination[scopeName] = $interpolate(lastValue)(scope);
            } else if (isBoolean(lastValue)) {
              // If the attributes is one of the BOOLEAN_ATTR then Angular will have converted
              // the value to boolean rather than a string, so we special case this situation
              destination[scopeName] = lastValue;
            }
            break;

          case '=':
            if (!hasOwnProperty.call(attrs, attrName)) {
              if (optional) break;
              attrs[attrName] = void 0;
            }
            if (optional && !attrs[attrName]) break;

            parentGet = $parse(attrs[attrName]);
            if (parentGet.literal) {
              compare = equals;
            } else {
              compare = function simpleCompare(a, b) { return a === b || (a !== a && b !== b); };
            }
            parentSet = parentGet.assign || function() {
              // reset the change, or we will throw this exception on every $digest
              lastValue = destination[scopeName] = parentGet(scope);
              throw $compileMinErr('nonassign',
                  "Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",
                  attrs[attrName], attrName, directive.name);
            };
            lastValue = destination[scopeName] = parentGet(scope);
            var parentValueWatch = function parentValueWatch(parentValue) {
              if (!compare(parentValue, destination[scopeName])) {
                // we are out of sync and need to copy
                if (!compare(parentValue, lastValue)) {
                  // parent changed and it has precedence
                  destination[scopeName] = parentValue;
                } else {
                  // if the parent can be assigned then do so
                  parentSet(scope, parentValue = destination[scopeName]);
                }
              }
              return lastValue = parentValue;
            };
            parentValueWatch.$stateful = true;
            if (definition.collection) {
              removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch);
            } else {
              removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);
            }
            removeWatchCollection.push(removeWatch);
            break;

          case '<':
            if (!hasOwnProperty.call(attrs, attrName)) {
              if (optional) break;
              attrs[attrName] = void 0;
            }
            if (optional && !attrs[attrName]) break;

            parentGet = $parse(attrs[attrName]);

            destination[scopeName] = parentGet(scope);

            removeWatch = scope.$watch(parentGet, function parentValueWatchAction(newParentValue) {
              var oldValue = destination[scopeName];
              recordChanges(scopeName, newParentValue, oldValue);
              destination[scopeName] = newParentValue;
            }, parentGet.literal);

            removeWatchCollection.push(removeWatch);
            break;

          case '&':
            // Don't assign Object.prototype method to scope
            parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop;

            // Don't assign noop to destination if expression is not valid
            if (parentGet === noop && optional) break;

            destination[scopeName] = function(locals) {
              return parentGet(scope, locals);
            };
            break;
        }
      });

      function recordChanges(key, currentValue, previousValue) {
        if (isFunction(destination.$onChanges) && currentValue !== previousValue) {
          // If we have not already scheduled the top level onChangesQueue handler then do so now
          if (!onChangesQueue) {
            scope.$$postDigest(flushOnChangesQueue);
            onChangesQueue = [];
          }
          // If we have not already queued a trigger of onChanges for this controller then do so now
          if (!changes) {
            changes = {};
            onChangesQueue.push(triggerOnChangesHook);
          }
          // If the has been a change on this property already then we need to reuse the previous value
          if (changes[key]) {
            previousValue = changes[key].previousValue;
          }
          // Store this change
          changes[key] = {previousValue: previousValue, currentValue: currentValue};
        }
      }

      function triggerOnChangesHook() {
        destination.$onChanges(changes);
        // Now clear the changes so that we schedule onChanges when more changes arrive
        changes = undefined;
      }

      return removeWatchCollection.length && function removeWatches() {
        for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) {
          removeWatchCollection[i]();
        }
      };
    }
1178660
function () {
    var atts = this.atts, att, ctlAtt, eh = this.eh, ctl = this.controller, v;
    var vs = this.isCptAttElement? this.vscope : this.parent.vscope;
    if (atts && ctl && ctl.$attributes) {
      // this template has a controller
      // let's propagate the new attribute values to the controller attributes
      for (var i = 0, sz = this.atts.length; sz > i; i++) {
        att = atts[i];
        ctlAtt = ctl.$attributes[att.name];
        // propagate changes for 1- and 2-way bound attributes
        if (ctlAtt.type!=="template" && ctlAtt._binding !== 0) {
          v = att.getValue(eh, vs, null);
          if (ctlAtt.type==="object" || ctlAtt.type==="array") {
            json.set(ctl, att.name, v);
          } else if ('' + v != '' + ctl[att.name]) {
            // values may have different types - this is why we have to check that values are different to
            // avoid creating loops
            json.set(ctl, att.name, v);
          }
        }
      }
    }
  }
513523
public function bindRoutes()
    {
        $loader = new RouteLoader();

        $loader->registerProviders(RouteLoader::$defaultProviders);

        $loader->bindRoutes($this);
        $this->bindPluginRoutes('plugin.controller_providers.root');
    }
210448
function (res, args) {
            var tplcfg = this._tplcfg;
            if (!tplcfg) {
                // the template may be ready after the widget has been disposed
                // do nothing in this case
                // except disposing the module which has just been created
                if (args.autoDispose) {
                    res.moduleCtrlPrivate.$dispose();
                }
                return;
            }

            var tplDiv = this._subTplDiv; // may be null at this time

            tplcfg.tplDiv = tplDiv;

            tplcfg.data = this._cfg.data;

            // if a module controller was created, inject it in template initialization
            if (res.moduleCtrl) {
                tplcfg.moduleCtrl = res.moduleCtrl;
            } else {
                tplcfg.context = this._context;
            }
            if (args.autoDispose) {
                if (tplcfg.toDispose == null) {
                    tplcfg.toDispose = [res.moduleCtrlPrivate];
                } else {
                    tplcfg.toDispose.push(res.moduleCtrlPrivate);
                }
            }
            /*
             * var tplCtxt = new aria.templates.TemplateCtxt(); this.subTplCtxt = tplCtxt;
             */
            var tplCtxt = this.subTplCtxt;
            tplCtxt.parent = this._context;

            res = tplCtxt.initTemplate(tplcfg);
            this._initCtxDone = true;

            if (res) {
                tplCtxt.dataReady(); // data successfully loaded: signal to template through TemplateContext
                // check that tplCtxt was not disposed
                if (tplDiv && tplCtxt._cfg) {
                    // Load the CSS dependencies, the style should be added before the html
                    tplDiv.className = tplDiv.className + " " + tplCtxt.getCSSClassNames(true);
                    tplCtxt.$onOnce({
                        "Ready" : this.__innerTplReadyCb,
                        scope : this
                    });
                    tplCtxt.$refresh();
                }
                // don't clean this object, as the template context will do it. Just break reference
                this.tplcfg = null;

            } else {
                tplCtxt.$dispose();
                this.subTplCtxt = null;
            }

            tplDiv = null;
        }
360532
protected function configure()
    {
        $this->bind(ResourceInterface::class)->to(Resource::class)->in(Scope::SINGLETON);
        $this->bind(InvokerInterface::class)->to(Invoker::class);
        $this->bind(LinkerInterface::class)->to(Linker::class);
        $this->bind(FactoryInterface::class)->to(Factory::class);
        $this->bind(SchemeCollectionInterface::class)->toProvider(SchemeCollectionProvider::class);
        $this->bind(AnchorInterface::class)->to(Anchor::class);
        $this->bind(NamedParameterInterface::class)->to(NamedParameter::class);
        $this->bind(RenderInterface::class)->to(PrettyJsonRenderer::class)->in(Scope::SINGLETON);
        $this->bind(Cache::class)->to(ArrayCache::class);
        $this->bind(RenderInterface::class)->annotatedWith('options')->to(OptionsRenderer::class);
        $this->bind(OptionsMethods::class);
        $this->bind(NamedParamMetasInterface::class)->to(NamedParamMetas::class);
    }
741686
protected function compile()
	{
		$buttons = new Helper\Buttons();
		$buttons->loadFromFieldset($this->buttons);
		$buttons->buttonStyle = $this->buttonStyle;

		$this->Template->buttons = $buttons;
	}
634073
def context_binding(variables)
      context = TemplateEvaluationContext.new

      helpers.each { |helper| context.extend(helper) }

      variables.each do |k, v|
        context.instance_variable_set("@#{k}", v)
      end

      context.__get_binding
    end
600007
function()
	{
		if(!this._modelBindersMap) this._initBinding();
		if(!this._collectionBinder)
		{
			this._explicitSubviewsStruct = null;

			if(this._template) this.element.innerHTML = this._template;

			if(this.render !== noop) this.render();
			this.renderSubviews();
		}
	}
665402
def data
      templates = @templates.deep_clone

      templates.each_pair do |name, value|
        if value['bindings']
          value['bindings'].each_pair do |number, binding|
            value['bindings'][number] = binding.map { |code| eval(code) }
          end
        end
      end

      templates
    end
837941
function () {
            this.$BindableWidget.initWidget.call(this);

            var bindings = this._cfg.bind;
            var isBound = false;

            if (bindings.visible) {
                var visible = this._transform(bindings.visible.transform, bindings.visible.inside[bindings.visible.to], "toWidget");
                if (visible === true) {
                    this.show();
                }
                isBound = true;
            }
            if (!isBound) {
                this.$logWarn(this.BINDING_NEEDED, [this.$class, "visible"]);
            }
        }