utopia-php / preloader
Utopia Preloader library is simple and lite library for managing PHP preloading configuration
Installs: 78 908
Dependents: 2
Suggesters: 0
Security: 0
Stars: 12
Watchers: 9
Forks: 9
Open Issues: 0
Requires
- php: >=7.1
Requires (Dev)
- phpunit/phpunit: ^9.3
- vimeo/psalm: 4.0.1
README
Utopia Preloader library is a simple and lite library for managing PHP preloading configuration. This library is aiming to be as simple as possible and easy to learn and use. This library is maintained by the Appwrite team.
Although this library is a part of the Utopia Framework project it is dependency free and can be used as standalone with any other PHP project or framework.
Getting Started
Install using composer:
composer require utopia-php/preloader
<?php if (file_exists(__DIR__.'/../vendor/autoload.php')) { require __DIR__.'/../vendor/autoload.php'; } use Utopia\Preloader; (new Preloader()) ->paths(realpath(__DIR__ . '/../app/config')) ->paths(realpath(__DIR__ . '/../src')) ->ignore(realpath(__DIR__ . '/../vendor/twig/twig')) ->ignore(realpath(__DIR__ . '/../vendor/guzzlehttp/guzzle')) ->ignore(realpath(__DIR__ . '/../vendor/geoip2')) ->ignore(realpath(__DIR__ . '/../vendor/maxmind')) ->ignore(realpath(__DIR__ . '/../vendor/maxmind-db')) ->ignore(realpath(__DIR__ . '/../vendor/piwik')) ->load();
System Requirements
Utopia Framework requires PHP 8.0 or later. Preloading is supported in PHP 7.4 or later. We recommend using the latest PHP version whenever possible.
Copyright and license
The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php