protected function createFromInvokable($canonicalName, $requestedName)
    {
        $invokable = $this->invokableClasses[$canonicalName];
        if (!class_exists($invokable)) {
            throw new RuntimeException(sprintf(
                '%s: failed retrieving "%s%s" via invokable class "%s"; class does not exist',
                __METHOD__,
                $canonicalName,
                ($requestedName ? '(alias: ' . $requestedName . ')' : ''),
                $invokable
            ));
        }

        if (!static::isSubclassOf($invokable, __NAMESPACE__ . '\RouteInterface')) {
            throw new RuntimeException(sprintf(
                '%s: failed retrieving "%s%s" via invokable class "%s"; class does not implement %s\RouteInterface',
                __METHOD__,
                $canonicalName,
                ($requestedName ? '(alias: ' . $requestedName . ')' : ''),
                $invokable,
                __NAMESPACE__
            ));
        }

        return $invokable::factory($this->creationOptions);
    }
protected function createFromInvokable($canonicalName, $requestedName)
    {
        $invokable = $this->invokableClasses[$canonicalName];
        if (!class_exists($invokable)) {
            throw new RuntimeException(sprintf(
                '%s: failed retrieving "%s%s" via invokable class "%s"; class does not exist',
                __METHOD__,
                $canonicalName,
                ($requestedName ? '(alias: ' . $requestedName . ')' : ''),
                $invokable
            ));
        }

        if (!static::isSubclassOf($invokable, __NAMESPACE__ . '\RouteInterface')) {
            throw new RuntimeException(sprintf(
                '%s: failed retrieving "%s%s" via invokable class "%s"; class does not implement %s\RouteInterface',
                __METHOD__,
                $canonicalName,
                ($requestedName ? '(alias: ' . $requestedName . ')' : ''),
                $invokable,
                __NAMESPACE__
            ));
        }

        return $invokable::factory($this->creationOptions);
    }
protected function createFromInvokable ( $ canonicalName , $ requestedName ) { $ invokable = $ this -> invokableClasses [ $ canonicalName ] ; if ( ! class_exists ( $ invokable ) ) { throw new RuntimeException ( sprintf ( '%s: failed retrieving "%s%s" via invokable class "%s"; class does not exist' , __METHOD__ , $ canonicalName , ( $ requestedName ? '(alias: ' . $ requestedName . ')' : '' ) , $ invokable ) ) ; } if ( ! static :: isSubclassOf ( $ invokable , __NAMESPACE__ . '\RouteInterface' ) ) { throw new RuntimeException ( sprintf ( '%s: failed retrieving "%s%s" via invokable class "%s"; class does not implement %s\RouteInterface' , __METHOD__ , $ canonicalName , ( $ requestedName ? '(alias: ' . $ requestedName . ')' : '' ) , $ invokable , __NAMESPACE__ ) ) ; } return $ invokable :: factory ( $ this -> creationOptions ) ; }
Attempt to create an instance via an invokable class.

Overrides parent implementation by invoking the route factory,
passing $creationOptions as the argument.

@param string $canonicalName
@param string $requestedName

@throws Exception\RuntimeException If resolved class does not exist, or does not implement RouteInterface

@return null|\stdClass
Attempt to create an instance via an invokable class .