src/System.php
public function setDirectory ($directory) {
        if (strpos($directory, '/') !== 0) {
            throw new Exception\InvalidArgumentException('Directory name must be an absolute path.');
        }

        if (!is_dir($directory)) {
            throw new Exception\LogicException('Template directory does not exist.');
        }

        $this->directory = realpath($directory);
    }
public function setDirectory ($directory) {
        if (strpos($directory, '/') !== 0) {
            throw new Exception\InvalidArgumentException('Directory name must be an absolute path.');
        }

        if (!is_dir($directory)) {
            throw new Exception\LogicException('Template directory does not exist.');
        }

        $this->directory = realpath($directory);
    }
public function setDirectory ( $ directory ) { if ( strpos ( $ directory , '/' ) !== 0 ) { throw new Exception \ InvalidArgumentException ( 'Directory name must be an absolute path.' ) ; } if ( ! is_dir ( $ directory ) ) { throw new Exception \ LogicException ( 'Template directory does not exist.' ) ; } $ this -> directory = realpath ( $ directory ) ; }
Template resolution is restricted to the paths under the template directory.

@param string $directory Absolute path to the template directory.
Template resolution is restricted to the paths under the template directory .