Using third party code within Zend Framework
I want to use a small library within the Zend Framework (simple_php_dom, for what it's worth).
Should I just stick it in library/, include it where I want to use it (like in a specific controller) like include('library/开发者_JAVA百科foo.php');
and have at it?
If not, how should I do it? What's the "Zend Framework" way of doing something like this?
Since the library doesnt support PEAR conventions its not really easy to hook it up to the autoloader, so i would just manually require_once
it in the controller or model that uses it. If it was used extensively I might make a wrapper class to proxy calls through and autoload that (that class having the require_once
).
精彩评论