Ouzo\ViewPathResolver::resolveViewPath PHP Method

resolveViewPath() public static method

public static resolveViewPath ( $name, $responseType )
    public static function resolveViewPath($name, $responseType)
    {
        return Path::join(ROOT_PATH, ApplicationPaths::getViewPath(), $name . self::getViewPostfix($responseType));
    }

Usage Example

Beispiel #1
0
 public function render(OuzoExceptionData $exceptionData, $viewName)
 {
     /** @noinspection PhpUnusedLocalVariableInspection */
     $errorMessage = $exceptionData->getMessage();
     $errorTrace = $exceptionData->getStackTrace();
     Logger::getLogger(__CLASS__)->error($exceptionData->getOriginalMessage());
     Logger::getLogger(__CLASS__)->error(Objects::toString($errorTrace));
     $this->clearOutputBuffers();
     header($exceptionData->getHeader());
     $responseType = ResponseTypeResolve::resolve();
     header('Content-type: ' . $responseType);
     $additionalHeaders = $exceptionData->getAdditionalHeaders();
     array_walk($additionalHeaders, function ($header) {
         header($header);
     });
     /** @noinspection PhpIncludeInspection */
     require ViewPathResolver::resolveViewPath($viewName, $responseType);
 }