This will check method.

@param $on
481105
protected function tryRequireHelpers($on)
    {
        foreach ($this->helpers as $filePath => $for) {
            if ($on === $for) {
                require_once path_join($this->rootDir, $filePath);
            }
        }
    }
1132583
public function onResponse($cb)
    {
        if ($cb === null && !$this->noSAF) {
            return;
        }
        $this->onResponse->push($cb);
        $this->checkFree();
    }
543746
public function updateChecks(Context $op_context)
    {
        $this->check_classes = $this->check_classes && $op_context->check_classes;
        $this->check_variables = $this->check_variables && $op_context->check_variables;
        $this->check_methods = $this->check_methods && $op_context->check_methods;
        $this->check_functions = $this->check_functions && $op_context->check_functions;
        $this->check_consts = $this->check_consts && $op_context->check_consts;
    }
1005094
private function validate(MethodInvocation $invocation, \ReflectionMethod $onValidate, \ReflectionMethod $onFailure = null)
    {
        $validation = $onValidate->invokeArgs($invocation->getThis(), (array) $invocation->getArguments());
        if ($validation instanceof Validation && $validation->getMessages()) {
            /* @var $validation Validation */
            $validation->setInvocation($invocation);
            $failure = $this->getFailure($invocation, $validation, $onFailure);
            if ($failure instanceof \Exception) {
                throw $failure;
            }

            return [false, $failure];
        }

        return [true, null];
    }
107523
protected function onData($data)
    {
        if (isset($this->bib_data)) {
            $this->bib->init($this->bib_data);
        }
        if (isset($this->holding_data)) {
            $this->holding->init($this->holding_data);
        }
    }
91085
public function check() {
		foreach ( $this->requirements as $requirement ) {
			// Match against config.
			$requirementFulfilled = $this->requirementIsFulfilled( $requirement );

			if ( $requirementFulfilled ) {
				continue;
			}

			$this->addMissingRequirementMessage( $requirement );
		}
	}
1104800
public function setCustomMethod(Method $method)
    {
        $this->setMethod(self::METHOD_CUSTOM);
        $this->methods[$this->method] = get_object_vars($method);

        $this->loadSettings();
    }
713964
public function onReady()
    {
        $this->connected = true;
        if ($this->onConnected) {
            $this->onConnected->executeAll($this);
            $this->onConnected = null;
        }
    }
435100
public function setMethod($method) {
        $methods = array(
            COMPLETION_AGGREGATION_ALL,
            COMPLETION_AGGREGATION_ANY,
        );

        if (in_array($method, $methods)) {
            $this->method = $method;
        } else {
            $this->method = COMPLETION_AGGREGATION_ALL;
        }
    }
553308
public function onFailure()
    {
        if ($this->onConnected) {
            $this->onConnected->executeAll($this);
            $this->onConnected = null;
        }
    }
456359
protected function check(MethodNode $method, AbstractNode $node)
    {
        $params = $method->getParameters();
        foreach ($params as $param) {
            $this->checkParameter($param, $node);
        }
    }
160865
public function on(string $event, callable $handler, $once = false): void
    {
        if (self::isSupportedEvent($event)) {
            self::$eventHandlers[$event][] = $handler;

            if (!isset(self::$events[$event])) {
                self::$events[$event] = (bool)$once;
            }
        }
    }
1188286
public function doInit()
    {
        //extension hook
        $this->extend('onBeforeInit');

        // Safety call
        $this->baseInitCalled = false;
        $this->init();
        if (!$this->baseInitCalled) {
            $class = static::class;
            user_error(
                "init() method on class '{$class}' doesn't call Controller::init()."
                . "Make sure that you have parent::init() included.",
                E_USER_WARNING
            );
        }

        $this->extend('onAfterInit');
    }
932834
public function check(): bool
  {
    if ( $this->current !== null ){
      // if $on_error is set to E_CONTINUE returns true
      if ( $this->on_error === self::E_CONTINUE ){
        return true;
      }
      // If any connection has an error with mode E_STOP_ALL
      if ( self::$has_error_all && ($this->on_error !== self::E_STOP_ALL) ){
        return false;
      }
      // If this connection has an error with mode E_STOP
      if ( $this->has_error && ($this->on_error !== self::E_STOP) ){
        return false;
      }
      return true;
    }
    return false;
  }
894407
public function settingsNewInterface($on = true)
	{
		$this->clearColumns();
		if( debug_assert( true === $on,"Turning off new setting interface not supported yet") )
		{
			if( empty($this->_settingsDefault) )
			{
				$default = self::get(false)->getSettings();
				debug_assert(0 === count(array_diff_key($this->getSettings(),$default)),"Trying to use new settings interface on model with modified settings");
				$this->_settingsDefault = $default;
				$this->setSettings(array());
			}
		}
		return $this;
	}
1119570
private function checkMethod(Request $request, $method)
    {
        if(Text::isEmpty($method))
        {
            return true;
        }
        else if(is_array($method))
        {
            return in_array($request->getMethod(), $method);
        }
        else
        {
            return $method === $request->getMethod();
        }
    }
505780
private function check($value) {

		$values = ['yes', 'on', '1', 'true'];
		
		if(true === is_string($value)) {
			return true === in_array($value, $values);
		}

		return false;
	}