function KernelInterface::locateResource
Returns the file path for a given bundle resource.
A Resource can be a file or a directory.
The resource name must follow the following pattern:
"@BundleName/path/to/a/file.something"
where BundleName is the name of the bundle and the remaining part is the relative path in the bundle.
Throws
\InvalidArgumentException if the file cannot be found or the name is not valid
\RuntimeException if the name contains invalid/unsafe characters
1 method overrides KernelInterface::locateResource()
- Kernel::locateResource in vendor/
symfony/ http-kernel/ Kernel.php - Returns the file path for a given bundle resource.
File
-
vendor/
symfony/ http-kernel/ KernelInterface.php, line 86
Class
- KernelInterface
- The Kernel is the heart of the Symfony system.
Namespace
Symfony\Component\HttpKernelCode
public function locateResource(string $name) : string;