Tuesday 30 April 2019

Problems using PackageLoader to load the wrench class

I am trying to load the Wrench library using PackageLoader and I can't get it to work. My code is below.

include __DIR__.'/PackageLoader.php';
$loader = new PackageLoader\PackageLoader();
$loader->load(__DIR__."/vendor/wrench/wrench");

$app = new class implements \Wrench\Application\DataHandlerInterface
{
    public function onData(string $data, \Wrench\Connection $connection): void
    {
        $connection->send($data);
    }
};

I get this error

Fatal error: Interface 'Wrench\Application\DataHandlerInterface' not found in C:\Users\desbest\Documents\UniServerZ\www\sugarchat\includes\actions.php on line 13

It finds the composer.json file though when I load the library.

How do I fix this?



from Problems using PackageLoader to load the wrench class

No comments:

Post a Comment