Lothar
Lothar

Reputation: 3489

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/foo.php'); and have at it?

If not, how should I do it? What's the "Zend Framework" way of doing something like this?

Upvotes: 2

Views: 676

Answers (1)

prodigitalson
prodigitalson

Reputation: 60413

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

Upvotes: 1

Related Questions