$value) { $methodName = 'set' . ucfirst($key); if (method_exists($this, $methodName)) { $this->$methodName($value); } } } } /** * Returns the repositoryDir * * @return string $repositoryDir */ public function getRepositoryDir(): string { return $this->repositoryDir; } /** * Sets the repositoryDir * * @param string $repositoryDir */ public function setRepositoryDir(string $repositoryDir) { $this->repositoryDir = rtrim($repositoryDir, '/') . '/'; } }