/** * Returns the target location where to store the structure.xml. * * @throws Zend_Console_Getopt_Exception * * @return string */ public function getTarget() { $target = parent::getTarget(); $target = $target === null ? trim(DocBlox_Core_Abstract::config()->parser->target) : trim($target); if ($target == '' || $target == DIRECTORY_SEPARATOR) { throw new Zend_Console_Getopt_Exception('Either an empty path or root was given: ' . $target); } if (!is_dir($target)) { throw new Zend_Console_Getopt_Exception('The given location "' . $target . '" is not a folder'); } if (!is_writable($target)) { throw new Zend_Console_Getopt_Exception('The given path "' . $target . '" either does not exist or is not writable.'); } return realpath($target); }