{"action":"created","issue":{"url":"https://api.github.com/repos/browner12/helpers/issues/2","repository_url":"https://api.github.com/repos/browner12/helpers","labels_url":"https://api.github.com/repos/browner12/helpers/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/browner12/helpers/issues/2/comments","events_url":"https://api.github.com/repos/browner12/helpers/issues/2/events","html_url":"https://github.com/browner12/helpers/issues/2","id":151337630,"number":2,"title":"Re-inventing a wheel","user":{"login":"heisian","id":4141828,"avatar_url":"https://avatars.githubusercontent.com/u/4141828?v=3","gravatar_id":"","url":"https://api.github.com/users/heisian","html_url":"https://github.com/heisian","followers_url":"https://api.github.com/users/heisian/followers","following_url":"https://api.github.com/users/heisian/following{/other_user}","gists_url":"https://api.github.com/users/heisian/gists{/gist_id}","starred_url":"https://api.github.com/users/heisian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heisian/subscriptions","organizations_url":"https://api.github.com/users/heisian/orgs","repos_url":"https://api.github.com/users/heisian/repos","events_url":"https://api.github.com/users/heisian/events{/privacy}","received_events_url":"https://api.github.com/users/heisian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-27T09:16:59Z","updated_at":"2016-04-27T22:48:47Z","closed_at":null,"body":"Hey man, plz take a look at:\r\nhttps://github.com/laravel/framework/blob/master/src/Illuminate/Support/ClassLoader.php\r\n\r\nIt already implements what this package does, except with `ClassLoader` you can load classes from anywhere within your project.\r\n\r\nExcerpt:\r\n```php\r\n    public static function load($class)\r\n    {\r\n        $class = static::normalizeClass($class);\r\n        foreach (static::$directories as $directory) {\r\n            if (file_exists($path = $directory.DIRECTORY_SEPARATOR.$class)) {\r\n                require_once $path;\r\n                return true;\r\n            }\r\n        }\r\n        return false;\r\n    }\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/browner12/helpers/issues/comments/215254714","html_url":"https://github.com/browner12/helpers/issues/2#issuecomment-215254714","issue_url":"https://api.github.com/repos/browner12/helpers/issues/2","id":215254714,"user":{"login":"browner12","id":5232313,"avatar_url":"https://avatars.githubusercontent.com/u/5232313?v=3","gravatar_id":"","url":"https://api.github.com/users/browner12","html_url":"https://github.com/browner12","followers_url":"https://api.github.com/users/browner12/followers","following_url":"https://api.github.com/users/browner12/following{/other_user}","gists_url":"https://api.github.com/users/browner12/gists{/gist_id}","starred_url":"https://api.github.com/users/browner12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/browner12/subscriptions","organizations_url":"https://api.github.com/users/browner12/orgs","repos_url":"https://api.github.com/users/browner12/repos","events_url":"https://api.github.com/users/browner12/events{/privacy}","received_events_url":"https://api.github.com/users/browner12/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T22:48:47Z","updated_at":"2016-04-27T22:48:47Z","body":"so if i'm following you correctly, you're talking PSR-4 autoloading, and then calling static methods off that class.\r\n\r\nif that's what you're talking about, I agree, that is an option.  However, I want plain vanilla PHP functions, which I don't think is served by this.\r\n\r\nYou might say that static methods and vanilla functions are essentially the same thing and give the same end result, but there are some performance considerations. Although the results seem a little inconclusive and won't necessarily be the same between PHP versions.\r\n\r\nhttp://stackoverflow.com/questions/1472721/performance-of-static-methods-vs-functions\r\n\r\nI also like the fact that vanilla functions are a little more terse than static or object method calls.\r\n\r\n`makeButton()`\r\n\r\nvs\r\n\r\n`\\App\\Factories\\ButtonFactory::makeButton()`\r\n\r\nor\r\n\r\n```php\r\n$button = new \\App\\Factories\\ButtonFactory();\r\n$button->makeButton();\r\n```\r\n\r\nIMO it can make your code less readable to use the longer ways.\r\n"}}