zerkms
zerkms

Reputation: 254926

Is it possible to add custom context to the .zfproject.xml?

I need to add custom context classesDirectory in applicationDirectory section to the .zfproject.xml.

I have created a context class, that extends Zend_Tool_Project_Context_Filesystem_Directory but the issue is that all contexts loading necessary to parse .zfproject.xml are hardcoded in Zend_Tool_Project_Provider_Abstract class as:

$contextRegistry->addContextsFromDirectory(
    dirname(dirname(__FILE__)) . '/Context/Zf/', 'Zend_Tool_Project_Context_Zf_'
);
$contextRegistry->addContextsFromDirectory(
    dirname(dirname(__FILE__)) . '/Context/Filesystem/', 'Zend_Tool_Project_Context_Filesystem_'
);

So I don't see any way to load my context without patching zend sources (or adding custom files to Zend library directories).

Is it even possible?

Upvotes: 1

Views: 133

Answers (1)

Rob Allen
Rob Allen

Reputation: 12778

I don't believe it is possible without changing the ZF source code. You could try creating an issue on http://framework.zend.com/issues along with a patch. Please make this generic though.

Alternatively, what are you trying to do that requires a custom context? Maybe there's another way to solve it?

Upvotes: 1

Related Questions