ResourceNotFoundException.php 655 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OC\Template;
  8. class ResourceNotFoundException extends \LogicException {
  9. protected $resource;
  10. protected $webPath;
  11. /**
  12. * @param string $resource
  13. * @param string $webPath
  14. */
  15. public function __construct($resource, $webPath) {
  16. parent::__construct('Resource not found');
  17. $this->resource = $resource;
  18. $this->webPath = $webPath;
  19. }
  20. /**
  21. * @return string
  22. */
  23. public function getResourcePath() {
  24. return $this->webPath . '/' . $this->resource;
  25. }
  26. }