src/Router/ControllerFactory.php
protected function assertClass($class)
    {
        if (!preg_match('/^([a-zA-Z_]\w*\\\\)*[a-zA-Z_]\w*$/', $class)) {
            throw new \UnexpectedValueException("Can't route to controller '$class': invalid classname");
        }
        
        if (!class_exists($class)) {
            throw new \UnexpectedValueException("Can't route to controller '$class': class not exists");
        }

        $refl = new \ReflectionClass($class);
        $realClass = $refl->getName();
        
        if ($realClass !== $class) {
            throw new \UnexpectedValueException("Can't route to controller '$class': case mismatch with '$realClass'");
        }
    }
protected function assertClass($class)
    {
        if (!preg_match('/^([a-zA-Z_]\w*\\\\)*[a-zA-Z_]\w*$/', $class)) {
            throw new \UnexpectedValueException("Can't route to controller '$class': invalid classname");
        }
        
        if (!class_exists($class)) {
            throw new \UnexpectedValueException("Can't route to controller '$class': class not exists");
        }

        $refl = new \ReflectionClass($class);
        $realClass = $refl->getName();
        
        if ($realClass !== $class) {
            throw new \UnexpectedValueException("Can't route to controller '$class': case mismatch with '$realClass'");
        }
    }
protected function assertClass ( $ class ) { if ( ! preg_match ( '/^([a-zA-Z_]\w*\\\\)*[a-zA-Z_]\w*$/' , $ class ) ) { throw new \ UnexpectedValueException ( "Can't route to controller '$class': invalid classname" ) ; } if ( ! class_exists ( $ class ) ) { throw new \ UnexpectedValueException ( "Can't route to controller '$class': class not exists" ) ; } $ refl = new \ ReflectionClass ( $ class ) ; $ realClass = $ refl -> getName ( ) ; if ( $ realClass !== $ class ) { throw new \ UnexpectedValueException ( "Can't route to controller '$class': case mismatch with '$realClass'" ) ; } }
Assert that a class exists and will provide a callable object

@throws FactoryException
Assert that a class exists and will provide a callable object