{"action":"created","issue":{"url":"https://api.github.com/repos/simple-mvc-framework/framework/issues/222","labels_url":"https://api.github.com/repos/simple-mvc-framework/framework/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/simple-mvc-framework/framework/issues/222/comments","events_url":"https://api.github.com/repos/simple-mvc-framework/framework/issues/222/events","html_url":"https://github.com/simple-mvc-framework/framework/issues/222","id":119325674,"number":222,"title":"SMVC restructure","user":{"login":"daveismyname","id":1018170,"avatar_url":"https://avatars.githubusercontent.com/u/1018170?v=3","gravatar_id":"","url":"https://api.github.com/users/daveismyname","html_url":"https://github.com/daveismyname","followers_url":"https://api.github.com/users/daveismyname/followers","following_url":"https://api.github.com/users/daveismyname/following{/other_user}","gists_url":"https://api.github.com/users/daveismyname/gists{/gist_id}","starred_url":"https://api.github.com/users/daveismyname/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveismyname/subscriptions","organizations_url":"https://api.github.com/users/daveismyname/orgs","repos_url":"https://api.github.com/users/daveismyname/repos","events_url":"https://api.github.com/users/daveismyname/events{/privacy}","received_events_url":"https://api.github.com/users/daveismyname/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":180,"created_at":"2015-11-29T00:08:40Z","updated_at":"2015-12-10T19:14:51Z","closed_at":null,"body":"I've given the framework a bit of a restructure so it main files are outside of the web root by default and the only files that should be inside the web root are the templates, .htaccess and index.php.\r\n\r\nso the structure is now like this:\r\n\r\n````\r\napp\r\n\tControllers\r\n\tCore\r\n\tHelpers\r\n\tLanguage\t\r\n\tlogs\r\n\t\terror.log\r\n\tModels\r\n\tModules\r\n\tvendor\r\n\tviews\r\n\tcomposer.json\r\npublic_html\r\n\ttemplates\r\n\t\tdefault\r\n\t.gitignore\r\n\t.htaccess\r\n\tindex.php\r\n\tlicence.txt\r\n````\r\n\r\nFrom the index.php the starting path would be:\r\n\r\n````\r\n$smvc = '../';\r\n````\r\n\r\nThe vendor path would be\r\n\r\n````\r\nif (file_exists(SMVC.'app/vendor/autoload.php')) {\r\n    require SMVC.'app/vendor/autoload.php';\r\n}\r\n````\r\n\r\nI've also adjusted the view class and url helper to make the paths more flexible.\r\n\r\nThis would mean all public files (templates) would be in the web root all classes would be outside the web root.\r\n\r\nThe logger class has been changes since it would no longer be able to serve html errors they would be stored in app/logs/error.log above the document root.\r\n\r\nThis kind of setup needs to happen, it's a basic security practice. I'm very late in changing this.\r\n\r\nFirst off is there any objections to this?\r\n\r\nAdditionally should this be a sub part update 2.2.1 or warrant a full version increase? personally I think 2.2.1 would be sufficient no new functionality has been added. \r\n\r\nAnother area I'm not 100% on is Modules. They may need to be in the web root as well so any modules containing css can be loaded but at the same time they will contain classes so should be above the root! will require some thought on this one.\r\n\r\nI haven't pushed this up yet I'm waiting to get your thoughts on this.\r\n"},"comment":{"url":"https://api.github.com/repos/simple-mvc-framework/framework/issues/comments/163722743","html_url":"https://github.com/simple-mvc-framework/framework/issues/222#issuecomment-163722743","issue_url":"https://api.github.com/repos/simple-mvc-framework/framework/issues/222","id":163722743,"user":{"login":"jimgwhit","id":7936192,"avatar_url":"https://avatars.githubusercontent.com/u/7936192?v=3","gravatar_id":"","url":"https://api.github.com/users/jimgwhit","html_url":"https://github.com/jimgwhit","followers_url":"https://api.github.com/users/jimgwhit/followers","following_url":"https://api.github.com/users/jimgwhit/following{/other_user}","gists_url":"https://api.github.com/users/jimgwhit/gists{/gist_id}","starred_url":"https://api.github.com/users/jimgwhit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimgwhit/subscriptions","organizations_url":"https://api.github.com/users/jimgwhit/orgs","repos_url":"https://api.github.com/users/jimgwhit/repos","events_url":"https://api.github.com/users/jimgwhit/events{/privacy}","received_events_url":"https://api.github.com/users/jimgwhit/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T19:14:51Z","updated_at":"2015-12-10T19:14:51Z","body":"And to try to put this in a nice way let's say,\r\n~~~\r\nJoe wants feature A\r\n~~~\r\n~~~\r\nBilly Bob wants feature B\r\n~~~\r\n~~~\r\nCindy wants feature C\r\n~~~\r\nCouldn't they install the framework, and custom write their own classes and customize in those features they want themselves? Billy Bob might not want what Cindy needs, Joe Blow may not need what Rodriguez needs, Sue Bob may not need any of it. So hopefully this explains, it is a framework that a person can customize themselves to suit their own needs without putting junk in there that someone else does not need or want."}}