src/Arvici/Component/View/View.php
public function getFullPath()
    {
        $key = 'template.templatePath';

        if ($this->type === self::PART_BODY) {
            $key = 'template.viewPath';
        }

        $path = Configuration::get($key, null);
        if ($path === null) { // @codeCoverageIgnore
            throw new ConfigurationException("The template.templatePath or template.viewPath isn't configured right or doesn't exists!"); // @codeCoverageIgnore
        } // @codeCoverageIgnore

        $foundView = false;
        try {
            AppManager::getInstance()->initApps();
        } catch (\Exception $exception) {}
        foreach (AppManager::getInstance()->getApps() as $app) {
            $testPath = $app->getAppDirectory() . DS . $path . DS . $this->getPath();

            if (is_file($testPath)) {
                $path = $testPath;
                $foundView = true;
            }
        }

        if (! $foundView) {
            throw new NotFoundException('Template or view file not found in any apps!');
        }

        return $path;
    }
public function getFullPath()
    {
        $key = 'template.templatePath';

        if ($this->type === self::PART_BODY) {
            $key = 'template.viewPath';
        }

        $path = Configuration::get($key, null);
        if ($path === null) { // @codeCoverageIgnore
            throw new ConfigurationException("The template.templatePath or template.viewPath isn't configured right or doesn't exists!"); // @codeCoverageIgnore
        } // @codeCoverageIgnore

        $foundView = false;
        try {
            AppManager::getInstance()->initApps();
        } catch (\Exception $exception) {}
        foreach (AppManager::getInstance()->getApps() as $app) {
            $testPath = $app->getAppDirectory() . DS . $path . DS . $this->getPath();

            if (is_file($testPath)) {
                $path = $testPath;
                $foundView = true;
            }
        }

        if (! $foundView) {
            throw new NotFoundException('Template or view file not found in any apps!');
        }

        return $path;
    }
public function getFullPath ( ) { $ key = 'template.templatePath' ; if ( $ this -> type === self :: PART_BODY ) { $ key = 'template.viewPath' ; } $ path = Configuration :: get ( $ key , null ) ; if ( $ path === null ) { // @codeCoverageIgnore throw new ConfigurationException ( "The template.templatePath or template.viewPath isn't configured right or doesn't exists!" ) ; // @codeCoverageIgnore } // @codeCoverageIgnore $ foundView = false ; try { AppManager :: getInstance ( ) -> initApps ( ) ; } catch ( \ Exception $ exception ) { } foreach ( AppManager :: getInstance ( ) -> getApps ( ) as $ app ) { $ testPath = $ app -> getAppDirectory ( ) . DS . $ path . DS . $ this -> getPath ( ) ; if ( is_file ( $ testPath ) ) { $ path = $ testPath ; $ foundView = true ; } } if ( ! $ foundView ) { throw new NotFoundException ( 'Template or view file not found in any apps!' ) ; } return $ path ; }
Get full path of view file.
@return string
@throws ConfigurationException
@throws NotFoundException
Get full path of view file .