Download the PHP package fsi/metadata without Composer

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

THIS PACKAGE IS DEPRECATED

Do not use this package, as it will not receive any updates and may be deleted in the future.

FSi Metadata Component Documentation

FSi Metadata Component is a library that provide some commonly used mechanisms to read configurations for classes from different sources like annotations, yaml or xml. At the moment only php files annotations are supported.

Setup and autoloading

We highly recommend to use autoloader generated by composer.phar

Adding reflection into composer.json

{
    ... 
    "require": {
        ... 
        "fsi/metadata": "0.9.*" 
        ...
    },
    ...
}

Usage

FSi Metadata Component provides ClassMetadata object that can be easly overwritten. Default ClassMetadata object allows you to strore inside of it configuration for class, properties and methods. This can be done by using methods "addClassMetadata", "addPropertyMetadata", "addMethodMetadata".

What you need to do is to create class that extends from one of abstract drivers like AbstractAnnotationDriver.

Example of reading annotations from php class files.

Annotation driver

Annotation declaration

Example action in symfony 2 controller

Example action in symfony 2 controller (with cache)

All you need to do to implement caching metadata is create the cache object from Doctrine\Common\Cache and pass it into MetadataFactory constructor. For development purposes we suggest to use ArrayCache instead of not using any cache.

Sometimes default ClassMetadata is not enough. You can create own class that implements ClassMetadataInterface and pass class name into MetadataFactory constructor as third parameter.

Factory constructor example with custom metadata class

If you want to use Metadata Component in two separate mechanisms, inside of the same application you should create new MetatadaFactory and appropriate driver in each mechanism but cache driver may be the same object each time. It is possible when cache mechanism is used with different prefix and/or metadata class for each factory object.


All versions of metadata with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
doctrine/common Version ~2.2
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 fsi/metadata contains the following files

Loading the files please wait ....