{"action":"created","issue":{"url":"https://api.github.com/repos/peej/tonic/issues/189","labels_url":"https://api.github.com/repos/peej/tonic/issues/189/labels{/name}","comments_url":"https://api.github.com/repos/peej/tonic/issues/189/comments","events_url":"https://api.github.com/repos/peej/tonic/issues/189/events","html_url":"https://github.com/peej/tonic/issues/189","id":64779686,"number":189,"title":"New class not loaded","user":{"login":"guilanh","id":11681637,"avatar_url":"https://avatars.githubusercontent.com/u/11681637?v=3","gravatar_id":"","url":"https://api.github.com/users/guilanh","html_url":"https://github.com/guilanh","followers_url":"https://api.github.com/users/guilanh/followers","following_url":"https://api.github.com/users/guilanh/following{/other_user}","gists_url":"https://api.github.com/users/guilanh/gists{/gist_id}","starred_url":"https://api.github.com/users/guilanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guilanh/subscriptions","organizations_url":"https://api.github.com/users/guilanh/orgs","repos_url":"https://api.github.com/users/guilanh/repos","events_url":"https://api.github.com/users/guilanh/events{/privacy}","received_events_url":"https://api.github.com/users/guilanh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-27T15:07:19Z","updated_at":"2015-03-31T09:16:29Z","closed_at":null,"body":"Hi,\r\nI 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 \r\n\r\nrequire_once '../vendor/peej/tonic/src/Tonic/Autoloader.php';\r\n\r\n$app = new Tonic\\Application();\r\n$request = new Tonic\\Request();\r\n\r\nrequire_once 'myclass.php';\r\n\r\n$resource = $app->getResource($request);\r\n$response = $resource->exec();\r\n$response->output();\r\n\r\nThe class was not loaded, I got error 'Tonic\\NotFoundException'. Any help would be appreciated.\r\n\r\nRegards\r\nguilan\r\n"},"comment":{"url":"https://api.github.com/repos/peej/tonic/issues/comments/88009532","html_url":"https://github.com/peej/tonic/issues/189#issuecomment-88009532","issue_url":"https://api.github.com/repos/peej/tonic/issues/189","id":88009532,"user":{"login":"guilanh","id":11681637,"avatar_url":"https://avatars.githubusercontent.com/u/11681637?v=3","gravatar_id":"","url":"https://api.github.com/users/guilanh","html_url":"https://github.com/guilanh","followers_url":"https://api.github.com/users/guilanh/followers","following_url":"https://api.github.com/users/guilanh/following{/other_user}","gists_url":"https://api.github.com/users/guilanh/gists{/gist_id}","starred_url":"https://api.github.com/users/guilanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guilanh/subscriptions","organizations_url":"https://api.github.com/users/guilanh/orgs","repos_url":"https://api.github.com/users/guilanh/repos","events_url":"https://api.github.com/users/guilanh/events{/privacy}","received_events_url":"https://api.github.com/users/guilanh/received_events","type":"User","site_admin":false},"created_at":"2015-03-31T09:16:29Z","updated_at":"2015-03-31T09:16:29Z","body":"I also run this script:\r\n\r\nrequire_once '../vendor/peej/tonic/src/Tonic/Autoloader.php';\r\n$app = new Tonic\\Application(array(\r\n    'load' => 'myclass.php'\r\n));\r\n$request = new Tonic\\Request();\r\n$resource = $app->getResource($request);\r\n$response = $resource->exec();\r\n$response->output();\r\necho \"load myclass\";\r\n\r\nThe script failed at the line:\r\n$resource = $app->getResource($request);\r\n\r\nAny idea why the resource cannot be got?\r\n"}}