How can I configure Zend_Tool to provide my own skeleton / template?

Zend_Tool is good, it generates a project with the given name and the given path.

But after a while I began to develop my own tools, such as helpers, plugins, validators, etc.

I put them in the library, which is normal (and recommended).

But I will need to run my project with the same boot file, including initializing my plugins, helpers, translating an object, a db object, etc.

Some can be done in application.ini.

Then I would like to write my own common application.ini, some initialization code inside my boot file, maybe some directory, etc.

What / How are you doing?

+5
source share
3 answers

I suppose one solution would be to edit the files in the / zend / Tool / Project / Context / Zf library, which seem to provide the contents / structures used for the finished project.

But this does not seem to be the right decision. Further, I already found in my current research that the tool (zf.bat or sh) checks all directories on php inculde_path for "manifest" and "providers", which, in turn, provide functionality for the tool.

In a Zend_Tool article for a developer, one of the Zend developers just explained some things.

Manifestos

can be used to link and β€œload” as many suppliers as possible.

Providers

, , CLI, , "/". () () , :

zf <method-name> <class-name>

, Zend_Tool_Project_Provider_Abstract

, , , , :

\Zend\\Project\Provider\Manifest.php

:

public function getProviders()
{
    return array(
        new Zend_Tool_Project_Provider_Profile(),
        new Zend_Tool_Project_Provider_Project(),
        new Zend_Tool_Project_Provider_Controller(),
        new Zend_Tool_Project_Provider_Action(),
        new Zend_Tool_Project_Provider_View(),
        new Zend_Tool_Project_Provider_Module(),
        new Zend_Tool_Project_Provider_ProjectProvider()
    );
}

, , CLI .

, , , xml, /Zend/Tool/Project/Provider/ _getDefaultProfile().

, :

  • , _getDefaultProfile() true false.

, CLI . !

+3

zend, . , , , Bootstrap class Boostrap extends Zend_Application_Boostrap_Bootstrap extends My_Bootstrap

0

:

http://framework.zend.com/manual/en/zend.controller.modular.html

, , / application.ini. , , Bootstraps.

...

, Zend_Tool , . , , ( , , / ) Zend Framework .

application.ini (application-foo.ini, application-bar.ini). (SetEnv APP_DEPLOYMENT foo), .htaccess, ini bootstrap (index.php). , Zend_Application_Resource_Modules.

, , / . Phing, Capistrano Ant .

0

All Articles