I copied DB/PDO/MySQL.php from the crud example and put that directory structure in one of my API directories (and made changes for use with my database).
The API structure is myapi/artists (so the db stuff is myapi/artists/DB/PDO/MySQL.php) and I have index.php and Artists.php with the Artists API class.
so now I call $this->dp = new DB_PDO_MySQL(); in the Artists class and that works.
But I'd like to be able to use some common db functions across multiple API classes and have been unable to get the db stuff to work unless it is inside each API directory.
I tried putting myapi/DB/PDO/mysql.php under the vendor directory and edited AutoLoader.php to add an alias for 'myapi\DB\PDO' but that didn't work.
So, the question is, how do I configure things so I can share some common db code?
Assume I will have multiple API subdirectories under myapi directory (and myapi is at the same level as the examples directory).