Download the PHP package frdl/remote-psr4 without Composer
On this page you can find all versions of the php package frdl/remote-psr4. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download frdl/remote-psr4
More information about frdl/remote-psr4
Files in frdl/remote-psr4
Package remote-psr4
Short Description An php psr4 Autoloader which is autoloading from a remote server.
License MIT
Homepage https://webfan.de/install/
Informations about the package remote-psr4
remote-psr4
An php PSR-4[?] Autoloader Client
which is autoloading from one or more remote servers.
With remote Classmap and Aliases.
Server?
If you want to build an API Server
for this client, you can install my Package frdl/codebase
.
This is recommended for larger projects, please use my API Server only for testing, if want to use it productionaly or need a larger amount of load, please contact me! You can also contact me if you need any help with my packages, or if you need a webhosting plan!
Optionaly you can configure the client, e.g. to load from githubs without a central server.
Usage
`` ...or...
With (custom) configuration
- Classmap (with PSR4 and Alias)
- Cache Settings
*more examples...*
Register Autoloader
**Prepend Autoloader:** If you like to prepend the autoloader you have to set the public static variable *allwaysAppendAutoloader* to *false*, **before** registering the autoloader!
``
This is not recommended as this loader loads from remote, for performance you should prefer your local classes (in production e.g.).
With (custom) validators
- ->withBeforeMiddleware()
- ->withAfterMiddleware()
- ->withWebfanWebfatDefaultSettings()
``
Presets per App and PHP Version
To bundle presets and cache them, to load faster in the next requests you can use the method
- ->getClassmapFor
The Webfan API provides an endpoint to fetch bundled classmaps with the classes of an app/group and for a specific
PHP Version
. Currently Frdlweb will possible deprecate PHP 7 support for new products, but possible will support >=7+ and >=8+. The $version parameter should be enum oflatest
,stable
andlegacy
. The $app parameterdefault
or*
bundles most of the Framework classes, further you currently can specify the apps - io4
- frdl/codebase | codebase
- webfan | webfat | webfan-website | webfan-webfat
` Requsts the following API endpoint:
curl -X 'GET' \ 'https://api.webfan.de/v1/install/generate/default/latest/autoloading/remote-mapping/8.2/classmap' \ -H 'accept: /'
`
A successful response looks like (classmap in result member) ` To load the classmap corresponding to the PHP version you are running, from cache or API, and attatch the classmaps autoload definitions to the $loader immediately, you can use the method
- ->withClassmapFor ``