/** * @param array $hash */ private function _writeToComposerFile(array $hash) { $composerFile = new Composer\Json\JsonFile($this->_installation->getDirRoot() . 'composer.json'); $configCurrent = $composerFile->read(); $this->_filesystemHelper->notify('modify', 'composer.json'); $configMerged = $this->_mergeConfigs($configCurrent, $hash); $composerFile->write($configMerged); $this->_installation->reload(); }
/** * @param string $className * @return string * @throws CM_Exception_Invalid */ protected function _getClassPath($className) { $namespace = CM_Util::getNamespace($className); $namespacePath = $this->_appInstallation->getNamespacePath($namespace); return $namespacePath . str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; }