...
Executes callback function by if set and status has changed.
@access		public
@param		integer		$method		Method to use for checking
@return		void
@throws		\RangeException			if given method is unsupported
481650
public function check( $method = NULL ){
		$method			= $this->method;
		if( $method && $this->validateMethod( $method ) )
			$method		= $method;
		$currentStatus	= $this->status;
		switch( $method ){
			case self::METHOD_SOCKET:
				$this->checkUsingSocket();
				break;
			case self::METHOD_PING:
				$this->checkUsingSystemPing();
				break;
		}
		if( $this->status !== $currentStatus ){
			if( $this->callbackOnChange ){
				call_user_func_array( $this->callbackOnChange, array( $this->status ) );
			}
		}
	}
276654
protected function beforeExtending($method, $callback)
    {
        if (empty($this->beforeExtendCallbacks[$method])) {
            $this->beforeExtendCallbacks[$method] = array();
        }
        $this->beforeExtendCallbacks[$method][] = $callback;
    }
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;
        }
    }
968316
public function setMethod($method = self::GET)
	{
		if (in_array($method, $this->allowedMethods)) {
			$this->method = $method;
		} else {
			throw new RuntimeException('Invalid method setted.');
		}
		
		return $this;
	}
1036653
public function setMethod($method)
    {
        if (is_string($method))
            $method = explode('|', $method);

        $this->method = array_map('strtoupper', $method);

        return $this;
    }
903972
private function callMethod($instance, $method)
    {
        if (!method_exists($instance, $method) || !is_callable([$instance, $method])) {
            return false;
        }

        return call_user_func([$instance, $method]);
    }
624998
protected function doRun($method, array $args=[]) {
		ob_start();
		$result = call_user_func_array($method, array_merge([$this], $args));
		$controllerBuffer =  ob_get_clean();

		if($result !== null)
			return $result;
		if($controllerBuffer)
			return $controllerBuffer;
		return null;
	}
22578
private function executeAuthMethod($method)
    {
        foreach ($this->auths as $auth) {
            if (is_callable([$auth, $method], true)) {
                if ($data = $auth->{$method}()) return $data;
            }
        }

        return false;
    }
858376
private function wrapTransactionNestingLevel($method)
    {
        $e = null;

        $this->setTransactionNestingLevel($this->getPersistedTransactionNestingLevel());

        try {
            \call_user_func(['parent', $method]);
        } catch (\Exception $e) {
        }

        $this->persistTransactionNestingLevel($this->getTransactionNestingLevel());

        if ($e) {
            throw $e;
        }
    }
1016771
public function setMethod($method = null)
    {
        if ($method === null) {
            $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : null;
        }

        $this->method = $method;
    }
1166742
protected function handle_request( $method, $request_method, array $arguments = [] ) {
		if ( empty( $method ) || 'page' === $method ) {
			$page = max( ( isset( $arguments[0] ) ? intval( $arguments[0] ) : 1 ), 1 );
			$this->pager( $page );
			exit;
		} else {
			// Call method if exists.
			if ( $this->invoke( $method, $request_method, $arguments ) ) {
				exit;
			} else {
				$this->method_not_found();
			}
		}
	}
357073
private static function validate_method( $method ) {

		if ( $method && isset( $method[0] ) && isset( $method[1] ) ) {
			if ( method_exists( $method[0], $method[1] ) ) {
				return true;
			}
		}

		return false;
	}
505321
public function setMethod($method)
    {
        parent::setMethod($method);
        if ($method !== 'GET') {
            switch ($method) {
                case 'POST':
                    $this->setOption(CURLOPT_POST, true);
                    break;
                default:
                    $this->setOption(CURLOPT_CUSTOMREQUEST, $this->method);
                    break;
            }
        }

        return $this;
    }
218417
private function validate($method)
    {
        $actionMethod = $method.'Method';
        $ref = new \ReflectionClass($this->manager);

        if (null === $this->$actionMethod || !$ref->hasMethod($this->$actionMethod)) {
            throw new \RuntimeException(sprintf('The "%s" method for "%s" adapter is does not supported', $method, $this->getClass()));
        }
    }
1072097
protected function matchMethods($method)
    {
        if (empty($this->methods)) {
            return true;
        }
        if (in_array($method, $this->methods)) {
            return true;
        }

        return false;
    }
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();
        }
    }
993319
private function throwException($method)
    {
        if (isset($this->exceptions[$method]) && ! empty($this->exceptions[$method])) {
            $exception = array_shift($this->exceptions[$method]);

            if ($exception != null) {
                throw $exception;
            }
        }
    }