I'm trying to use this library: https://github.com/duzun/hQuery.php
My project is ordonated like this:
BetCompare
Application
Teams
file_using_the_library.php
hQueryLib
hquery.php
So here is how I'm using it in my php file:
namespace BetCompare\Application\Teams;
use BetCompare\Application\Teams\hQueryLib\hquery;
hQuery::$cache_path = "/path/to/cache";
This returns an error Class not found. I've tried this after a few researches on the matter:
namespace BetCompare\Application\Teams;
use BetCompare\Application\Teams\hQueryLib\hquery;
include_once 'hQueryLib/hquery.php';
hQuery::$cache_path = "/path/to/cache";
Then the error is the following: Cannot declare class hQuery_Context, because the name is already in use. I don't understand, the second error makes it look like the use was enough and loaded the class. But I can't use it... What am I doing wrong?
I've also tried only using include_once but it doesn't work.