{"comment":{"created_at":"2011-10-23T15:26:53Z","body":"This has nothing to do with Restler. It is just the way PHP works! when the class name and function name are same the function becomes the constructor and restler does not support classes with constructors that require parameters to be passed. In this case if you make the `$param1` optional then this error will go away","updated_at":"2011-10-23T15:26:53Z","url":"https://api.github.com/repos/Luracast/Restler/issues/comments/2495778","id":2495778,"user":{"avatar_url":"https://secure.gravatar.com/avatar/4cc993f592a3f2743c4714206666e925?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4cc993f592a3f2743c4714206666e925","url":"https://api.github.com/users/Luracast","id":236217,"login":"Luracast"}},"action":"created","issue":{"number":13,"created_at":"2011-10-23T13:44:31Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Hi \r\nHaving this class and using a get request like http://localhost/rest/luracrest/app/test/test/1 this raises a php warning : \r\n`Warning:  Missing argument 1 for Test::Test(), called in D:\\phptools\\rest\\luracrest\\restler\\restler.php on line 341 `\r\netcetera. When i rename method 'Test' to 'getTest'  or 'myTest' the warning dissapears. No big issue but perhaps it's a little bug\r\n\r\n```php\r\n<?php\r\nclass Test\r\n{\r\n  function Test($param1)\r\n { \r\n     return \"Hello Test data=$param1\";\r\n  }\r\n}\r\n?>\r\n```","comments":1,"title":"PHP Warning raised with classname=methodname without prefix","updated_at":"2011-10-23T15:26:54Z","url":"https://api.github.com/repos/Luracast/Restler/issues/13","id":2026717,"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/4cc993f592a3f2743c4714206666e925?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4cc993f592a3f2743c4714206666e925","url":"https://api.github.com/users/Luracast","id":236217,"login":"Luracast"},"milestone":null,"closed_at":"2011-10-23T15:26:54Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/ef93b318bc9dc4104e999ea787d34468?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"ef93b318bc9dc4104e999ea787d34468","url":"https://api.github.com/users/eduh","id":1076033,"login":"eduh"},"html_url":"https://github.com/Luracast/Restler/issues/13","labels":[],"state":"closed"},"legacy":{"issue_id":2026717,"comment_id":2495778}}