I have a project. I need to get the contents of a file in a package. I could do it the hard way:
file_get_contents('../../vendor/{vendor}/{package}/src/
{directory}/{sub-directory}/class.php');
Or, I could do it the "easy way," which I'm pretty sure is impossible.
namespace MyVendor\MyProject;
use TheirVendor\TheirPackage\TheirClass;
class MyObject
{
public function myFunction()
{
return file_get_contents(TheirClass);
}
}
Is this (or something like it) possible?