WowPress-Tailwind/theme/vendor/illuminate/view/ViewName.php

26 lines
521 B
PHP
Raw Permalink Normal View History

2024-04-15 23:07:29 +02:00
<?php
namespace Illuminate\View;
class ViewName
{
/**
* Normalize the given view name.
*
* @param string $name
* @return string
*/
public static function normalize($name)
{
$delimiter = ViewFinderInterface::HINT_PATH_DELIMITER;
if (! str_contains($name, $delimiter)) {
return str_replace('/', '.', $name);
}
[$namespace, $name] = explode($delimiter, $name);
return $namespace.$delimiter.str_replace('/', '.', $name);
}
}