Download the PHP package antcms/antloader without Composer

On this page you can find all versions of the php package antcms/antloader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package antloader

AntLoader

PHPStan Level Supported PHP Versions Packagist Downloads PHP Tests

A small, simple, and highly performant autoloader for PHP applications.

Installation

Usage

Configuration

AntLoader accepts an array to configure it's available options. None of the configuration options are required, however at a minimum it is recommended to specify a path unless you know APCu will be usable in all environments for your application. Note: Please read the "Classmap Caching Options" section of this document, as that covers the strengths and weaknesses of each caching approach.

If you are looking to build an application that is fairly portable, we recommend configuring the path and nothing else. This configuration will allow AntLoader to use APCu when available and fallback to the filesystem when it is not. Providing a specific path for the file system cache ensures that the classmap will be stored in a location that is persistent.

Classmap Caching Options

APCu

Starting from version 2.0.0, AntLoader now supports storing the Classmap in RAM using APCu. This feature allows AntLoader to achieve optimal performance by persisting the classmap between sessions. Here are a few things to note about the APCu mode:

Filesystem

The filesystem caching method, in theory, is slower than the APCu caching method. However, the actual performance can vary based on external variables, and on well-performing systems with minimal disk load, the difference is likely to be minimal. Here are some details about the filesystem caching method:

Memory

If you use the memory caching option, this will cause AntLoader to still create a classmap and then load it, however the generated classmap will not be saved anywhere. Typically generating a classmap can be quite slow so this is likely the worst performing option (even compared to no class map), however it may be useful in testing or if you need to point the autoloader to a directory you don't have control over, as the composer/class-map-generator package generates a classmap regardless of PSR0 / PSR4 & don't wish to cache the result from that.

Notes

Performance

So, we encourage you to take advantage of the classmap feature to get the best performance out of your application.

Maintaining AntLoader

AntLoader is generally hands-off, except that we highly recommend clearing out / resetting the classmap after updating your application. AntLoader will never remove outdated classes / paths from the classmap, so never allowing it to be rebuilt can negatively affect the performance of your application if classes are renamed or moved. The best way to do this is simply to call the resetClassMap function that AntLoader provides. This will automatically reset the classmap for the current Cache method.

Pruning the classmap

If you have an application where the class list may periodically change, you can prune the classmap periodically to ensure it's not filling up with classes that no longer exist. To do so, simply call pruneClassmap. This function will return the number of pruned classes.

License

AntLoader is distributed with no warranty under the Apache License 2.0


All versions of antloader with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
composer/class-map-generator Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package antcms/antloader contains the following files

Loading the files please wait ....