src/Neutrino/Foundation/Micro/Kernel.php
protected function registerMiddleware(Middleware $middleware)
    {
        $on = $middleware->bindOn();
        if ($on == 'before') {
            $this->before($middleware);
        } elseif ($on == 'after') {
            $this->after($middleware);
        } elseif ($on == 'finish') {
            $this->finish($middleware);
        } else {
            throw new \RuntimeException(__METHOD__ . ': ' . get_class($middleware) . ' can\'t bind on "' . $on . '"');
        }
    }
protected function registerMiddleware(Middleware $middleware)
    {
        $on = $middleware->bindOn();
        if ($on == 'before') {
            $this->before($middleware);
        } elseif ($on == 'after') {
            $this->after($middleware);
        } elseif ($on == 'finish') {
            $this->finish($middleware);
        } else {
            throw new \RuntimeException(__METHOD__ . ': ' . get_class($middleware) . ' can\'t bind on "' . $on . '"');
        }
    }
@param \Neutrino\Micro\Middleware $middleware

@throws \RuntimeException