简体   繁体   中英

How to add an external PHP library (for example Httpful) to ATK4?

Adding Httpful ( http://phphttpclient.com/ ) to ATK4 using the recommended Composer method does not work.

After some fooling around I managed to get all the file paths correct but I get "Fatal error: Class 'Frontend' not found in /var/www/portal/index.php on line 14".

Using the 'phar' method described on Httpful's page is also a no-go.

I don't know if this needs to be implemented through an add-on, and if it does, I don't know how. Any info/pointers would be appreciated...

The bottom line is: I need to interact with a REST API in a sane way, it doesn't have to be Httpful specifically, is there another solution out there that someone has already implemented in ATK4?

Please look into this repository which is designed to run Agile Toolkit based on composer primarily:

https://github.com/atk4/atk4-secure/

You can also look at this branch:

https://github.com/atk4/atk4/tree/4.3-PageManager-refactoring

which deals with this issue:

https://github.com/atk4/atk4/issues/403

although that's not part of the "master" branch, instead it went to 4.3. Perhaps you can back-port the commits.

Edit: I must also mention, that this should work best if you have picked Agile Toolkit from Git repository.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM