public function setCacheDir($oCacheDir) { if (!$oCacheDir instanceof File) { $oCacheDir = new File($oCacheDir); } if (!$oCacheDir->exists()) { throw new RuntimeException("Cache directory \"{$oCacheDir}\" does not exist."); } if (!$oCacheDir->canWrite()) { throw new RuntimeException("Cache directory \"{$oCacheDir}\" is not writable."); } $this->oCacheDir = $oCacheDir; }