{"action":"created","comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments/39336790","id":39336790,"diff_hunk":"@@ -0,0 +1,269 @@\n+<?php\n+\n+namespace SilverStripe\\Filesystem\\Flysystem;\n+\n+use Config;\n+use Injector;\n+use InvalidArgumentException;\n+use League\\Flysystem\\Exception;\n+use League\\Flysystem\\Filesystem;\n+use SilverStripe\\Filesystem\\Storage\\AssetNameGenerator;\n+use SilverStripe\\Filesystem\\Storage\\AssetStore;\n+\n+/**\n+ * Asset store based on flysystem Filesystem as a backend\n+ */\n+class FlysystemAssetStore implements AssetStore {\n+\n+\t/**\n+\t * @var Filesystem\n+\t */\n+\tprotected $filesystem;\n+\n+\t/**\n+\t * Enable to use legacy filename behaviour (omits hash)\n+\t *\n+\t * @config\n+\t * @var bool\n+\t */\n+\tprivate static $legacy_filenames = false;\n+\n+\t/**\n+\t * Assign new flysystem backend\n+\t *\n+\t * @param Filesystem $filesystem\n+\t */\n+\tpublic function setFilesystem(Filesystem $filesystem) {\n+\t\t$this->filesystem = $filesystem;","path":"filesystem/flysystem/FlysystemAssetStore.php","position":37,"original_position":37,"commit_id":"b327d57eb0bd8db7276828afb5875cbe4d35b0cb","original_commit_id":"b327d57eb0bd8db7276828afb5875cbe4d35b0cb","user":{"login":"dhensby","id":563596,"avatar_url":"https://avatars.githubusercontent.com/u/563596?v=3","gravatar_id":"","url":"https://api.github.com/users/dhensby","html_url":"https://github.com/dhensby","followers_url":"https://api.github.com/users/dhensby/followers","following_url":"https://api.github.com/users/dhensby/following{/other_user}","gists_url":"https://api.github.com/users/dhensby/gists{/gist_id}","starred_url":"https://api.github.com/users/dhensby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhensby/subscriptions","organizations_url":"https://api.github.com/users/dhensby/orgs","repos_url":"https://api.github.com/users/dhensby/repos","events_url":"https://api.github.com/users/dhensby/events{/privacy}","received_events_url":"https://api.github.com/users/dhensby/received_events","type":"User","site_admin":false},"body":"`return $this`?","created_at":"2015-09-12T12:08:06Z","updated_at":"2015-09-12T12:08:06Z","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/4599#discussion_r39336790","pull_request_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/4599","_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments/39336790"},"html":{"href":"https://github.com/silverstripe/silverstripe-framework/pull/4599#discussion_r39336790"},"pull_request":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/4599"}}},"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/4599","id":44746618,"html_url":"https://github.com/silverstripe/silverstripe-framework/pull/4599","diff_url":"https://github.com/silverstripe/silverstripe-framework/pull/4599.diff","patch_url":"https://github.com/silverstripe/silverstripe-framework/pull/4599.patch","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4599","number":4599,"state":"open","locked":false,"title":"API Implementation of RFC-1 Asset Abstraction","user":{"login":"tractorcow","id":936064,"avatar_url":"https://avatars.githubusercontent.com/u/936064?v=3","gravatar_id":"","url":"https://api.github.com/users/tractorcow","html_url":"https://github.com/tractorcow","followers_url":"https://api.github.com/users/tractorcow/followers","following_url":"https://api.github.com/users/tractorcow/following{/other_user}","gists_url":"https://api.github.com/users/tractorcow/gists{/gist_id}","starred_url":"https://api.github.com/users/tractorcow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tractorcow/subscriptions","organizations_url":"https://api.github.com/users/tractorcow/orgs","repos_url":"https://api.github.com/users/tractorcow/repos","events_url":"https://api.github.com/users/tractorcow/events{/privacy}","received_events_url":"https://api.github.com/users/tractorcow/received_events","type":"User","site_admin":false},"body":"Partial implementation of https://github.com/silverstripe/silverstripe-framework/issues/3792\r\n\r\nThis PR includes creation of the APL (Asset Persistence Layer) using flysystem as a default backend, and creation of the DBFile field.\r\n\r\nThis is built on top of https://github.com/silverstripe/silverstripe-framework/pull/4590 which should be merged first.","created_at":"2015-09-11T04:56:08Z","updated_at":"2015-09-12T12:08:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3b3d80122b2d883a70fe8e004c238b8bdd93ad9","assignee":null,"milestone":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/milestones/7","html_url":"https://github.com/silverstripe/silverstripe-framework/milestones/4.0","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/milestones/7/labels","id":598745,"number":7,"title":"4.0","description":"Things we would like to see in 4.0 but are too large/break too much for a 3.x release.","creator":{"login":"simonwelsh","id":125915,"avatar_url":"https://avatars.githubusercontent.com/u/125915?v=3","gravatar_id":"","url":"https://api.github.com/users/simonwelsh","html_url":"https://github.com/simonwelsh","followers_url":"https://api.github.com/users/simonwelsh/followers","following_url":"https://api.github.com/users/simonwelsh/following{/other_user}","gists_url":"https://api.github.com/users/simonwelsh/gists{/gist_id}","starred_url":"https://api.github.com/users/simonwelsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonwelsh/subscriptions","organizations_url":"https://api.github.com/users/simonwelsh/orgs","repos_url":"https://api.github.com/users/simonwelsh/repos","events_url":"https://api.github.com/users/simonwelsh/events{/privacy}","received_events_url":"https://api.github.com/users/simonwelsh/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":5,"state":"open","created_at":"2014-03-15T20:48:10Z","updated_at":"2015-09-11T05:01:44Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/4599/commits","review_comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/4599/comments","review_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4599/comments","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/b327d57eb0bd8db7276828afb5875cbe4d35b0cb","head":{"label":"open-sausages:features/dbfile","ref":"features/dbfile","sha":"b327d57eb0bd8db7276828afb5875cbe4d35b0cb","user":{"login":"open-sausages","id":12824172,"avatar_url":"https://avatars.githubusercontent.com/u/12824172?v=3","gravatar_id":"","url":"https://api.github.com/users/open-sausages","html_url":"https://github.com/open-sausages","followers_url":"https://api.github.com/users/open-sausages/followers","following_url":"https://api.github.com/users/open-sausages/following{/other_user}","gists_url":"https://api.github.com/users/open-sausages/gists{/gist_id}","starred_url":"https://api.github.com/users/open-sausages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-sausages/subscriptions","organizations_url":"https://api.github.com/users/open-sausages/orgs","repos_url":"https://api.github.com/users/open-sausages/repos","events_url":"https://api.github.com/users/open-sausages/events{/privacy}","received_events_url":"https://api.github.com/users/open-sausages/received_events","type":"Organization","site_admin":false},"repo":{"id":37888247,"name":"silverstripe-framework","full_name":"open-sausages/silverstripe-framework","owner":{"login":"open-sausages","id":12824172,"avatar_url":"https://avatars.githubusercontent.com/u/12824172?v=3","gravatar_id":"","url":"https://api.github.com/users/open-sausages","html_url":"https://github.com/open-sausages","followers_url":"https://api.github.com/users/open-sausages/followers","following_url":"https://api.github.com/users/open-sausages/following{/other_user}","gists_url":"https://api.github.com/users/open-sausages/gists{/gist_id}","starred_url":"https://api.github.com/users/open-sausages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-sausages/subscriptions","organizations_url":"https://api.github.com/users/open-sausages/orgs","repos_url":"https://api.github.com/users/open-sausages/repos","events_url":"https://api.github.com/users/open-sausages/events{/privacy}","received_events_url":"https://api.github.com/users/open-sausages/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/open-sausages/silverstripe-framework","description":"SilverStripe Framework, the MVC framework that powers SilverStripe CMS","fork":true,"url":"https://api.github.com/repos/open-sausages/silverstripe-framework","forks_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/forks","keys_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/teams","hooks_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/hooks","issue_events_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/issues/events{/number}","events_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/events","assignees_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/assignees{/user}","branches_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/branches{/branch}","tags_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/tags","blobs_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/languages","stargazers_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/stargazers","contributors_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/contributors","subscribers_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/subscribers","subscription_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/subscription","commits_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/contents/{+path}","compare_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/merges","archive_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/downloads","issues_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/issues{/number}","pulls_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/labels{/name}","releases_url":"https://api.github.com/repos/open-sausages/silverstripe-framework/releases{/id}","created_at":"2015-06-23T00:36:38Z","updated_at":"2015-06-23T00:36:43Z","pushed_at":"2015-09-11T05:26:55Z","git_url":"git://github.com/open-sausages/silverstripe-framework.git","ssh_url":"git@github.com:open-sausages/silverstripe-framework.git","clone_url":"https://github.com/open-sausages/silverstripe-framework.git","svn_url":"https://github.com/open-sausages/silverstripe-framework","homepage":"http://silverstripe.org/","size":52641,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"3.2"}},"base":{"label":"silverstripe:master","ref":"master","sha":"143e4eae5fe293735b82f22c09e8bc2b541d2a10","user":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"repo":{"id":1318892,"name":"silverstripe-framework","full_name":"silverstripe/silverstripe-framework","owner":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silverstripe/silverstripe-framework","description":"SilverStripe Framework, the MVC framework that powers SilverStripe CMS","fork":false,"url":"https://api.github.com/repos/silverstripe/silverstripe-framework","forks_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/forks","keys_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/teams","hooks_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/hooks","issue_events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/events{/number}","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/events","assignees_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/assignees{/user}","branches_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/branches{/branch}","tags_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/tags","blobs_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/languages","stargazers_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/stargazers","contributors_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/contributors","subscribers_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/subscribers","subscription_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/subscription","commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/contents/{+path}","compare_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/merges","archive_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/downloads","issues_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues{/number}","pulls_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/labels{/name}","releases_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/releases{/id}","created_at":"2011-02-02T02:04:13Z","updated_at":"2015-09-11T09:59:12Z","pushed_at":"2015-09-11T21:59:51Z","git_url":"git://github.com/silverstripe/silverstripe-framework.git","ssh_url":"git@github.com:silverstripe/silverstripe-framework.git","clone_url":"https://github.com/silverstripe/silverstripe-framework.git","svn_url":"https://github.com/silverstripe/silverstripe-framework","homepage":"http://silverstripe.org/","size":104644,"stargazers_count":462,"watchers_count":462,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":519,"mirror_url":null,"open_issues_count":617,"forks":519,"open_issues":617,"watchers":462,"default_branch":"3"}},"_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/4599"},"html":{"href":"https://github.com/silverstripe/silverstripe-framework/pull/4599"},"issue":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4599"},"comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4599/comments"},"review_comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/4599/comments"},"review_comment":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/4599/commits"},"statuses":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/b327d57eb0bd8db7276828afb5875cbe4d35b0cb"}}}}