{"action":"created","issue":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/821","labels_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/821/labels{/name}","comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/821/comments","events_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/821/events","html_url":"https://github.com/RESTful-Drupal/restful/issues/821","id":126995483,"number":821,"title":"Callback function parameters not working","user":{"login":"lokisho","id":5515159,"avatar_url":"https://avatars.githubusercontent.com/u/5515159?v=3","gravatar_id":"","url":"https://api.github.com/users/lokisho","html_url":"https://github.com/lokisho","followers_url":"https://api.github.com/users/lokisho/followers","following_url":"https://api.github.com/users/lokisho/following{/other_user}","gists_url":"https://api.github.com/users/lokisho/gists{/gist_id}","starred_url":"https://api.github.com/users/lokisho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lokisho/subscriptions","organizations_url":"https://api.github.com/users/lokisho/orgs","repos_url":"https://api.github.com/users/lokisho/repos","events_url":"https://api.github.com/users/lokisho/events{/privacy}","received_events_url":"https://api.github.com/users/lokisho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-16T02:42:32Z","updated_at":"2016-01-22T03:26:29Z","closed_at":null,"body":"Params to callback function are not working\r\nif you have something like\r\n```php\r\n$public_field['mycustom'] => array(\r\n  'callback' => array($this, array('myhandler', 'myfield');\r\n);\r\n```\r\nin \r\n```php\r\npublic static function executeCallback($callback, array $params = array()) {\r\n```\r\n```php\r\n$callback[0] = RESOURCE\r\n$callback[1] = array('myhandler','myfield');\r\n```\r\n\r\nit will enter here\r\n```php\r\nif (is_array($callback) && count($callback) == 2 && is_array($callback[1])) {\r\n```\r\n\r\nbut \r\n```php\r\nreturn static::executeCallback($callback[0], array_merge($params, $callback[1]));\r\n```\r\n\r\nwill output\r\n```php\r\n$callback = RESOURCE\r\n```\r\nwith \r\n```php\r\n$params = array ($interpreter, 'myhandler', 'myfield')\r\n```\r\nand when it call again to the function, it won't have the function name, right? so it will fail.\r\nThis won't pass the parameter myfield to function but myhandler\r\n\r\nWe will expect something like\r\n```php\r\n$callback = array(RESOURCE,'myhandler')\r\n$params = array($interpreter, 'myfield');\r\n```\r\n "},"comment":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/comments/173794035","html_url":"https://github.com/RESTful-Drupal/restful/issues/821#issuecomment-173794035","issue_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/821","id":173794035,"user":{"login":"lokisho","id":5515159,"avatar_url":"https://avatars.githubusercontent.com/u/5515159?v=3","gravatar_id":"","url":"https://api.github.com/users/lokisho","html_url":"https://github.com/lokisho","followers_url":"https://api.github.com/users/lokisho/followers","following_url":"https://api.github.com/users/lokisho/following{/other_user}","gists_url":"https://api.github.com/users/lokisho/gists{/gist_id}","starred_url":"https://api.github.com/users/lokisho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lokisho/subscriptions","organizations_url":"https://api.github.com/users/lokisho/orgs","repos_url":"https://api.github.com/users/lokisho/repos","events_url":"https://api.github.com/users/lokisho/events{/privacy}","received_events_url":"https://api.github.com/users/lokisho/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T03:26:29Z","updated_at":"2016-01-22T03:26:29Z","body":"Hey Jeff, sry, little busy these days...  Yes, I tested what you said, but it didn't work, look at this\r\n\r\nSuccessful use case\r\nThis is the callback key\r\nhttp://screencast.com/t/r2D98gEqk\r\n\r\nAnd this is how ```ResourceManagerInterface::executeCallback()``` process it\r\nhttp://screencast.com/t/Zbn4AZpC9ta\r\n\r\nSetting the callback key as you said http://screencast.com/t/8ocLh8CoPW\r\n\r\nFailure use case \r\nthis is how ```ResourceManagerInterface::executeCallback()``` process it\r\nhttp://screencast.com/t/gFFI6XlSAMdA\r\n\r\nIt calls the function but without params http://screencast.com/t/1TsPFVCHZ\r\n\r\nI first use case I put with this issue was this http://screencast.com/t/Nf8g6AB6\r\n\r\nOn the first iteration  ```ResourceManagerInterface::executeCallback()``` receive the params\r\nhttp://screencast.com/t/HvZbfIS2Pb \r\n\r\nBut for second iteration it process them wrong http://screencast.com/t/hut8MQOClMsF, so it throws an exception http://screencast.com/t/FdI9cg8D "}}