protected function resolveFromCustomFilepath( $view ) {
		$directory = $this->getDirectory();

		if ( $directory === '' ) {
			return '';
		}

		// Normalize to ensure there are no doubled separators.
		$file = MixedType::normalizePath( $directory . DIRECTORY_SEPARATOR . $view );

		if ( ! file_exists( $file ) ) {
			// Try adding a .php extension.
			$file .= '.php';
		};

		return file_exists( $file ) ? $file : '';
	}