@@ 772-781 (lines=10) @@ | ||
769 | * @return void |
|
770 | * @throws Exception |
|
771 | */ |
|
772 | public function setCacheDir($dir) |
|
773 | { |
|
774 | $this->cacheDir = rtrim($dir, '/\\') . DIRECTORY_SEPARATOR; |
|
775 | if (!file_exists($this->cacheDir)) { |
|
776 | mkdir($this->cacheDir, 0777, true); |
|
777 | } |
|
778 | if (is_writable($this->cacheDir) === false) { |
|
779 | throw new Exception('The cache directory must be writable, chmod "' . $this->cacheDir . '" to make it writable'); |
|
780 | } |
|
781 | } |
|
782 | ||
783 | /** |
|
784 | * Returns the compile directory with a trailing DIRECTORY_SEPARATOR. |
|
@@ 805-814 (lines=10) @@ | ||
802 | * @return void |
|
803 | * @throws Exception |
|
804 | */ |
|
805 | public function setCompileDir($dir) |
|
806 | { |
|
807 | $this->compileDir = rtrim($dir, '/\\') . DIRECTORY_SEPARATOR; |
|
808 | if (!file_exists($this->compileDir)) { |
|
809 | mkdir($this->compileDir, 0777, true); |
|
810 | } |
|
811 | if (is_writable($this->compileDir) === false) { |
|
812 | throw new Exception('The compile directory must be writable, chmod "' . $this->compileDir . '" to make it writable'); |
|
813 | } |
|
814 | } |
|
815 | ||
816 | /** |
|
817 | * Returns an array of the template directory with a trailing DIRECTORY_SEPARATOR |