diff options
Diffstat (limited to 'lib/private/Template/ResourceNotFoundException.php')
-rw-r--r-- | lib/private/Template/ResourceNotFoundException.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/private/Template/ResourceNotFoundException.php b/lib/private/Template/ResourceNotFoundException.php new file mode 100644 index 00000000000..e51dfb5cb89 --- /dev/null +++ b/lib/private/Template/ResourceNotFoundException.php @@ -0,0 +1,30 @@ +<?php + +/** + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only + */ +namespace OC\Template; + +class ResourceNotFoundException extends \LogicException { + protected $resource; + protected $webPath; + + /** + * @param string $resource + * @param string $webPath + */ + public function __construct($resource, $webPath) { + parent::__construct('Resource not found'); + $this->resource = $resource; + $this->webPath = $webPath; + } + + /** + * @return string + */ + public function getResourcePath() { + return $this->webPath . '/' . $this->resource; + } +} |