Al-Punk
Al-Punk

Reputation: 3660

Loading a PEAR package in ZF2

What is the best way of loading pear packages (using pear in a controller) in ZF2?

I am trying to load it throught the init_loader at:

 $loader->add('Packageame', "/usr/share/php/Packagename");

But does not seem the best approach. Any suggestions?

Upvotes: 0

Views: 281

Answers (1)

cweiske
cweiske

Reputation: 31078

PEAR 1 does not have a common vendor prefix, so you should rely on include path only. Just add the PEAR php directory to your include path, and you're set. See http://pear.php.net/manual/en/installation.checking.php for more information.

Upvotes: 1

Related Questions