src/main/php/routing/Route.php
public function preIntercept($preInterceptor): ConfigurableRoute
    {
        if (!is_callable($preInterceptor) && !($preInterceptor instanceof PreInterceptor) && !class_exists((string) $preInterceptor)) {
            throw new \InvalidArgumentException(
                    'Given pre interceptor must be a callable, an instance of '
                    . PreInterceptor::class
                    . ' or a class name of an existing pre interceptor class'
            );
        }

        $this->preInterceptors[] = $preInterceptor;
        return $this;
    }
public function preIntercept($preInterceptor): ConfigurableRoute
    {
        if (!is_callable($preInterceptor) && !($preInterceptor instanceof PreInterceptor) && !class_exists((string) $preInterceptor)) {
            throw new \InvalidArgumentException(
                    'Given pre interceptor must be a callable, an instance of '
                    . PreInterceptor::class
                    . ' or a class name of an existing pre interceptor class'
            );
        }

        $this->preInterceptors[] = $preInterceptor;
        return $this;
    }
public function preIntercept ( $ preInterceptor ) : ConfigurableRoute { if ( ! is_callable ( $ preInterceptor ) && ! ( $ preInterceptor instanceof PreInterceptor ) && ! class_exists ( ( string ) $ preInterceptor ) ) { throw new \ InvalidArgumentException ( 'Given pre interceptor must be a callable, an instance of ' . PreInterceptor :: class . ' or a class name of an existing pre interceptor class' ) ; } $ this -> preInterceptors [ ] = $ preInterceptor ; return $ this ; }
add a pre interceptor for this route

@param   string|callable|\stubbles\webapp\interceptor\PreInterceptor  $preInterceptor
@return  \stubbles\webapp\routing\Route
@throws  \InvalidArgumentException
add a pre interceptor for this route