开发者

Using third party code within Zend Framework

开发者 https://www.devze.com 2023-01-27 04:19 出处:网络
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) l

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消