1
votes

i want to include this module http://www.fax-api.de/support/downloads.php into zend framework 2 but not work. Before i could integrate these external classes with zend framework 1. But i think in these classes there are "require_once" maybe not be used anymore in zend framework 2.

So i got some error like this:

PHP Fatal error: require_once() [function.require]: Failed opening required 'Teamnet/Fax/Soap/Type/SendfaxTypes.php' (include_path='.:/Applications/MAMP/bin/php/php5.3.6/lib/php') in /Applications/MAMP/htdocs/github/wfot2/vendor/teamnet/lib/Teamnet/Fax/Soap/Client/SendFax.php on line 3

and

PHP Fatal error: Class 'Application\Model\Teamnet_Fax_Soap_Client_SendFax' not found in /Applications/MAMP/htdocs/github/wfot2/module/Application/src/Application/Model/OrdersTable.php on line 197

Could anybody help me please?

1

1 Answers

0
votes

You can still use require_once with them and probably that's the only way to do it without modifying the source. First you need to put them inside Application/Model directory (where your OrdersTable is). If you want to put them in vendor, you need to add the directory to your include_path. Second, when you instantiate, add '\' in front of the class name, like so:

new \Teamnet_Fax_Soap_Client_SendFax;

because they will live in the global namespace. Your second error message was telling that it tried to look for the class in 'Application\Model' namespace.