/** * Ensures that the directory structure is correct and the necessary directories are writable. */ private function validateDirectoryStructure() { if (true === is_null($this->service->getCertDir())) { $this->errors[] = _t('RealMeSetupTask.ERR_CERT_DIR_MISSING'); } elseif (false === $this->isReadable($this->service->getCertDir())) { $this->errors[] = _t('RealMeSetupTask.ERR_CERT_DIR_NOT_READABLE', '', '', array('dir' => $this->service->getCertDir())); } if (true === is_null($this->service->getLoggingDir())) { $this->errors[] = _t('RealMeSetupTask.ERR_LOG_DIR_MISSING'); } elseif (false === $this->isWriteable($this->service->getLoggingDir())) { $this->errors[] = _t('RealMeSetupTask.ERR_LOG_DIR_NOT_WRITEABLE', '', '', array('dir' => $this->service->getLoggingDir())); } if (true === is_null($this->service->getTempDir())) { $this->errors[] = _t('RealMeSetupTask.ERR_TEMP_DIR_MISSING'); } elseif (false === $this->isWriteable($this->service->getTempDir()) && false === $this->isWriteable(dirname($this->service->getTempDir()))) { $this->errors[] = _t('RealMeSetupTask.ERR_TEMP_DIR_NOT_WRITEABLE', '', '', array('dir' => $this->service->getTempDir())); } }