I am trying to integrate an existing library into Laravel5 which itself is not namespaced and uses its own classes in subfolders using require. I have placed it at 'app/API/libname/mainlibclass.php'. with sibling directory at 'app/API/libname/toolkit' which contains the classes the library uses.
Calling from a Laravel controller I am unable to create the class using a require statement (correct?) before
$objectinstance=new Mainlibclass();
so in the main Laravel app I have
use app/API/libname/Mainlibclass
then later the usual
$objectinstance=new Mainlibclass();
In the existing library and each of its own used classes I set
namespace app/API/libname
and 'use' where needed. I now have no class not found but one of the files uses 'implements Iterator' - I am getting error Interface 'App\API\libname\Iterator' not found.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire