src/main/php/routing/CalledUri.php
public static function castFrom($requestUri, string $requestMethod = null)
    {
        if ($requestUri instanceof self) {
            return $requestUri;
        }

        return new self($requestUri, (string) $requestMethod);
    }
public static function castFrom($requestUri, string $requestMethod = null)
    {
        if ($requestUri instanceof self) {
            return $requestUri;
        }

        return new self($requestUri, (string) $requestMethod);
    }
public static function castFrom ( $ requestUri , string $ requestMethod = null ) { if ( $ requestUri instanceof self ) { return $ requestUri ; } return new self ( $ requestUri , ( string ) $ requestMethod ) ; }
casts given values to an instance of UriRequest

@param   string|\stubbles\webapp\routing\CalledUri  $requestUri
@param   string                                     $requestMethod
@return  \stubbles\webapp\routing\CalledUri
@since   4.0.0
casts given values to an instance of UriRequest