{"action":"created","issue":{"url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4356","labels_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4356/labels{/name}","comments_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4356/comments","events_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4356/events","html_url":"https://github.com/bcit-ci/CodeIgniter/issues/4356","id":124653293,"number":4356,"title":"Call Hook & Pass Data","user":{"login":"EpicKris","id":491681,"avatar_url":"https://avatars.githubusercontent.com/u/491681?v=3","gravatar_id":"","url":"https://api.github.com/users/EpicKris","html_url":"https://github.com/EpicKris","followers_url":"https://api.github.com/users/EpicKris/followers","following_url":"https://api.github.com/users/EpicKris/following{/other_user}","gists_url":"https://api.github.com/users/EpicKris/gists{/gist_id}","starred_url":"https://api.github.com/users/EpicKris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EpicKris/subscriptions","organizations_url":"https://api.github.com/users/EpicKris/orgs","repos_url":"https://api.github.com/users/EpicKris/repos","events_url":"https://api.github.com/users/EpicKris/events{/privacy}","received_events_url":"https://api.github.com/users/EpicKris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-01-03T15:24:55Z","updated_at":"2016-01-04T13:33:32Z","closed_at":null,"body":"I use the hooks library in my own packages, but I would like to pass data to some of these hooks. I'm considering making the changes in the hooks class and then doing a pull request.\r\n\r\nIs this something other people would find useful? I've never done these changes to an open source project before."},"comment":{"url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/comments/168677109","html_url":"https://github.com/bcit-ci/CodeIgniter/issues/4356#issuecomment-168677109","issue_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4356","id":168677109,"user":{"login":"EpicKris","id":491681,"avatar_url":"https://avatars.githubusercontent.com/u/491681?v=3","gravatar_id":"","url":"https://api.github.com/users/EpicKris","html_url":"https://github.com/EpicKris","followers_url":"https://api.github.com/users/EpicKris/followers","following_url":"https://api.github.com/users/EpicKris/following{/other_user}","gists_url":"https://api.github.com/users/EpicKris/gists{/gist_id}","starred_url":"https://api.github.com/users/EpicKris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EpicKris/subscriptions","organizations_url":"https://api.github.com/users/EpicKris/orgs","repos_url":"https://api.github.com/users/EpicKris/repos","events_url":"https://api.github.com/users/EpicKris/events{/privacy}","received_events_url":"https://api.github.com/users/EpicKris/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T13:33:32Z","updated_at":"2016-01-04T13:33:32Z","body":"That's the same conclusion I've come to unfortunately, it could work by me merging the data and the hook data with the hook data being it's own key altogether.\r\n```\r\nfunction foo($data)\r\n{\r\n    $data;\r\n    // array( 'bar', 'hook_data' => array( 'baz' ) )\r\n}\r\n```\r\n\r\nOf course this could cause conflicts if `hook_data` happens to be a parameter defined in the `config/hooks.php`, but does minimise conflicts in the majority of use-cases."}}