src/Whoops/Handler/PrettyPageHandler.php
protected function getResource($resource)
    {
        // If the resource was found before, we can speed things up
        // by caching its absolute, resolved path:
        if (isset($this->resourceCache[$resource])) {
            return $this->resourceCache[$resource];
        }

        // Search through available search paths, until we find the
        // resource we're after:
        foreach ($this->searchPaths as $path) {
            $fullPath = $path . "/$resource";

            if (is_file($fullPath)) {
                // Cache the result:
                $this->resourceCache[$resource] = $fullPath;
                return $fullPath;
            }
        }

        // If we got this far, nothing was found.
        throw new RuntimeException(
            "Could not find resource '$resource' in any resource paths."
            . "(searched: " . join(", ", $this->searchPaths). ")"
        );
    }
protected function getResource($resource)
    {
        // If the resource was found before, we can speed things up
        // by caching its absolute, resolved path:
        if (isset($this->resourceCache[$resource])) {
            return $this->resourceCache[$resource];
        }

        // Search through available search paths, until we find the
        // resource we're after:
        foreach ($this->searchPaths as $path) {
            $fullPath = $path . "/$resource";

            if (is_file($fullPath)) {
                // Cache the result:
                $this->resourceCache[$resource] = $fullPath;
                return $fullPath;
            }
        }

        // If we got this far, nothing was found.
        throw new RuntimeException(
            "Could not find resource '$resource' in any resource paths."
            . "(searched: " . join(", ", $this->searchPaths). ")"
        );
    }
protected function getResource ( $ resource ) { // If the resource was found before, we can speed things up // by caching its absolute, resolved path: if ( isset ( $ this -> resourceCache [ $ resource ] ) ) { return $ this -> resourceCache [ $ resource ] ; } // Search through available search paths, until we find the // resource we're after: foreach ( $ this -> searchPaths as $ path ) { $ fullPath = $ path . "/$resource" ; if ( is_file ( $ fullPath ) ) { // Cache the result: $ this -> resourceCache [ $ resource ] = $ fullPath ; return $ fullPath ; } } // If we got this far, nothing was found. throw new RuntimeException ( "Could not find resource '$resource' in any resource paths." . "(searched: " . join ( ", " , $ this -> searchPaths ) . ")" ) ; }
Finds a resource, by its relative path, in all available search paths.
The search is performed starting at the last search path, and all the
way back to the first, enabling a cascading-type system of overrides
for all resources.

@throws RuntimeException If resource cannot be found in any of the available paths

@param  string $resource
@return string
Finds a resource by its relative path in all available search paths . The search is performed starting at the last search path and all the way back to the first enabling a cascading - type system of overrides for all resources .