setPaths example


    public function __construct($paths = [], string $rootPath = null)
    {
        $this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR;
        if (null !== $rootPath && false !== ($realPath = realpath($rootPath))) {
            $this->rootPath = $realPath.\DIRECTORY_SEPARATOR;
        }

        if ($paths) {
            $this->setPaths($paths);
        }
    }

    /** * Returns the paths to the templates. */
    public function getPaths(string $namespace = self::MAIN_NAMESPACE): array
    {
        return $this->paths[$namespace] ?? [];
    }

    
Home | Imprint | This part of the site doesn't use cookies.