zf创建项目路径概要文件名称概要文件 [英] zf create project path name-of-profile file-of-profile

查看:118
本文介绍了zf创建项目路径概要文件名称概要文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到描述以下Zend_Tool命令的好资源:

I was not able to find a good resource which is describing the following Zend_Tool command:

  • zf创建项目路径配置文件名称配置文件

甚至不在这里:

有人知道有关此命令的丰富资源吗?
注意:我对配置文件名称配置文件文件部分感兴趣.用法,示例等.

Does somebody know a good resource regarding this command?
Note: I'm interested in the name-of-profile and file-of-profile part. Usage, examples, etc.

甚至可能是这种参考文献中的视觉方法:

Maybe even a visual approach like in this references:

  • http://marklodato.github.com/visual-git-guide/index-en.html
  • http://osteele.com/archives/2008/05/commit-policies

推荐答案

我对ZF Tool Project的内部知识并不熟悉,但是请看一下

I am not familiar enough with the internals of ZF Tool Project, but have a look at

  • http://framework.zend.com/manual/en/zend.tool.project.create-a-project.html
  • http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Tool/Project/Provider/Project.php

Afaik(不多)Zend Tool维护一个XML文件来跟踪您的项目.通过Zend Tool将任何后续操作正确应用到您的项目中,这是必需的.

Afaik (which is not much) Zend Tool maintains an XML file to keep track of your project. This is required for any subsequent actions to be applied correctly to your project through Zend Tool.

项目提供程序中create操作的DocBlock表示:

The DocBlock for the create action in the Project Provider says:

/**
 * create()
 *
 * @param string $path
 * @param string $nameOfProfile shortName=n
 * @param string $fileOfProfile shortName=f
 */

在没有两个可选参数的情况下运行时,该方法最终将使用以下内容创建一个新的项目文件

When run without the two optional arguments, the method will eventually create a new project file with

    $newProfile = new Zend_Tool_Project_Profile(array(
        'projectDirectory' => $path,
        'profileData' => $profileData
        ));

,其中$profileDate是默认配置文件的内容.如果指定$fileOfProfile,则可以覆盖配置文件并提供自己的文件,例如

with $profileDate being the content of the default configuration file. If you specify $fileOfProfile, you can override the configuration file and supply your own file, e.g.

    if ($fileOfProfile != null && file_exists($fileOfProfile)) {
        $profileData = file_get_contents($fileOfProfile);
    }

很显然,您必须提供文件的完整路径才能正常工作.另一种方法是提供一个文件标识符,然后Zend Tool会尝试在一个预定义的位置(例如

Obviously, you have to supply a full path to the file for this to work. The alternative is to supply a file identifier, which Zend Tool will then try to find in a predefined location, e.g.

    $storage = $this->_registry->getStorage();
    if ($profileData == '' && $nameOfProfile != null && $storage->isEnabled()) {
        $profileData = $storage->get('project/profiles/' . $nameOfProfile . '.xml');
    }

我不知道存储部分是什么.就像我说的那样,我对Zend Tool的内部运作方式并不熟悉.如果我理解正确,则可以使用另外两个参数将现有项目加载到新位置或自定义默认位置.

I have no clue what the storage part is about. Like I said, I am not familiar with Zend Tool's inner workings. If I understand correctly, you can use the additional two arguments to load an existing project in a new location or customize the default one.

您可能要浏览

You might want to browse the ChangeLog to find out more about it.

这篇关于zf创建项目路径概要文件名称概要文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆