NamespacedFileLoaderTrait
trait NamespacedFileLoaderTrait
Namespaced file loader trait.
Properties
protected string | $path | Default path. | |
protected string | $extension | File extension. | |
protected array | $namespaces | Namespaces. |
Methods
setPath(string $path)
Sets the default path.
setExtension(string $extension)
Sets the extension.
registerNamespace(string $namespace, string $path)
Registers a namespace.
string
getFilePath(string $file, string|null $extension = null, string|null $suffix = null)
Returns the path to the file.
array
getCascadingFilePaths(string $file, string|null $extension = null, string|null $suffix = null)
Returns an array of cascading file paths.
Details
at line 49
setPath(string $path)
Sets the default path.
at line 59
setExtension(string $extension)
Sets the extension.
at line 70
registerNamespace(string $namespace, string $path)
Registers a namespace.
at line 83
protected string
getFilePath(string $file, string|null $extension = null, string|null $suffix = null)
Returns the path to the file.
at line 125
protected array
getCascadingFilePaths(string $file, string|null $extension = null, string|null $suffix = null)
Returns an array of cascading file paths.