/** * @param string $type */ public function create() { /* @var $userConfig Zend\Tool\Framework\Client\Config */ $userConfig = $this->_registry->getConfig(); $resp = $this->_registry->getResponse(); if ($userConfig->exists()) { throw new RuntimeException("A configuration already exists, cannot create a new one."); } $homeDirectory = $this->_detectHomeDirectory(); $writer = new \Zend\Config\Writer\Ini(); $writer->setRenderWithoutSections(); $filename = $homeDirectory . "/.zf.ini"; $config = array('php' => array('include_path' => get_include_path())); $writer->write($filename, new \Zend\Config\Config($config)); $resp = $this->_registry->getResponse(); $resp->appendContent("Successfully written Zend Tool config."); $resp->appendContent("It is located at: " . $filename); }