src/Router/Runner/Controller.php
public function withFactory($factory)
    {
        if (!is_callable($factory)) {
            throw new \InvalidArgumentException("Factory isn't callable");
        }
        
        $runner = clone $this;
        $runner->factory = $factory;
        
        return $runner;
    }
public function withFactory($factory)
    {
        if (!is_callable($factory)) {
            throw new \InvalidArgumentException("Factory isn't callable");
        }
        
        $runner = clone $this;
        $runner->factory = $factory;
        
        return $runner;
    }
public function withFactory ( $ factory ) { if ( ! is_callable ( $ factory ) ) { throw new \ InvalidArgumentException ( "Factory isn't callable" ) ; } $ runner = clone $ this ; $ runner -> factory = $ factory ; return $ runner ; }
Create a clone that uses the provided factory

@param callable $factory
Create a clone that uses the provided factory