{"id":26389043,"url":"https://github.com/php-module/include-all","last_synced_at":"2025-03-17T09:16:53.013Z","repository":{"id":57040130,"uuid":"362127744","full_name":"php-module/include-all","owner":"php-module","description":"A small and simple class to automatically include whole the directories and subdirectories files in php.","archived":false,"fork":false,"pushed_at":"2022-09-22T18:38:43.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-20T16:49:55.528Z","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":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-module.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-04-27T13:45:16.000Z","updated_at":"2022-09-19T23:14:12.000Z","dependencies_parsed_at":"2022-08-23T23:30:40.444Z","dependency_job_id":null,"html_url":"https://github.com/php-module/include-all","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-module%2Finclude-all","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-module%2Finclude-all/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-module%2Finclude-all/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-module%2Finclude-all/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-module","download_url":"https://codeload.github.com/php-module/include-all/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244006384,"owners_count":20382443,"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":[],"created_at":"2025-03-17T09:16:52.531Z","updated_at":"2025-03-17T09:16:53.000Z","avatar_url":"https://github.com/php-module.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IncludeAll\n\nA small and simple class to automatically include whole the directories and subdirectories files in php using retalive or absolutes paths.\n\nThis should be used to bootstrap a group of the application dependencies that should be loaded everytime in a script.\n\nJust a great way for avoiding to use the include or require serveral times when trying to load a big number of files inside a directory.\n\n## THE OLD WAY FOR INCLUDING FILES\n\n```php\ninclude 'myDirectory/someFile.php';\ninclude 'myDirectory/otherFile.php';\ninclude 'myDirectory/anotherFile.php';\ninclude 'myDirectory/yetAnotherFile.php';\n``` \n\n## THE NEW WAY USING 'INCLUDE-ALL'\n\nYou can use the include-all library with and without composer.\nIf not using composer the library brigns an autoload file wich should be encountered inside the directory it is located. \nThe `include-all autoload file` should be required such as the `vendor/autoload.php` is... Before trying to use the library. \n\n### Without using composer autoload\n\n```php\nuse Sammy\\Packs\\IncludeAll;\n\nrequire_once 'path/to/include-all/autoload';\n\n$includeAll = new IncludeAll;\n\n# Using the dot slash (./) at the beggining\n# of the path is assuming that myDirectory is \n# located in the same directory[ or path] the \n# php script is. \n$includeAll-\u003eincludeAll('./myDirectory');\n```\n\n### Using composer autoload\n\n```php\nuse Sammy\\Packs\\IncludeAll;\n\n# Assuming that the vendor directory is \n# located in the same where the current\n# script is.\nrequire_once __DIR__ . '/vendor/autoload';\n\n$includeAll = new IncludeAll;\n\n# Using the dot slash (./) at the beggining\n# of the path is assuming that myDirectory is \n# located in the same directory[ or path] the \n# php script is. \n$includeAll-\u003eincludeAll('./myDirectory');\n```\n\n## HOW TO INSTALL\n\nIt is possible to get the source code from github following the url shown bellow:\n[php-module/include-all](https://github.com/php-module/include-all)\n\n### If using composer:\n\n```bash\ncomposer require php_modules/core php_modules/include-all\n```\n\nAdding it as a requirement inside the `composer.json` file:\n\n```json\n{\n  \"require\": {\n    \"php_modules/include-all\": \"^1.0.5\"\n  }\n}\n```\n\n## Simple using example:\n\n```php\n$includeAll = require ('path/to/include-all/index.php');\n$includeAll-\u003eincludeAll ('./path/to/directory');\n```\n\n### Using the constructor directly\n\n```php\nrequire ('path/to/include-all/index.php');\n\nuse Sammy\\Packs\\IncludeAll;\n\n$includeAll = new IncludeAll ();\n\n$includeAll-\u003eincludeAll ('./path/to/directory');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-module%2Finclude-all","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-module%2Finclude-all","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-module%2Finclude-all/lists"}