{"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":24,"created_at":"2015-11-29T00:08:40Z","updated_at":"2015-12-02T19:10:04Z","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/161401221","html_url":"https://github.com/simple-mvc-framework/framework/issues/222#issuecomment-161401221","issue_url":"https://api.github.com/repos/simple-mvc-framework/framework/issues/222","id":161401221,"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},"created_at":"2015-12-02T19:10:04Z","updated_at":"2015-12-02T19:10:04Z","body":"@jimgwhit you can put them all in one place still in the index.php file is a variable for the path to the app folder that would just be ./ instead of a ../ that way it can all reside inside the public folder as you do normally.\r\n\r\n@geomorillo that structure looks fine but I would have Modules inside the app also have another modules folder inside public for the module specific css / js files\r\n\r\n@rtorralba the public_html folder is dependent on your setup some will be public_html some will be htdocs some may be something else it should not make any difference. Lets call is public then it can be changed as needed on implementation.\r\n\r\nAny objections to a app / system setup? seems logical. \r\n\r\nThe final result will be flexible enough so you can place all files inside your public directory should you need that."}}