Where to place a custom PHP library? - Joomla! Forum - community, help and support


i still relatively new @ creating components , had general question. creating new component process payments via authorize.net api. this, using custom php class simplifies nitty-gritty of a.net api. application logic this:
1) controller calls "process payment" model. inside model, call custom php class process actual order using a.net api.
2) once order has been completed, response passed appropriate view notify user whether order successful or not.

my question is: should place custom library , there joomla! api call importing model?

my initial thought place in "libraries" directory within component , include in model using standard php "require". wasn't sure though if there more elegant way better utilized joomla api.

steve

i added marc support php. contain 1 file (phpmarc.php) few classes. use library in 1 of components. put file in joomla_site_dir/libraries/phpmarc/.
to use php library add next code:

code: select all

jimport('phpmarc/phpmarc');

after use classes:

code: select all

$record = new record();;

record class phpmarc.php file.





Comments

Popular posts from this blog

How to decompile jsxbin to jsx

Gavik Photoslide GK2: Not able to upload photos - Joomla! Forum - community, help and support

Phoca Guestbook logger registret bruger af - Joomla! Forum - community, help and support