@Override
  public Set<FileObject> extend(PhpModule phpModule) throws ExtendingException {
    // init project
    ZendScript zendScript = null;
    try {
      zendScript = ZendScript.getDefault();
    } catch (InvalidPhpExecutableException ex) {
      // should not happen, must be handled in the wizard
      Exceptions.printStackTrace(ex);
    }

    if (!zendScript.initProject(phpModule)) {
      // can happen if zend script was not chosen
      Logger.getLogger(ZendPhpModuleExtender.class.getName())
          .log(
              Level.INFO,
              "Framework Zend not found in newly created project {0}",
              phpModule.getDisplayName());
      throw new ExtendingException(
          NbBundle.getMessage(ZendPhpModuleExtender.class, "MSG_NotExtended"));
    }

    // prefetch commands
    ZendPhpFrameworkProvider.getInstance()
        .getFrameworkCommandSupport(phpModule)
        .refreshFrameworkCommandsLater(null);

    // return files
    Set<FileObject> files = new HashSet<FileObject>();
    FileObject appConfig =
        phpModule
            .getSourceDirectory()
            .getFileObject("application/configs/application.ini"); // NOI18N
    if (appConfig != null) {
      files.add(appConfig);
    }
    FileObject indexController =
        phpModule
            .getSourceDirectory()
            .getFileObject("application/controllers/IndexController.php"); // NOI18N
    if (indexController != null) {
      files.add(indexController);
    }
    FileObject bootstrap =
        phpModule.getSourceDirectory().getFileObject("application/Bootstrap.php"); // NOI18N
    if (bootstrap != null) {
      files.add(bootstrap);
    }

    return files;
  }
 private void browseTargetFolderButtonActionPerformed(
     ActionEvent evt) { // GEN-FIRST:event_browseTargetFolderButtonActionPerformed
   File target =
       new FileChooserBuilder(ApiGenProvider.lastDirFor(phpModule))
           .setTitle(info)
           .setDirectoriesOnly(true)
           .setFileHiding(true)
           .setDefaultWorkingDirectory(FileUtil.toFile(phpModule.getSourceDirectory()))
           .showOpenDialog();
   if (target != null) {
     target = FileUtil.normalizeFile(target);
     targetFolderTextField.setText(target.getAbsolutePath());
   }
 } // GEN-LAST:event_browseTargetFolderButtonActionPerformed
 private void browseTargetFolderButtonActionPerformed(
     ActionEvent evt) { // GEN-FIRST:event_browseTargetFolderButtonActionPerformed
   File phpDocTarget =
       new FileChooserBuilder(
               PhpDocumentorProvider.class.getName()
                   + PhpDocumentorProvider.PHPDOC_LAST_FOLDER_SUFFIX
                   + phpModule.getName())
           .setTitle(info)
           .setDirectoriesOnly(true)
           .setFileHiding(true)
           .setDefaultWorkingDirectory(FileUtil.toFile(phpModule.getSourceDirectory()))
           .showOpenDialog();
   if (phpDocTarget != null) {
     phpDocTarget = FileUtil.normalizeFile(phpDocTarget);
     targetFolderTextField.setText(phpDocTarget.getAbsolutePath());
   }
 } // GEN-LAST:event_browseTargetFolderButtonActionPerformed