{"id":19771031,"url":"https://github.com/dflydev/dflydev-composer-autoload","last_synced_at":"2026-05-14T21:05:12.234Z","repository":{"id":4850587,"uuid":"6005006","full_name":"dflydev/dflydev-composer-autoload","owner":"dflydev","description":"Composer Autoload Tools","archived":false,"fork":false,"pushed_at":"2013-01-07T02:09:35.000Z","size":136,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T22:47:43.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"chriswoodford/propel-cli","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dflydev.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}},"created_at":"2012-09-29T01:21:14.000Z","updated_at":"2017-04-01T10:14:16.000Z","dependencies_parsed_at":"2022-09-12T03:01:38.765Z","dependency_job_id":null,"html_url":"https://github.com/dflydev/dflydev-composer-autoload","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dflydev/dflydev-composer-autoload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflydev%2Fdflydev-composer-autoload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflydev%2Fdflydev-composer-autoload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflydev%2Fdflydev-composer-autoload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflydev%2Fdflydev-composer-autoload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dflydev","download_url":"https://codeload.github.com/dflydev/dflydev-composer-autoload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflydev%2Fdflydev-composer-autoload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33043263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T05:01:06.515Z","updated_at":"2026-05-14T21:05:12.218Z","avatar_url":"https://github.com/dflydev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Composer Autoload Tools\n=======================\n\nProvide a standard interface for accessing and reading [Composer][00]\nautoloaders.\n\n**WARNING: This API is not yet stable and may be subject to change.**\n\n\nWhy Does This Library Exist?\n----------------------------\n\nWhile it is generally not considered best practice for an application\nto be aware of underlying autoloaders, accessing the autoloader is\nsometimes a necessity.\n\nThe primary use case behind the creation of this library was providing\na [Composer implementation][02] of the [PSR-0 Resource Locator][03].\n\n\nUsage\n-----\n\n```php\n\u003c?php\nuse Dflydev\\Composer\\Autoload\\ClassLoaderLocator;\n$locator = new ClassLoaderLocator;\n\n$reader = $locator-\u003egetReader();\n\n// Get access to all of the prefixes registered to all of\n// the Composer Class Loaders in one array.\n$prefixes = $reader-\u003egetPrefixes();\n```\n\n\nInstallation\n------------\n\nThrough [Composer][00] as [dflydev/composer-autoload][01].\n\n\nRequirements\n------------\n\n * PHP 5.3+\n\n\nAPI\n---\n\n### ClassLoaderLocator Class\n\n#### Class Loaders\n\nDirect access to Composer Class Loaders.\n\n * *Composer\\Autoload\\ClassLoader[]* **getClassLoaders()**:\n   Get all Composer Autoload Class Loader instances.\n * *Composer\\Autoload\\ClassLoader|null* **getFirstClassLoader()**:\n   Get the first Class Loader registered.\n * *Composer\\Autoload\\ClassLoader|null* **getFirstClassLoader()**:\n   Get the last Class Loader registered.\n\n#### Class Loader Readers\n\nAccess to underlying Class Loaders through the Class Loader Reader\nInterface.\n\n * *ClassLoaderReaderInterface* **getReader()**:\n   Get a ClassLoader Reader.\n\n   If multiple ClassLoaders or no Class Loaders are registered a Composite\n   Class Loader Reader will be returned.\n * *ClassLoaderReaderInterface[]* **getReaders()**:\n   Get Class Loader Readers for each registered Class Loader.\n * *ClassLoaderReaderInterface* **getFirstReader()**:\n   Get the Class Loader Reader for the first Class Loader registered.\n * *ClassLoaderReaderInterface* **getFirstReader()**:\n   Get the Class Loader Reader for the last Class Loader registered.\n\n#### Static Methods\n\n * **init()**:\n   Initialize static instance.\n\n   Can be used to ensure that everything is setup before it is actually used\n   at a later time. For example, if something may be going to modify the list\n   of registered autoloaders, this will ensure that the Composer ones can be\n   found and recorded right away.\n * **reset()**:\n   Reset the static instance.\n\n   This effectively clears the located Class Loader instances. The next time\n   something tries to access the class loaders the list of registered\n   autoloaders will be scanned again.\n * **set(array $classLoaders)**:\n   Set the list of Class Loaders.\n\n   This is here primarily for testing purposes.\n\n\n### ClassLoaderReaderInterface\n\nMimics the data methods from `Composer\\Autoload\\ClassLoader`.\n\n * *array* **getPrefixes()**:\n   Get namespace to directory mapping\n\n * *array* **getFallbackDirs()**:\n   Get list of fallback directories\n\n * *array* **getClassMap()**:\n   Get class mapping\n   \n * *string|null* **findFile($class)**:\n   Find the file for a specific class.\n\nGotchas\n-------\n\nIn some cases Composer's Class Loader may be replaced by another\nautoload implementation. The common example for this is when a\nspecialized Debug Class Loader is registered on top of Composer.\nIn these cases it is advised to call `init()` immediately after\n`autload.php` is required to ensure that Composer's Class Loader can\nbe located.\n\n```php\n\u003c?php\nDflydev\\Composer\\Autoload\\ClassLoaderLocator::init();\n```\n\n\nLicense\n-------\n\nMIT, see LICENSE.\n\n\nCommunity\n---------\n\nIf you have questions or want to help out, join us in the\n[#dflydev](irc://irc.freenode.net/#dflydev) channel on irc.freenode.net.\n\n[00]: http://getcomposer.org\n[01]: https://packagist.org/packages/dflydev/composer-autoload\n[02]: https://packagist.org/packages/dflydev/psr0-resource-locator-composer\n[03]: https://packagist.org/packages/dflydev/psr0-resource-locator","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflydev%2Fdflydev-composer-autoload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdflydev%2Fdflydev-composer-autoload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflydev%2Fdflydev-composer-autoload/lists"}