Returns true if one of the given controllers match the actual one.
 If actions are set they are taken into account.
769453
def current_state_by_controller(*given_controller_names, actions: [])
      if given_controller_names.any? { |name| name == controller_name.to_sym }
        if actions.present?
          Array(actions).include?(action_name.to_sym)
        else
          true
        end
      end
    end
198787
protected function checkActionAlreadyExists($action, $controllers)
    {
        $controllerName = $action->getControllerName();
        if (!array_key_exists($controllerName, $controllers)) {
            return false;
        }

        if (!array_key_exists($action->getMethod(), $controllers[$controllerName])) {
            return false;
        }

        return true;
    }
345228
def match(self, request, *, root=None, path=None, methods=None):
        
        return self.__router.match(
            request, root=root, path=path, methods=methods)
572809
protected function controllerUsesHelpersTrait()
    {
        if (! $controller = $this->getControllerInstance()) {
            return false;
        }

        $traits = [];

        do {
            $traits = array_merge(class_uses($controller, false), $traits);
        } while ($controller = get_parent_class($controller));

        foreach ($traits as $trait => $same) {
            $traits = array_merge(class_uses($trait, false), $traits);
        }

        return isset($traits[Helpers::class]);
    }
573649
def matches(self, client, event_data):
        """"""

        for f in self.filters:
            if not f(client, event_data):
                return False

        return True
1013042
def check_controller(sess):
    
    controller_operational             = get_data(sess, operational_oid, helper)
    controller_availability            = get_data(sess, availability_oid, helper)
    controller_alarm                   = get_data(sess, alarm_oid, helper)
    
    # Add summary
    helper.add_summary("Controller Status")

    # Add all states to the long output
    helper.add_long_output("Controller Operational State: %s" % operational_states[int(controller_operational)])
    helper.add_long_output("Controller Availability State: %s" % availability_states[int(controller_availability)])
    helper.add_long_output("Controller Alarm State: %s" % alarm_states[int(controller_alarm)])

    # Operational State
    if controller_operational != "1" and controller_operational != "4":
        helper.status(critical)
        helper.add_summary("Controller Operational State: %s" % operational_states[int(controller_operational)])

    # Avaiability State
    if controller_availability != "3":
        helper.status(critical)
        helper.add_summary("Controller Availability State: %s" % availability_states[int(controller_availability)])

    # Alarm State
    if controller_alarm == "2":
        helper.status(warning)
        helper.add_summary("Controller Alarm State: %s" % alarm_states[int(controller_alarm)])
    if controller_alarm == "3" or controller_alarm == "4":
        helper.status(critical)
        helper.add_summary("Controller Alarm State: %s" % alarm_states[int(controller_alarm)])
131895
function () {
    var data = this.data;
    var controller = controllerUtils.findMatchingControllerWebVR(
      this.system.controllers,
      data.id,
      data.idPrefix,
      data.hand,
      data.controller
    );

    this.controller = controller;
    // Legacy handle to the controller for old components.
    this.el.components['tracked-controls'].controller = controller;

    if (this.data.autoHide) { this.el.object3D.visible = !!this.controller; }
  }
387147
private static boolean methodExists(String controllerMethod, Class<?> controllerClass) {
        Objects.requireNonNull(controllerMethod, Required.CONTROLLER_METHOD.toString());
        Objects.requireNonNull(controllerClass, Required.CONTROLLER_CLASS.toString());
        
        return Arrays.stream(controllerClass.getMethods()).anyMatch(method -> method.getName().equals(controllerMethod));
    }
1106567
def redo(self):
        
        controllers = self.forward()
        if controllers is None:
            ups = ()
        else:
            ups = tuple([controller.redo() for
                         controller in controllers])
        if self.process_ups is not None:
            return self.process_ups(ups)
        else:
            return ups
140661
public function checkController($controllers)
    {
        if (!$this->controller) {
            return false;
        }

        if (in_array($this->controller, (array)$controllers)) {
            return true;
        }

        return false;
    }
1110535
public boolean matches(RxBleInternalScanResult scanResult) {
        if (scanResult == null) {
            return false;
        }
        BluetoothDevice device = scanResult.getBluetoothDevice();
        // Device match.
        if (mDeviceAddress != null
                && (device == null || !mDeviceAddress.equals(device.getAddress()))) {
            return false;
        }

        ScanRecord scanRecord = scanResult.getScanRecord();

        // Scan record is null but there exist filters on it.
        if (scanRecord == null
                && (mDeviceName != null || mServiceUuid != null || mManufacturerData != null
                || mServiceData != null)) {
            return false;
        }

        // Local name match.
        if (mDeviceName != null) {
            if (!(mDeviceName.equals(scanRecord.getDeviceName()) || mDeviceName.equals(device.getName()))) {
                return false;
            }
        }

        // UUID match.
        if (mServiceUuid != null && !matchesServiceUuids(mServiceUuid, mServiceUuidMask,
                scanRecord.getServiceUuids())) {
            return false;
        }

        // Service data match
        if (mServiceDataUuid != null) {
            if (!matchesPartialData(mServiceData, mServiceDataMask,
                    scanRecord.getServiceData(mServiceDataUuid))) {
                return false;
            }
        }

        // Manufacturer data match.
        if (mManufacturerId >= 0) {
            if (!matchesPartialData(mManufacturerData, mManufacturerDataMask,
                    scanRecord.getManufacturerSpecificData(mManufacturerId))) {
                return false;
            }
        }
        // All filters match.
        return true;
    }
1054964
def _get_controller_help(self, controller):
        
        if hasattr(self._controllers[controller], 'HELP'):
            return self._controllers[controller].HELP
        return None
635457
function () {
    this.controller = controllerUtils.findMatchingControllerWebXR(
      this.system.controllers,
      this.data.hand
    );
    // Legacy handle to the controller for old components.
    this.el.components['tracked-controls'].controller = this.controller;

    if (this.data.autoHide) { this.el.object3D.visible = !!this.controller; }
  }
927349
def controller(self):
        """"""
        if hasattr(self, 'controllers'):
            if len(self.controllers) > 1:
                # in the future, we should support more controllers
                raise TypeError("Only one controller per account.")
            return self.controllers[0]
        raise AttributeError("There is no controller assigned.")
497950
public static function isModule(string $module, string $controller = null, string $action = null): bool
    {
        $route = Application::route();
        if ($module === $route->getModuleUrl()) {
            if ($controller === null) {
                return true;
            } else {
                if ($controller === $route->getControllerUrl()) {
                    // now we have matched module and controller
                    if ($action === null) {
                        return true;
                    } else {
                        return ($action === $route->getActionUrl());
                    }
                } else {
                    return false;
                }
            }
        } else {
            return false;
        }
    }
797742
def array_controller_by_model(self, model):
        
        for member in self.get_members():
            if member.model == model:
                return member
807877
protected function match(ResultInterface $result)/*# : bool */
    {
        $params = $result->getParameter();
        if (isset($params[$this->varname])) {
            // set status
            $result->setStatus(Status::OK);

            // parameters
            $parts = explode($this->seperator, $params[$this->varname]);
            $controller = array_shift($parts);
            $action = array_shift($parts);
            if (count($parts) % 2) {
                $result->setStatus(Status::BAD_REQUEST);
                return false;
            }

            $newparam = [];
            foreach ($parts as $i => $val) {
                if (0 === $i % 2) {
                    $newparam[$val] = $parts[$i + 1];
                }
            }
            $result->setParameter($newparam);
            $result->setHandler([$controller, $action]);
            return true;
        }

        $result->setStatus(Status::BAD_REQUEST);
        return false;
    }