Download the PHP package quellabs/annotation-reader without Composer

On this page you can find all versions of the php package quellabs/annotation-reader. 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 annotation-reader

PHP Annotation Reader

Latest Version Downloads

A powerful PHP annotation reader for parsing, processing, and caching docblock annotations in PHP classes.

Overview

The AnnotationReader component provides robust parsing and caching of PHP docblock annotations, allowing you to define metadata directly within your class docblocks. This approach makes your code more self-documenting and reduces the need for separate configuration files.

Features

Installation

Usage

Basic Usage

Working with AnnotationCollection

All annotation reader methods return an AnnotationCollection object that provides array-like access with a clean, flat structure:

Handling Multiple Annotations

When you have multiple annotations of the same type, the collection provides clean access patterns:

Filtered Results

When filtering annotations, the result maintains the same clean structure:

Array Conversion Methods

The AnnotationCollection provides three different methods to convert the collection to standard PHP arrays, each serving different use cases:

toArray() - Mixed Key Format

The toArray() method creates an array with hybrid indexing that provides both class-name access for the first occurrence of each annotation type and numeric indexing for duplicates:

This format is ideal when you need both convenient class-name access and want to preserve all duplicate annotations in a single array structure.

toIndexedArray() - Linear Format

The toIndexedArray() method returns a simple indexed array containing all annotations in their original order:

This format is perfect for sequential processing, serialization, or when you need a simple list without any special key handling.

toGroupedArray() - Grouped by Class

The toGroupedArray() method organizes annotations by their class names, with each class name mapping to an array of all annotations of that type:

This format is excellent for processing annotations by type, configuration systems that need to handle multiple instances of the same annotation, or when building annotation-driven frameworks.

Choosing the Right Conversion Method

Annotation Format

Annotations are defined in PHP docblocks using the @ symbol followed by the annotation name and optional parameters. The annotation reader supports various parameter formats including strings, numbers, booleans, arrays, and the ::class magic constant.

Basic Annotations

Simple annotations with string, numeric, and boolean parameters:

Using Class Constants

Annotations with ::class magic constants for type-safe class references:

Supported Parameter Types

The annotation reader supports these parameter formats:

Mixed Parameter Types

You can combine different parameter types within the same annotation:

Configuration

The AnnotationReader requires a Configuration object that specifies:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


All versions of annotation-reader with dependencies

PHP Build Version
Package Version
Requires ext-ctype Version *
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 quellabs/annotation-reader contains the following files

Loading the files please wait ....