{"id":21467400,"url":"https://github.com/elusivecodes/fyreloader","last_synced_at":"2025-07-15T05:31:21.647Z","repository":{"id":56982781,"uuid":"420077926","full_name":"elusivecodes/FyreLoader","owner":"elusivecodes","description":"FyreLoader is a free, open-source autoloader library for PHP.","archived":false,"fork":false,"pushed_at":"2024-11-15T10:08:39.000Z","size":131,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-15T15:46:10.978Z","etag":null,"topics":["autoloader","loader","php","psr4"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elusivecodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-22T11:46:06.000Z","updated_at":"2024-11-15T10:08:27.000Z","dependencies_parsed_at":"2024-06-29T07:52:59.313Z","dependency_job_id":null,"html_url":"https://github.com/elusivecodes/FyreLoader","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"c774441763caf9b91193660e2930196b9fa26b43"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreLoader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreLoader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreLoader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreLoader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elusivecodes","download_url":"https://codeload.github.com/elusivecodes/FyreLoader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226017458,"owners_count":17560514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoloader","loader","php","psr4"],"created_at":"2024-11-23T08:17:53.187Z","updated_at":"2024-11-23T08:17:54.188Z","avatar_url":"https://github.com/elusivecodes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FyreLoader\r\n\r\n**FyreLoader** is a free, open-source autoloader library for *PHP*.\r\n\r\n\r\n## Table Of Contents\r\n- [Installation](#installation)\r\n- [Basic Usage](#basic-usage)\r\n- [Methods](#methods)\r\n\r\n\r\n\r\n## Installation\r\n\r\n**Using Composer**\r\n\r\n```\r\ncomposer require fyre/loader\r\n```\r\n\r\nIn PHP:\r\n\r\n```php\r\nuse Fyre\\Loader\\Loader;\r\n```\r\n\r\n\r\n## Basic Usage\r\n\r\n```php\r\n$loader = new Loader();\r\n```\r\n\r\n**Autoloading**\r\n\r\nIt is recommended to bind the *Loader* to the [*Container*](https://github.com/elusivecodes/FyreContainer) as a singleton.\r\n\r\n```php\r\n$container-\u003esingleton(Loader::class);\r\n```\r\n\r\n\r\n## Methods\r\n\r\n**Add Class Map**\r\n\r\nAdd a class map.\r\n\r\n- `$classMap` is an array containing the class map.\r\n\r\n```php\r\n$loader-\u003eaddClassMap($classMap);\r\n```\r\n\r\n**Add Namespaces**\r\n\r\nAdd namespaces.\r\n\r\n- `$namespaces` is an array containing the namespaces where the key is the namespace prefix and the value is the path.\r\n\r\n```php\r\n$loader-\u003eaddNamespaces($namespaces);\r\n```\r\n\r\n**Clear**\r\n\r\nClear the auto loader.\r\n\r\n```php\r\n$loader-\u003eclear();\r\n```\r\n\r\n**Get Class Map**\r\n\r\nGet the class map.\r\n\r\n```php\r\n$classMap = $loader-\u003egetClassMap();\r\n```\r\n\r\n**Get Namespace**\r\n\r\nGet a namespace.\r\n\r\n- `$prefix` is a string representing the namespace prefix.\r\n\r\n```php\r\n$paths = $loader-\u003egetNamespace($prefix);\r\n```\r\n\r\n**Get Namespace Paths**\r\n\r\nGet all paths for a namespace.\r\n\r\n- `$prefix` is a string representing the namespace prefix.\r\n\r\n```php\r\n$paths = $loader-\u003egetNamespacePaths($prefix);\r\n```\r\n\r\n**Get Namespaces**\r\n\r\nGet the namespaces.\r\n\r\n```php\r\n$namespaces = $loader-\u003egetNamespaces();\r\n```\r\n\r\n**Has Namespace**\r\n\r\nDetermine whether a namespace exists.\r\n\r\n- `$prefix` is a string representing the namespace prefix.\r\n\r\n```php\r\n$hasNamespace = $loader-\u003ehasNamespace($prefix);\r\n```\r\n\r\n**Load Composer**\r\n\r\nLoad composer.\r\n\r\n- `$composerPath` is a string representing the composer autoload path.\r\n\r\n```php\r\n$loader-\u003eloadComposer($composerPath);\r\n```\r\n\r\n**Register**\r\n\r\nRegister the autoloader.\r\n\r\n```php\r\n$loader-\u003eregister();\r\n```\r\n\r\n**Remove Class**\r\n\r\nRemove a class.\r\n\r\n- `$className` is a string representing the class name.\r\n\r\n```php\r\n$loader-\u003eremoveClass($className);\r\n```\r\n\r\n**Remove Namespace**\r\n\r\nRemove a namespace.\r\n\r\n- `$prefix` is a string representing the namespace prefix.\r\n\r\n```php\r\n$loader-\u003eremoveNamespace($prefix);\r\n```\r\n\r\n**Unregister**\r\n\r\nUnregister the autoloader.\r\n\r\n```php\r\n$loader-\u003eunregister();\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felusivecodes%2Ffyreloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felusivecodes%2Ffyreloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felusivecodes%2Ffyreloader/lists"}