{"action":"created","issue":{"url":"https://api.github.com/repos/thephpleague/csv/issues/320","repository_url":"https://api.github.com/repos/thephpleague/csv","labels_url":"https://api.github.com/repos/thephpleague/csv/issues/320/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/csv/issues/320/comments","events_url":"https://api.github.com/repos/thephpleague/csv/issues/320/events","html_url":"https://github.com/thephpleague/csv/issues/320","id":389182111,"node_id":"MDU6SXNzdWUzODkxODIxMTE=","number":320,"title":"Get output file from Writer?","user":{"login":"tomkyle","id":412560,"node_id":"MDQ6VXNlcjQxMjU2MA==","avatar_url":"https://avatars1.githubusercontent.com/u/412560?v=4","gravatar_id":"","url":"https://api.github.com/users/tomkyle","html_url":"https://github.com/tomkyle","followers_url":"https://api.github.com/users/tomkyle/followers","following_url":"https://api.github.com/users/tomkyle/following{/other_user}","gists_url":"https://api.github.com/users/tomkyle/gists{/gist_id}","starred_url":"https://api.github.com/users/tomkyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomkyle/subscriptions","organizations_url":"https://api.github.com/users/tomkyle/orgs","repos_url":"https://api.github.com/users/tomkyle/repos","events_url":"https://api.github.com/users/tomkyle/events{/privacy}","received_events_url":"https://api.github.com/users/tomkyle/received_events","type":"User","site_admin":false},"labels":[{"id":68748511,"node_id":"MDU6TGFiZWw2ODc0ODUxMQ==","url":"https://api.github.com/repos/thephpleague/csv/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":{"login":"nyamsprod","id":51073,"node_id":"MDQ6VXNlcjUxMDcz","avatar_url":"https://avatars3.githubusercontent.com/u/51073?v=4","gravatar_id":"","url":"https://api.github.com/users/nyamsprod","html_url":"https://github.com/nyamsprod","followers_url":"https://api.github.com/users/nyamsprod/followers","following_url":"https://api.github.com/users/nyamsprod/following{/other_user}","gists_url":"https://api.github.com/users/nyamsprod/gists{/gist_id}","starred_url":"https://api.github.com/users/nyamsprod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyamsprod/subscriptions","organizations_url":"https://api.github.com/users/nyamsprod/orgs","repos_url":"https://api.github.com/users/nyamsprod/repos","events_url":"https://api.github.com/users/nyamsprod/events{/privacy}","received_events_url":"https://api.github.com/users/nyamsprod/received_events","type":"User","site_admin":false},"assignees":[{"login":"nyamsprod","id":51073,"node_id":"MDQ6VXNlcjUxMDcz","avatar_url":"https://avatars3.githubusercontent.com/u/51073?v=4","gravatar_id":"","url":"https://api.github.com/users/nyamsprod","html_url":"https://github.com/nyamsprod","followers_url":"https://api.github.com/users/nyamsprod/followers","following_url":"https://api.github.com/users/nyamsprod/following{/other_user}","gists_url":"https://api.github.com/users/nyamsprod/gists{/gist_id}","starred_url":"https://api.github.com/users/nyamsprod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyamsprod/subscriptions","organizations_url":"https://api.github.com/users/nyamsprod/orgs","repos_url":"https://api.github.com/users/nyamsprod/repos","events_url":"https://api.github.com/users/nyamsprod/events{/privacy}","received_events_url":"https://api.github.com/users/nyamsprod/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-12-10T08:00:27Z","updated_at":"2018-12-10T08:19:57Z","closed_at":null,"author_association":"NONE","body":"_(Fill in the relevant information below to help triage your issue.)_\r\n\r\n|    Q        |   A\r\n|------------ | ------\r\n| Version     | 9.1\r\n\r\n### Question\r\n\r\nThe Writer instance can be created with static _createFrom…_ methods. Base class _AbstractCsv_ then stores the 'document' in a protected _$document_ var. \r\n\r\nNow, for using the Writer instance somewhere else I inject the writer instance in the constructor of a worker class. But how to get in the consuming class the underlying document (or better: the 'target' file), e.g. to tell where the CSV has been written?\r\n\r\nMy current workaround is injecting both _Writer_ instance and file path (or SplFileObject) – no clean solution.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/thephpleague/csv/issues/comments/445728732","html_url":"https://github.com/thephpleague/csv/issues/320#issuecomment-445728732","issue_url":"https://api.github.com/repos/thephpleague/csv/issues/320","id":445728732,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTcyODczMg==","user":{"login":"nyamsprod","id":51073,"node_id":"MDQ6VXNlcjUxMDcz","avatar_url":"https://avatars3.githubusercontent.com/u/51073?v=4","gravatar_id":"","url":"https://api.github.com/users/nyamsprod","html_url":"https://github.com/nyamsprod","followers_url":"https://api.github.com/users/nyamsprod/followers","following_url":"https://api.github.com/users/nyamsprod/following{/other_user}","gists_url":"https://api.github.com/users/nyamsprod/gists{/gist_id}","starred_url":"https://api.github.com/users/nyamsprod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyamsprod/subscriptions","organizations_url":"https://api.github.com/users/nyamsprod/orgs","repos_url":"https://api.github.com/users/nyamsprod/repos","events_url":"https://api.github.com/users/nyamsprod/events{/privacy}","received_events_url":"https://api.github.com/users/nyamsprod/received_events","type":"User","site_admin":false},"created_at":"2018-12-10T08:19:57Z","updated_at":"2018-12-10T08:19:57Z","author_association":"MEMBER","body":"@tomkyle thanks for using the package.\r\n\r\nCurrently there are no method or simple way to get the target file and the reason is simple. Depending on how the writer was created you may or may not have this information your current workaround is the best alternative IMHO. Another approach would be to expose the document object which means exposing the class internal state which is not a good idea as it is an implementation detail that should not be exposed in the first place."}}
{"actor":{"display_login":"nyamsprod"}}