protected function resolveRelativeFilepath( $view ) {
		$normalized_view = MixedType::normalizePath( $view );
		$paths = [ STYLESHEETPATH, TEMPLATEPATH ];

		foreach ( $paths as $path ) {
			$path = MixedType::addTrailingSlash( $path );

			if ( substr( $normalized_view, 0, strlen( $path ) ) === $path ) {
				return substr( $normalized_view, strlen( $path ) );
			}
		}

		// Bail if we've failed to convert the view to a relative path.
		return $view;
	}