src/main/php/routing/Routing.php
public function postIntercept($postInterceptor, string $path = null, string $requestMethod = null): RoutingConfigurator
    {
        if (!is_callable($postInterceptor) && !($postInterceptor instanceof PostInterceptor) && !class_exists((string) $postInterceptor)) {
            throw new \InvalidArgumentException(
                    'Given pre interceptor must be a callable, an instance of '
                    . PostInterceptor::class
                    . ' or a class name of an existing post interceptor class'
            );
        }

        $this->postInterceptors[] = [
                'interceptor'   => $postInterceptor,
                'requestMethod' => $requestMethod,
                'path'          => $path
        ];
        return $this;
    }
public function postIntercept($postInterceptor, string $path = null, string $requestMethod = null): RoutingConfigurator
    {
        if (!is_callable($postInterceptor) && !($postInterceptor instanceof PostInterceptor) && !class_exists((string) $postInterceptor)) {
            throw new \InvalidArgumentException(
                    'Given pre interceptor must be a callable, an instance of '
                    . PostInterceptor::class
                    . ' or a class name of an existing post interceptor class'
            );
        }

        $this->postInterceptors[] = [
                'interceptor'   => $postInterceptor,
                'requestMethod' => $requestMethod,
                'path'          => $path
        ];
        return $this;
    }
public function postIntercept ( $ postInterceptor , string $ path = null , string $ requestMethod = null ) : RoutingConfigurator { if ( ! is_callable ( $ postInterceptor ) && ! ( $ postInterceptor instanceof PostInterceptor ) && ! class_exists ( ( string ) $ postInterceptor ) ) { throw new \ InvalidArgumentException ( 'Given pre interceptor must be a callable, an instance of ' . PostInterceptor :: class . ' or a class name of an existing post interceptor class' ) ; } $ this -> postInterceptors [ ] = [ 'interceptor' => $ postInterceptor , 'requestMethod' => $ requestMethod , 'path' => $ path ] ; return $ this ; }
post intercept with given class or callable on all requests

@param   string|callable|\stubbles\webapp\interceptor\PostInterceptor  $postInterceptor  post interceptor to add
@param   string                                                        $path             optional  path for which post interceptor should be executed
@param   string                                                        $requestMethod    optional  request method for which interceptor should be executed
@return  \stubbles\webapp\RoutingConfigurator
@throws  \InvalidArgumentException
post intercept with given class or callable on all requests