Trigger all hooks at an event specified by the method name.

@param string $method
@param string $content
@return string
497290
protected function _triggerHook($method, $content = '') {
        if ($this->_hooks) {
            foreach ($this->_hooks as $hook) {
                if (method_exists($hook, $method)) {
                    $content = $hook->{$method}($content);
                }
            }
        }

        return $content;
    }
908361
public void setMethod(String method) {
	method = method.toLowerCase();
	if (method.equals("loop")) this.method = MODE_LOOP;
	else if (method.equals("exittag")) this.method = MODE_EXIT_TAG;
	else if (method.equals("exittemplate")) this.method = MODE_EXIT_TEMPLATE;
    }
181741
public static function it($var,
                              $method = AbstractDumper::PRINT_R,
                              $continue = false,
                              $hide = false,
                              $return = false)
    {

        if (self::$Enabled === false) {
            return null;
        }
        //detect console or ajax
        if (php_sapi_name() == 'cli') {
            //no custom dumper?
            if (self::$DumperClass == self::DEFAULT_DUMPER) {
                self::$DumperClass = self::CONSOLE_DUMPER;
            }
        } elseif (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
            if (self::$DumperClass == self::DEFAULT_DUMPER) {
                self::$DumperClass = self::AJAX_DUMPER;
            }
        }

        try {
            $Stop = new self::$DumperClass($hide, $continue, $return);
        } catch (\Exception $exc) {
            error_log($exc->getMessage());
            //fallback
            $default = self::DEFAULT_DUMPER;
            $Stop = new $default($hide, $continue, $return);
        }

        if ($method == AbstractDumper::PRINT_R) {
            return $Stop->print_r($var);
        }
        if ($method == AbstractDumper::GET_TYPE) {
            return $Stop->get_type($var);
        }
        return $Stop->var_dump($var);
    }
1342964
protected function checkMethod($subscriber, $event, $method)
    {
        if (!is_string($method)) {
            $message = 'Listener definition for event "%s" contains an invalid method reference: %s';
            $this->addProblem(sprintf($message, $event, $this->exporter->export($method)));
            return;
        }
        if (!method_exists($subscriber, $method)) {
            $message = 'Listener definition for event "%s" references method "%s", '
                     . 'but the method does not exist on subscriber.';
            $this->addProblem(sprintf($message, $event, $method));
            return;
        }
        if (!is_callable(array($subscriber, $method))) {
            $message = 'Listener definition for event "%s" references method "%s", '
                     . 'but the method is not publicly accessible.';
            $this->addProblem(sprintf($message, $event, $method));
            return;
        }
    }
973575
function addMethod (char, method) {
  var keyIsBound = hasKeybinding(char);
  var listener = keyupHandler.bind(null, char, method);

  bindings[char] = bindings[char] || {methods: [], listeners: []};

  if (keyIsBound) window.removeEventListener('keyup', bindings[char].listeners[0]);

  bindings[char].methods.unshift(method);
  bindings[char].listeners.unshift(listener);
  window.addEventListener('keyup', listener);
}
87784
private function addMethod($method)
    {
        $tokens = $this->methodParser->parse($method);
        $query = $this->queryBuilder->build($tokens, $this->tableName, $this->namingContention, $this->entityClass);
        if ($query->getResultMode() <= QueryBuilderResult::RESULT_SELECT_MULTIPLE) {
            $this->addSelectionMethod($query, $method);
        } else {
            $this->addIntResultMethod($query, $method);
        }

    }
276654
protected function beforeExtending($method, $callback)
    {
        if (empty($this->beforeExtendCallbacks[$method])) {
            $this->beforeExtendCallbacks[$method] = array();
        }
        $this->beforeExtendCallbacks[$method][] = $callback;
    }
1258230
public static function undefinedMethod($target, string $method): self
    {
        return new self(sprintf(
            'Method %s::%s() does not exist.',
            get_class($target),
            $method
        ));
    }
478968
protected function findReturningTrueOrFail($method)
    {
        if (!$candidate = call_user_func_array([$this, 'findReturningTrue'], func_get_args())) {
            throw new HandlerNotFoundException("No matching handler by $method found in ".get_class($this));
        }

        return $candidate;
    }
1277951
protected function getJsMethod($method)
    {
        $methods = [
            'get' => 'read',
            'post' => 'create',
            'put' => 'update',
            'delete' => 'delete',
        ];
        return isset($methods[strtolower($method)]) ? $methods[strtolower($method)] : 'read';
    }
1285980
protected function getSetterRestrict($method)
    {
        $namespace = $this->ref->getNamespaceName();
        $document  = $this->ref->getMethod($method)->getDocComment();

        $regex = sprintf(
            '~<code>(repeated\s*)?\.?(%s\.[\w\-]+).*<\/code>~',
            preg_quote(str_replace('\\', '.', $namespace))
        );

        preg_match($regex, $document, $matches);

        if (isset($matches[2])) {
            $class = str_replace('.', '\\', $matches[2]);
            if (class_exists($class) && is_subclass_of($class, Message::class)) {
                return [!empty($matches[1]), $class];
            }
        }

        return false;
    }
288119
protected function getMethodName($method, $docBlock = null): string
    {
        if ($docBlock !== null && $docBlock->hasTag(self::API_METHOD_NAME)) {
            $tags = $docBlock->getTagsByName(self::API_METHOD_NAME);

            return (string)$tags[0];
        }

        $controllerName = $method->getDeclaringClass();

        if (!empty($this->server->endpoint)) {
            return $method->getName();
        }

        return $this->getShortNameForController($controllerName->getName()) . '_' . $method->getName();
    }
979911
public static function bind(string $method, Closure $closure)
  {
    $trace = debug_backtrace()[1];

    if (
      $trace['class'] == 'Modulus\Framework\Upstart\Prototype' &&
      $trace['function'] == 'bind' &&
      count($trace['args']) == 3
    ) {
      if (!array_key_exists($method, Self::$functions)) {
        return Self::$functions[$method] = [$method => $closure];
      }

      throw new CannotAddMethodException;
    }

    throw new CannotCallMethodException('Call to ' . self::class . '::bind() is not allowed');
  }
1245252
public static function setMethod($method) {

		if(false === is_string($method)) {
  			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($method)), E_USER_ERROR);
  		}

		$_SERVER['REQUEST_METHOD'] = strtoupper($method);
	}
583487
public function appendMethod($method) {
    if (is_string($method)) {
      $method = InterfaceMethodNode::create($method);
    }
    $this->statements->lastChild()->before($method);
    FormatterFactory::format($this);
    return $this;
  }
340663
static void forEachColumnInContentValue(MethodSpec.Builder methodBuilder, final SQLiteModelMethod method, String columnSetString, boolean generateColumnNameCheck, OnColumnListener listener) {
		methodBuilder.beginControlFlow("for (String columnName:$L)", columnSetString);
		if (generateColumnNameCheck) {
			methodBuilder.beginControlFlow("if (!$L.contains(columnName))", method.contentProviderMethodName + "ColumnSet");
			methodBuilder.addStatement("throw new $T(String.format(\"For URI '$L', column '%s' does not exists in table '%s' or can not be defined in this $L operation\", columnName, $S ))",
					KriptonRuntimeException.class, method.contentProviderUriTemplate, method.jql.operationType, method.getEntity().getTableName());
			methodBuilder.endControlFlow();
		}
		if (listener != null)
			listener.onColumnCheck(methodBuilder, "columnName");
		methodBuilder.endControlFlow();
	}
897940
protected function triggerMethod($eventName, Event $event)
    {
        $method = sprintf('on%s', Container::camelize(str_replace('.', '_', $eventName)));

        if(is_callable([$this, $method])) {
            call_user_func_array([$this, $method], [$event]);
        }

        if($event->isPropagationStopped()){
            return $event;
        }

        $this->getDispatcher()->dispatch($eventName, $event);

        return $event;
    }