Skip to content

New class not loaded #189

@guilanh

Description

@guilanh

Hi,
I am using Respond CMS that uses tonic RESTful. I am trying to add a new class in the rest directory. But this class cannot be loaded. I run the following code

require_once '../vendor/peej/tonic/src/Tonic/Autoloader.php';

$app = new Tonic\Application();
$request = new Tonic\Request();

require_once 'myclass.php';

$resource = $app->getResource($request);
$response = $resource->exec();
$response->output();

The class was not loaded, I got error 'Tonic\NotFoundException'. Any help would be appreciated.

Regards
guilan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions